Categories
JavaScript Answers

How to hide the legend in Google Chart with JavaScript?

Spread the love

Sometimes, we want to hide the legend in Google Chart with JavaScript

In this article, we’ll look at how to hide the legend in Google Chart with JavaScript.

How to hide the legend in Google Chart with JavaScript?

To hide the legend in Google Chart with JavaScript, we set the legend property to 'none'.

For instance, we write

const options = {
  //...
  legend: "none",
};

to set legend to 'none' in the options object to hide the legend.

Conclusion

To hide the legend in Google Chart with JavaScript, we set the legend property to 'none'.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *