dotnethighcharts-点宽度

dotnethighcharts-点宽度,highcharts,dotnethighcharts,Highcharts,Dotnethighcharts,我使用dotnethighcharts,希望列的点宽度为20,但我不能让它与dotnethighcharts一起工作,有什么建议吗 Highcharts chart; chart = new Highcharts("chart") .InitChart(new Chart { DefaultSeriesType = ChartTypes.Column }) .SetXAxis(new XAxis

我使用dotnethighcharts,希望列的点宽度为20,但我不能让它与dotnethighcharts一起工作,有什么建议吗

      Highcharts chart;
        chart = new Highcharts("chart")
            .InitChart(new Chart { DefaultSeriesType = ChartTypes.Column })
            .SetXAxis(new XAxis
            {
                Categories = new[] { "1", "2" },
                Title = new XAxisTitle { Text = string.Empty }
            })
            .SetPlotOptions(new PlotOptions
            {
                Bar = new PlotOptionsBar
                {
                    DataLabels = new PlotOptionsBarDataLabels { Enabled = true }
                },
            })

            .SetSeries(new[]
            {
                new Series {Name = "1", Data = new Data(new object[] {1})},
                new Series {Name = "2", Data = new Data(new object[] {4})}
            });
下面是一个如何使用pointwidth的示例
答案-我错过了这个

 Column = new PlotOptionsColumn
                {
                    PointPadding = 0.2,
                    PointWidth = 40,
                    BorderWidth = 0
                }
这是所有代码

    Highcharts chart;
    chart = new Highcharts("chart")
        .InitChart(new Chart { DefaultSeriesType = ChartTypes.Column })
        .SetXAxis(new XAxis
        {
            Categories = new[] { "1", "2" },
            Title = new XAxisTitle { Text = string.Empty }
        })
        .SetPlotOptions(new PlotOptions
        { 
             Column = new PlotOptionsColumn
                {
                    PointPadding = 0.2,
                    PointWidth = 40,
                    BorderWidth = 0
                },
            Bar = new PlotOptionsBar
            {
                DataLabels = new PlotOptionsBarDataLabels { Enabled = true }
            },
        })

        .SetSeries(new[]
        {
            new Series {Name = "1", Data = new Data(new object[] {1})},
            new Series {Name = "2", Data = new Data(new object[] {4})}
        });