-
The Y axis seems to be dynamic and depends on the data. Is there a way to make it always start from 0 instead? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes, you can set the Y axis range (or the Y scale domain in D3 terms) for all XY components (Line, Area, Scatter, etc ...) by setting the Here's an example in React: <VisXYContainer yDomain={[0, undefined]} ...>
<VisLine ... >
</VisXYContainer> The yDomain value of You can read more about controlling the chart's scales in the documentation: https://unovis.dev/docs/xy-charts/Container#ydomain |
Beta Was this translation helpful? Give feedback.
Yes, you can set the Y axis range (or the Y scale domain in D3 terms) for all XY components (Line, Area, Scatter, etc ...) by setting the
yDomain
property of XYContainer.Here's an example in React:
The yDomain value of
[0, undefined]
means that the lower limit will be 0 and the upper limit will be determined automatically based on the data.You can read more about controlling the chart's scales in the documentation: https://unovis.dev/docs/xy-charts/Container#ydomain