<lvc:CartesianChart Grid.Row="2"Grid.Column="0"Name="cartesianChart1"DisableAnimations="True"Visibility="Hidden"Hoverable="False"DataTooltip="{x:Null}"Margin="20,20,0,20"Series="{Binding SeriesCollection1}"LegendLocation="None"> <lvc:CartesianChart.AxisX> <lvc:Axis Labels="{Binding Labels1...
--设置X轴--><CartesiantChart.AxisX><AxisShowLabels="true"Labels="1:00,2:00,3:00,4:00,5:00.6:00,7:00,8:00,9:00"><Axis.SeparatorStep="1"StrokeThickness="0"/></Axis></CartesiantChart.AxisX><!--设置Y轴--><CartesiantChart.AxisY><AxisShowLabels="True"FontSize="8"MinValue="0...
// 设置横坐标为时间 chart.AxisX.Add(new Axis { LabelFormatter = value => TimeSpan.FromSeconds(value).ToString(@"hh\:mm\:ss"),LabelsRotation = 45,Separator = new LiveCharts.Wpf.Separator {www.5ahospital.com/xiangmu/740.html Step = TimeSpan.FromHours(1).Ticks,IsEnabled = false // 不...
i. LineSmoothness 设置线条是否弯曲 (0 或 1)0 为直线,1为曲线 AxisX (AxisY) a. title 设置横纵轴标题 (字符串) b. Labels 设置横纵轴的标签 (字符串) c. LabelsRotation 设置坐标轴标签旋转的角度 (数字值) d. LabelFormatter 自定义坐标轴显示格式 e. ShowLabels 设置横纵轴的刻度是否显示( True |...
axisX = new Axis { Title = "X Axis", Labels = new[] { "A", "B", "C", "D", "E" } }; var axisY = new Axis { Title = "Y Axis" }; // 将配置应用到图表控件 cartesianChart1.Series = series; cartesianChart1.AxisX.Add(axisX); cartesianChart1.AxisY.Add(axisY); } } ...
() }; LiveCharts.Wpf.Axis ax = new LiveCharts.Wpf.Axis() { Title = "Tools", FontSize = 8, Separator = new Separator { Step = 1, IsEnabled = false }, ShowLabels = true, Labels = new List<string>() {"T11","T12", "T13", "T14", "T15", "T16", "T17", "T18", "T19...
{ 3, 1, 6 } } }; public Axis[] XAxes { get; set; } = { new Axis { Labels = new string[] { "Category 1", "Category 2", "Category 3" }, LabelsRotation = 0, SeparatorsPaint = new SolidColorPaint(new SKColor(200, 200, 200)), SeparatorsAtCenter = false, TicksPaint = ...
{ 3, 1, 6 } } }; public Axis[] XAxes { get; set; } = { new Axis { Labels = new string[] { "Category 1", "Category 2", "Category 3" }, LabelsRotation = 0, SeparatorsPaint = new SolidColorPaint(new SKColor(200, 200, 200)), SeparatorsAtCenter = false, TicksPaint = ...
<Grid> <Grid.DataContext> <local:ViewModel /> </Grid.DataContext> <lvc:CartesianChart Width="500" Height="300" Series="{Binding SeriesCollection}" LegendLocation="Right"> <lvc:CartesianChart.AxisX> <lvc:Axis Title="X轴标题" Labels="{Binding Labels}"></lvc:Axis> </lvc:CartesianChart.Axis...
ShowLabels和Labels:是否显示 X 或 Y 轴的系数,Labels 就是坐标系数 LabelsRotation:是坐标轴上系数的旋转角度 Title:坐标轴的标题 lvc:Axis.Separator: lvc:Separator Step="":这个就是设置设置两个坐标系数之间的数据差距 lvc:Separator StrokeDashArray="":分割线虚线间隔,一般不设置 ...