X-axis does not show all the labels

Skip to first unread message

Ketul s

Sep 28, 2022, 2:17:40 AM9/28/22
to Google Visualization API
I want to chart the date vs the number graph.
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 atleast 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,
Reply all
Reply to author
0 new messages