A
A
Artem2017-01-31 12:09:43
JavaScript
Artem, 2017-01-31 12:09:43

How to set spacing in highcharts?

Given: a highcharts chart divided by weeks along the x-axis. The last interval should be narrower.
How to proportionally reduce the last interval or give a certain width to each interval along the x-axis?
Sources
385a04b503.jpg
I did not find anything suitable in the api. Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Tutukov, 2017-01-31
@artemky

You need to divide the x-axis not into weeks, but into days.
Now you have [7792, 12483, 16516, 8888, 1569], which is the same as [0.7792], [1.12483], [2.16516], [3.8888], [4, 1569].
And if you divide by days and you specify X (day), then you should get something like
[0.7792], [7.12483], [14.16516], [21.8888], [24, 1569]
And there is an example with dates:
www.highcharts.com/demo/spline-irregular-time/dark...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question