
目录
1、动态可见性
https://lvcharts.net/App/examples/v1/wpf/Dynamic%20Visibility
2、图表标签的理解
设置轴网交点无几何形态:PointGeometry = DefaultGeometries.None,
设置线系列以下不填充:Fill = Brushes.Transparent
在C#中设置轮廓虚线
在WPF中设置Separator
显示图表标签:DataLabels = true(在series下)
给图表系列赋值:
Values = new ChartValues<double> (list);
Values = new ChartValues<double> {1,2,3};
<lvc:CartesianChart.AxisX>
<lvc:Axis Labels="{Binding Labels}">
<lvc:Axis.Separator>
<lvc:Separator Step="1"></lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisX>
3、AxisSection
https://lvcharts.net/App/examples/v1/wpf/Sections
<lvc:CartesianChart.AxisY>
<lvc:Axis Title="应力值(MPa)" LabelFormatter="{Binding YFormatter}">
<lvc:Axis.Sections>
<lvc:AxisSection Value="0.0" StrokeThickness="3" Stroke="#F9D648">
<lvc:AxisSection.Fill>
<SolidColorBrush Color="#A3A3FF" Opacity=".4"></SolidColorBrush>
</lvc:AxisSection.Fill>
</lvc:AxisSection>
</lvc:Axis.Sections>
</lvc:Axis>
</lvc:CartesianChart.AxisY>