data-ui
data-ui copied to clipboard
X / Y axis center
Hi, I was wondering if there is a quick way to position the X/Y Axis in the center of the graph (or in different positions based on dynamic median)?
This is essentially what i am trying to achieve...
Hey @si-harps, thanks for checking out @data-ui
. This isn't currently supported, but it's a great suggestion!
I think it wouldn't be too hard to implement, I think we'd just need to update the Axis
components to take some type of offset
prop, specifying the value of the other axis to place it at (e.g., in your example, <YAxis xIntersection={7500} />
. I'd welcome a PR for this, else will add it to the list and will try to tackle it with a offset bug fix sometime this week.
Hi @williaster, thanks for the quick reply. I'll take a look at this today. Adding an xIntersection/yIntersection prop sounds like a great idea. Will get back to you asap