Export the useChartContext hook #294
Unanswered
RichardNolan
asked this question in
Ideas
Replies: 1 comment
-
You can create a component and import the useChartContext hook.
then you can render it inside the component using the renderSVG method.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need to add a line at the 0 index of the secondaryAxis. I can use the renderSVG option to draw the line, but have no context for the chart to determine the position of the line. Locally, to test, I have exposed the useChartContext hook and now any component rendered using renderSVG has access to the entire context (though its not typed). With that I could use the secondaryAxes.scale(0) to get the position and get the height and the gridDimensions for offsets.
Beta Was this translation helpful? Give feedback.
All reactions