WPF工具包图表(线系列)自动对独立值进行排序

时间:2018-08-02 12:58:22

标签: wpf charts toolkit lineseries

我正在使用WPF Toolkit进行图表制作。我必须要解决的问题是:

点是:(1,1),(2,1),(1,3),(4,4)

示例代码:

        List<KeyValuePair<Double, Double>> valueList = new List<KeyValuePair<Double, Double>>();
        valueList.Add(new KeyValuePair<double, double>(1,1));
        valueList.Add(new KeyValuePair<double, double>(2,1));
        valueList.Add(new KeyValuePair<double, double>(1,3));
        valueList.Add(new KeyValuePair<double, double>(4,4));
        this.lineSeriesAssay1.ItemsSource = valueList;

Intended chart:

Output chart:

0 个答案:

没有答案