我放置了多个标签,但是在ColumnSeries图表中只能看到一个标签值。而且我已经在Separator下面尝试了Step = 1,但这仍然行不通。以下是我编写的代码。
SeriesCollection = new SeriesCollection();
Separator Separator = new Separator();
foreach (var item in QuesionnaireListdgv)
{
var per = item.Percentage.Replace("%", "");
SeriesCollection.Add(new ColumnSeries() { Values = new ChartValues<int> { 0 } });
SeriesCollection.Add(new ColumnSeries { Values = new ChartValues<int> { item.Attempt }, Fill = Brushes.Red, DataLabels = true });
SeriesCollection.Add(new ColumnSeries { Values = new ChartValues<int> { item.AttemptGreen }, Fill = Brushes.Green, DataLabels = true });
SeriesCollection.Add(new ColumnSeries { Values = new ChartValues<int> { Convert.ToInt16(per) }, Fill = Brushes.Orange, DataLabels = true });
}
Labels = new List<string>();
Labels = new List<string>()
{"T11", "T12", "T13", "T14", "T15", "T16", "T17", "T18", "T19", "T20", "T21"};
Separator = new Separator { Step = 1, IsEnabled = false };
请告知我是否知道这个问题。