LiveChart图表类
CartesianChart柱状图Label较多时倾斜显示,使用LabelsRotation属性,并将Separator.Step设置为1.
1 2 3 4 5 6 7 8 9 10 11 12
| <lvc:CartesianChart x:Name="chart" Series="{Binding SeriesCollection}" LegendLocation="Right"> <lvc:CartesianChart.AxisX> <lvc:Axis Title="{Binding AxisXName}" LabelsRotation="45" Labels="{Binding Labels}" FontWeight="ExtraLight" FontSize="16" MaxRange="1" > <lvc:Axis.Separator> <lvc:Separator Step="1"></lvc:Separator> </lvc:Axis.Separator> </lvc:Axis> </lvc:CartesianChart.AxisX> <lvc:CartesianChart.AxisY> <lvc:Axis Title="{Binding AxisYName}" LabelFormatter="{Binding Formatter}" FontWeight="ExtraLight" FontSize="12"></lvc:Axis> </lvc:CartesianChart.AxisY> </lvc:CartesianChart>
|