Highstocks - Use tickmarkPlacement "in between" on datetime Axis (no categories)

Is there any workaround for setting tickMarkPlacement as β€œin between” in the time axis? I know that the API is not supported , but I was hoping to find some kind of hack / plugin.

+6
source share
1 answer

You can lure it out using the x x tag mark.

Example:

[[update after comments:

if you mean that you want the data points to line up 'between' as well, then there is no good easy way.

My approach will be

1) make sure that there is only one data point per axis, ideally

2) adjust the x value of the data point to direct it to the right in a way that matches the label offset

3) adjust the formatting of the tooltips to fix the display date

or, 4) just go to the categories

However, if you can explain why you want to do this, what effect you are going to take, perhaps this can still be done.

{{ additional updates :

After playing a little more, I found another way to clean up the data placement, although it is not clear if you need it.

An example is here:

It uses the pointPlacement property. The trap is that the pointPlacement property does not work if there is no series of columns with as many data points as a row of rows. It seems.

Thus, this method adds and hides dummy columns so that the pointPlacement property pointPlacement a series of rows.

Not elegant, but it hits to adjust the data values ​​and then reconfigure them in formatting.

+1
source

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


All Articles