我正在创建一个包含一些lineseries的图表(使用DataVisualization工具包),我正在使用这样的类:
private static Style ResultStylex()
{
Color background = Color.FromRgb(255, 0, 0);
Style style = new Style(typeof(DataPoint));
Setter st1 = new Setter(BackgroundProperty, new SolidColorBrush(background));
Setter st2 = new Setter(HeightProperty, 8.8);
Setter st3 = new Setter(WidthProperty, 8.8);
style.Setters.Add(st1);
style.Setters.Add(st2);
style.Setters.Add(st3);
return style;
}
每个lineseries改变线条和标记的颜色和大小。 有没有办法使用这样的类(或类似的)来制作自定义数据点标记(如三角形,方形等)而不进行xaml修改?或者其他方式?
类似WPF Toolkit Chart: Positions of Data Point Visualization shifted when changing data values中的点(o,>,M)