ZingChart: How to display all values on axes
Depending on which scale axis you want to show you will use the scaleY
or scaleX
object. You will add the itemsOverlap
attribute to force all labels to render. The itemsOverlap
attribute is for dynamic sizing and margins set by default so it uses a smart render to hide/show labels based on the amount of space available. What you are overriding is to ALWAYS show these labels, even on a small screen.
Before
After
Code Snippet
scaleX: { itemsOverlap: true }, scaleY: { itemsOverlap: true },
Documentation
-
https://www.zingchart.com/docs/tutorials/elements/scales#scale-items
-
https://www.zingchart.com/docs/api/json-configuration/graphset/scale-x
-
https://www.zingchart.com/docs/api/json-configuration/graphset/scale-y