How to hide the labels representing the x-value at the bottom on VictoryCharts?
You should be able to do something along the lines of <VictoryAxis tickFormat={() => ''} />
By default VictoryChart will include two axis, so you will have to explicitly include VictoryAxis within VictoryChart so that you can pass props to it.
Gotcha. Works. Thanks. Is there any way to format the Y axis labels?
Let's say i have 3 numbers in the Y axis: 0.2, 0.4, 0.6.
1) How i can i make them display 0.20, 0.40, 0.50
2) How can I show more numbers? I tried using the range prop, but couldn't get it to work. Eg. I want to display 0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90 1.0 instead of just 0.20, 0.4 and 0.60?
3) Is it possible to set a fixed amount of X labels displayed? Say I have 20 data points for X, but i only want to show 7 labels but still show 18 x values on the chart? In my case I have 18 data points for a 7 day period.
tickFormat={(datum) => datum.y.toFixed(2)}tickCount and tickValues props on VictoryAxistickFormat as well.@NgoKnows Thanks for jumping in on this. I'm going to close this issue now.
Thanks for the help :)
Thanks for help, too.
How can I hide the values/label showing data on line chart ?
How to represent minute values for x axis which can also adjusts as per the current hour
Most helpful comment
You should be able to do something along the lines of
<VictoryAxis tickFormat={() => ''} />