Chart Height and Width

Sep 21, 2015 at 3:41 PM
The chart seems to be setting a specific height and width, though I am not setting those in code. I see that you can override the defaults, but I just want it to take up all available width and height. How do you tell DotNet.Highcharts not to send default hight/width?
Oct 2, 2015 at 4:50 PM
According to the Chart.Height documentation, you may set "An explicit height for the chart. By default the height is calculated from the offset height of the containing element, or 400 pixels if the containing element's height is 0."

the Div that Highcharts is injected into can be styled individually, though the HighCharts object returns a simple div with and ID of what you declared in it's instantiation. this means it's got a height declaration of zero, which forces a minimum height of 400, unless you overroad it with the below example.
Highcharts chart = new Highcharts("chart")
                .InitChart(new Chart { Type = ChartTypes.Bubble, ZoomType = ZoomTypes.Xy, Width = 610, Height = 420 })
Does this answer your question?