|
The Y axis seems to be dynamic and depends on the data. Is there a way to make it always start from 0 instead? |
Answered by
rokotyan
Nov 7, 2022
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 |
0 replies
Answer selected by
rokotyan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to 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
yDomainproperty 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