设置活动图表的最小条形宽度

时间:2018-07-05 13:06:31

标签: wpf xaml livecharts

我正在尝试为Livecharts设置最小条形宽度,但无法这样做。 这是我的示例代码

xaml:

 <lvc:CartesianChart Series="{Binding SeriesCollection}" >
            <lvc:CartesianChart.AxisX>
                <lvc:Axis MinValue="0" MaxValue="1000" ></lvc:Axis>
            </lvc:CartesianChart.AxisX>
        </lvc:CartesianChart >

.cs

 SeriesCollection = new SeriesCollection
                {                    
                    new ColumnSeries
                    {
                       Values = new ChartValues<ObservablePoint>
                        {
                            new ObservablePoint(0, 2),
                            new ObservablePoint(2, 5),
                            new ObservablePoint(3, 6),
                            new ObservablePoint(6, 8),
                            new ObservablePoint(100, 565)
                        },MaxColumnWidth=10
                    }
                };

结果将是空白图表,最小值x和最大值x值。您能帮我吗?

0 个答案:

没有答案