我想建立基於此表折線圖:
其中每個不同KPIName
有在圖表上自己的路線。
我該怎麼做?
我嘗試這樣做:折線圖與基於單柱兩個系列值
foreach (KPI_PG kpi in _PG.KPI_PG)
{
Series currentPG = new Series(kpi.KPIName);
chrt_PGByYear.Series.Add(currentPG);
currentPG.ChartType = SeriesChartType.Line;
currentPG.BorderWidth = 3;
currentPG.XValueType = ChartValueType.String;
currentPG.XValueMember = "Year";
currentPG.YValueType = ChartValueType.Int32;
currentPG.YValueMembers = "Value";
}
,但它並沒有因爲同一個圖表名稱的工作。
您的表格顯示5行中的3個不同的kpiNames。你想要3系列還是5?這條生產線如何以三個不同的'年份'作爲字符串?你應該重新檢查你的數據.. – TaW