Display vertical lines and horizontal lines in sections

I use Highcharts to create scatterplots.

The problem is that, by default, scatter plots have background (i.e. not part of the data, only for scale) rows parallel to the x-axis or y-axis, but not both at the same time.

Here is an example that I used to start making scatter plots. Notice the lines parallel to the x axis.

How to get a scatterplot with a background line in the axes ?

+6
source share
1 answer

The default values ​​for gridLineWidth are 1 for yAxis and 0 for xAxis, resulting in only horizontal lines being displayed. You need to set width 1 for x and y.

 yAxis: { gridLineWidth: 1 // The default value, no need to change it }, xAxis: { gridLineWidth: 1 // New value }, 

Jsfiddle example:

enter image description here

+23
source

Source: https://habr.com/ru/post/906303/


All Articles