Understanding Highcharts' layout
Before we start to learn how Highcharts layout works, it is imperative that we understand some basic concepts first. To do that, let's first recall the chart example used in Chapter 1, Web Charts, and set a couple of borders to be visible. First, set a border around the plot area. To do that we can set the options of plotBorderWidth
and plotBorderColor
in the chart
section, as follows:
chart: { renderTo: 'container', type: 'spline', plotBorderWidth: 1, plotBorderColor: '#3F4044' },
The second border is set around the Highcharts container. Next, we extend the preceding chart
section with additional settings:
chart: { renderTo: 'container', .... borderColor: '#a1a1a1', borderWidth: 2, borderRadius: 3 },
This sets the container border color with a width of 2
pixels and corner radius of 3
pixels...