You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chartjs is great and I am creating a horizontal bar graph centered in the middle with +/- values on either side of centered x-axis. As part of this chat I am creating ticks at specific intervals and labeling items, which is a lovely feature.
However, after doing more testing today, I did not realize that the ticks feature seems to actually do the following:
It has a maximum division of 10 segments and no more. I thought this was arbitrary.
I can set up to 10 division segments along the x axis BUT, Chartjs ignores my explicit instruction for 10 divisions and instead takes the horizontal chart size and subdivides it into either 6, 7, 8 or some other arbitrary number that seems to land on even number vertical ticks as it looks like it is trying to avoid odd number ticks.
Ticks don't seem to actually be centered like bar charts can and they always start at the 0 leftmost x-axis segment. This would be okay if it could actually draw segments at arbitrary positions and not ignore my explicit desire for 10 segments regardless of size of the x-axis of the chart. If I could center ticks as well and use +/- that would be more intuitive I guess.
The above are not requests or complains, but simply head scratchers. I cannot begin to fathom the default behaviour, what it does what it does and how to make it work like I need it to. I have read as much of the documentation on ticks that I could find and googled to see if anyone else was able to get arbitrary placement of ticks, but only I seem to have the issue.
So, I suspect all of the above is as a result of my misunderstanding of how ticks work. Does anyone have any tips or suggestion on how to get ticks to actually subdivide the x-axis in as many arbitrary divisions as I want and have an absolute fixed subdivision so that I can place a label at x-axis value 8 for example and have it remain 8 regardless of what the x-axis min max values might be?
Here is the code I am working with, please feel free to be blunt and tell me I am a dummy. I am certain I am not undrestanding how ticks work. Code:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi guys.
Chartjs is great and I am creating a horizontal bar graph centered in the middle with +/- values on either side of centered x-axis. As part of this chat I am creating ticks at specific intervals and labeling items, which is a lovely feature.
However, after doing more testing today, I did not realize that the ticks feature seems to actually do the following:
The above are not requests or complains, but simply head scratchers. I cannot begin to fathom the default behaviour, what it does what it does and how to make it work like I need it to. I have read as much of the documentation on ticks that I could find and googled to see if anyone else was able to get arbitrary placement of ticks, but only I seem to have the issue.
So, I suspect all of the above is as a result of my misunderstanding of how ticks work. Does anyone have any tips or suggestion on how to get ticks to actually subdivide the x-axis in as many arbitrary divisions as I want and have an absolute fixed subdivision so that I can place a label at x-axis value 8 for example and have it remain 8 regardless of what the x-axis min max values might be?
Here is the code I am working with, please feel free to be blunt and tell me I am a dummy. I am certain I am not undrestanding how ticks work. Code:
Beta Was this translation helpful? Give feedback.
All reactions