You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, incredible Library. Thank you.
Have a hit a snag, that is probably user error. Code at the bottom of this message.
I have a line chart, with a VictoryZoomContainer. In its default state, all seems to be working.
But I want to style the axis. So I drop a couple of <VictoryAxis /> components in. One for each axis.
If I provide no data to the chart: <VictoryLine data={[]} />
then all my formatting works great. Of course, with no data.
But when I actually set the data to a datasource, as soon as it loads the data it wipes away some of the VictoryAxis settings.
Strangely, not all settings are lost. But, for example, y axis location (orientation='right') and y-axis gridlines.
Even then, the y-axis labels and ticks are formatted as 'right', but located on the left!
CORRECT STYLING (NO DATA), data = {[]}:
BROKEN STYLING (DATA PROVIDED) data = {dummyData.readingHistory}:
I suspect I'm not understanding how to use the <VictoryAxis /> or one of the other components. Hoping someone can fix me!
p.s. For others who have been trying to figure out how to perfectly size the VictoryChart to its parent container, see the relevant code below, using 'use-resize-observer'. Link is in the code. Works a treat.
@skavan apologies for the delay. I think this issue here is not actually the styling, but the axis offset not being calculated correctly when the domain changes. I think it's related to this issue: #1717
We're looking into these next. Thanks for your patience.
First off, incredible Library. Thank you.
Have a hit a snag, that is probably user error. Code at the bottom of this message.
I have a line chart, with a
VictoryZoomContainer
. In its default state, all seems to be working.But I want to style the axis. So I drop a couple of
<VictoryAxis />
components in. One for each axis.If I provide no data to the chart:
<VictoryLine data={[]} />
then all my formatting works great. Of course, with no data.
But when I actually set the data to a datasource, as soon as it loads the data it wipes away some of the VictoryAxis settings.
Strangely, not all settings are lost. But, for example, y axis location (orientation='right') and y-axis gridlines.
Even then, the y-axis labels and ticks are formatted as 'right', but located on the left!
CORRECT STYLING (NO DATA), data = {[]}:
BROKEN STYLING (DATA PROVIDED) data = {dummyData.readingHistory}:
I suspect I'm not understanding how to use the
<VictoryAxis />
or one of the other components. Hoping someone can fix me!p.s. For others who have been trying to figure out how to perfectly size the VictoryChart to its parent container, see the relevant code below, using 'use-resize-observer'. Link is in the code. Works a treat.
Full code:
The text was updated successfully, but these errors were encountered: