0

I want to plot the date vs the number graph with react google charts. I have the array of data and it has 93 entries. I have the data from 2015 to 2022 for every month. Means there will be 12 entries for each year. I have plotted the line graph, and the graph is showing perfectly except the x-axis label only shows the 2020. As I have set the width of 600, i will be difficult to show all the year on X-axis, but I want to show the year at least with 2-3 years gap. for eg. instead of just 2020, it should be 2015, 2017, 2019, 2021. If I increase the width from 600px to 1000px, then the chart shows all the years but it will break my UI, so increasing the width is not the solution for me. Here is my options object:

const options = {
chart: {
title: "My title",
},
width: 600,
height: 400,
}
Ketul s
  • 55
  • 1
  • 8
  • if you could provide a working example, it would help to answer. but there are some config options you can try, such as `hAxis.slantedText` and you can provide your own custom labels with `hAxis.ticks` – WhiteHat Sep 29 '22 at 14:34

0 Answers0