Hi~您好
我寫了一份Line Chart動態圖表,圖表有機率出現以下畫面
我需要的是多個項目同時動態繪製,Dynamic Sample只有繪製一條線
因此我的寫法如下
private void addLanData(List<List<double>> valuelist, List<List<double>> time, List<string> lineColor, List<string> title)
{
lanusage_chart.BeginUpdate();
lanusage_chart.Data.Children.Clear();
List<List<int>> tmpdata = new List<List<int>>();
for (int i = 0; i < valuelist.Count; i++)
{
XYDataSeries showdata = new XYDataSeries();
showdata.ConnectionStroke = new SolidColorBrush((Color)ColorConverter.ConvertFromString(lineColor));
showdata.XValuesSource = time;
showdata.ValuesSource = valuelist;
lanusage_chart.Data.Children.Add(showdata);
}
lanusage_chart.EndUpdate();
}
請問該如何解決此問題
感謝 |