-
Notifications
You must be signed in to change notification settings - Fork 7
Reflow and loadContent/unloadContent sometimes cause y2-axis ticks to grow infinitelyΒ #275
Description
Bug Report
Description
I am reusing the same Graph instance between "loads" of data but will adjust some of the properties. Hence, I have been using Graph.reflowMultipleDatasets() and then calling Graph.unloadContent() with my prior content data and then loading new content. It seems there must be some circumstance that is causing the y2-axis upper/lower limit to continually grow. I have created a repo that recreates the issue for your convenience.
The reproduction uses the exact same GRAPH_DATA and CONTENT_DATA. This mimics my data fetching when the user hasn't changed any options (date range or results) so the same data structure is generated.
Graphs affected
- Bar graph
- Bubble graph
- Gantt chart
- Line graph (only tested with Line)
- Paired result
- Pie chart
- Scatter plot
- Timeline
Steps to Reproduce
- https://github.com/kczx3/carbon-graph-issues
- Steps are in the README
Link to CodeSandbox
Sorry, I can rarely get CodeSandbox to load for me. Hence, creating a repo for reproducing the issue.
Edit: Finally got CodeSandbox to load.
https://codesandbox.io/s/carbon-graph-y-axis-issue-ztmqd
Additional Context / Screenshots
You can see that the y2 data set is getting pinched.

Expected Behavior
With the same inputs, I'd expect the exact same graph output.
Possible Solution
Environment
- Component Name and Version: Carbon Graphs - Line Graph
- Browser Name and Version: Edge 95
- Node/npm Version: [e.g. Node 8/npm 5]
- Webpack Version:
- Operating System and version (desktop or mobile): Win 10 20H2