dotnethighcharts - 点宽

dotnethighcharts - pointwidth

我正在使用 dotnethighcharts 并希望列的 pointwidth=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})}
            });

这是一个如何使用点宽的例子 http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/column-pointwidth-20/

答案 - 我错过了这个

 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})}
        });