0

I am using the following code. When I use "Option 3d" it throws an error "Object reference not set to an instance of an object.". It works fine when I remove "Option 3d".

DotNet.Highcharts.Highcharts chart2 = new DotNet.Highcharts.Highcharts("Chart")
        .InitChart(new Chart
        {
            Type = ChartTypes.Column,
            Options3d =
            {

               Enabled=false,
               Alpha= 15,
               Beta=15,
               Depth=40,
               ViewDistance=25

            }
           ,MarginTop=80,MarginRight=40

        }).SetXAxis(new XAxis
                        {
                            Categories = STATUS.ToArray()
                        })
        .SetYAxis(new YAxis

        {
            StackLabels = new YAxisStackLabels
            {
                Enabled = true,
                Style = @"fontWeight: 'bold', color: 'black'"
            }
        })
        .SetSeries(serie1)
        .SetPlotOptions(new PlotOptions
        {

            Column = new PlotOptionsColumn
            {
                Stacking = Stackings.Normal,
            }
        });
        ltrChart.Text = chart2.ToHtmlString();

what is the problem behind this?

MSAKH
  • 1
  • 2
  • `NullReferenceException` is a common situation for beginner programmers. The link provided should help you understand the problem. Then use the debugger to find what/where/when you have a variable that is `null`. – Soner Gönül Feb 02 '15 at 07:38
  • See Soner, When I put "Option 3d" option in chart then It throws error of "NullReferenceException" . That Means 3D view of chart failed to load. I am using the following js file to support 3d highcharts.js highcharts-3d.js exporting.js – MSAKH Feb 02 '15 at 07:48
  • Add a reference to http://code.highcharts.com/highcharts-3d.js – Sebastian Bochan Feb 02 '15 at 10:41
  • This is Helpless...... – MSAKH Feb 02 '15 at 11:40

0 Answers0