react-charts
react-charts copied to clipboard
How can i hide the xAxes and yAxes numbers/values and background lines?
Hello all, i have this chart (see image) and i want to hide the xAxes and yAxes (those numbers, 180, 160, 140, i dont want to see them) .
if i do document.getElementById('axes').remove in console, it works, but does exists another way?
This seems to work for me: In the axis options, return an empty string in the scale formatter, e.g.
const secondaryAxes = React.useMemo(
(): AxisOptions<DailyStars>[] => [
{
formatters: {
scale: () => '',
To hide the background lines, use showGrid
, e.g.
const secondaryAxes = React.useMemo(
(): AxisOptions<DailyStars>[] => [
{
showGrid: false,
@bmaupin Hi there, thanks for the above code it helped a lot :)
But i also want to hide the borders on x and y axes. Is there any way to hide them also?