I am using Google Visualisation to create line charts for my application. I have following requirements in that :
- Manipulating events on legends (like doubleClick, which I have solved somehow)
- Wrapping the legends in two rows avoiding pagination (Most imp and required)
I have gone through the following questions to get solution for my answers: 1) Issue with legend pagination (Google Interactive chart API) Issue : I would avoid playing with font-size because the number of legends may increase over time
2)How the legends on Google charts can be wrapped Issue: I do not want legends to be anywhere else than at the position:bottom. And maxLines solution does not work on position : bottom
3) Is there any way I can avoid pagination in legends of a google visualisation chart and show all the lines in two lines in a single page? Issue: This is another link, which mentions my problem, but no useful answers found on it.
4) Google Documentation : Heading : Chart Legend Text and Style chdl, chdlp, chdls [All charts] https://developers.google.com/chart/image/docs/chart_params#axis-label-styles-chxs Heading : Setting Chart Margines https://developers.google.com/chart/image/docs/chart_params#chart-margins-chma-all----charts Heading : Tooltips https://developers.google.com/chart/interactive/docs/customizing_tooltip_content#tooltips-an-introduction Comment : These are few google documentation links where few legend manipulating properties are mentioned, but still they does not solve my problem.
5)https://github.com/google/google-visualization-issues/issues/1286 Comment : This is the link where I can see that, google has not provided many properties to manipulate legends, and no much useful information to solve my issue
6) Google charts legend manipulation Comment : This is the only link, where I got a hint about how to solve my issue i.e. writing own legends. But there is no more links provided for documentation, no jsFiddle or no ref links apart from one link which is not useful for me.
While gone through all these, I can see only solution to solve my problem is to write my own custom legends. But I have no idea about how to write a complete element adding to google API.
Please guide me to go through this, any suggestions/links/refs/hints are welcome.
Thank you.
'ready'
event before displaying the legend. – Fauch