|
viewport chart ticks on all labels |
Posted by Andreas on Sep-08-2017 20:38 |
|
Hi Peter,
In the attachment I have a "normal" chart which has two xAxis, the first for month the second for the year. For each month there is avalue. There is a grid line for each label / i.e. month.
Now I need to have something similar in a viewport chart.
I wonder if it's possible
to have a tick on each month (even if the label might not be shown), but not between month, because at an increased tick density i get ticks also between the labels....so the question is if the ticks could be bound to the positions of the labels
In the second attachment I show you what I did so far.
Thank you for your help!
BR
Andreas
|
Re: viewport chart ticks on all labels |
Posted by Peter Kwan on Sep-08-2017 22:15 |
|
Hi Andreas,
My understanding is that you do not want the tick spacing to be less than 1 month (such as a tick every 10 days or 15 days).
As the chart is zoomed in, the x-axis will contain only a few months (eg. 2 months), and ChartDirector has a tendency to put ticks every few days. You can use Axis.setMinTickinc to force the tick spacing to be at least 1 month. The code is:
'tick spacing at least one month
c.xAxis().setMinTickInc(86400 * 30)
Regards
Peter Kwan |
Re: viewport chart ticks on all labels |
Posted by Andreas on Sep-11-2017 16:09 |
|
Thank you, Peter, that's exactly what I needed  |
|