Using google area chart: http://code.google.com/apis/chart/interactive/docs/gallery/areachart.html
Does anyone know how I can freelly manipulate the legends?
Pretty much I want one of two:
I would avoid hacks to manipulate the svg within the iframe btw.
Specify Chart Size One very common option to set is the chart height and width. You can specify the chart size in two places: in the HTML of the container <div> element, or in the chart options. If you specify the size in both locations, the chart will generally defer to the size specified in the HTML.
The Legend is hidden by setting the legend property to none in the Google Chart Options. title: 'USA City Distribution', legend: 'none' // Hides the Legend.
While the dynamic and interactive Google Charts are actively maintained, we officially deprecated the static Google Image Charts way back in 2012. This gives us the right to turn it off without notice, which may happen soon.
For full control I'd suggest turning them off
legend : { position:"none"}
Creating your own totally customised legend outside the chart with html.
Then binding your custom legend up to the chart using the select event, combined with click or hover / focus events (whatever you want) on your custom legend.
see https://code.google.com/apis/ajax/playground/?type=visualization#interaction_using_events for a start.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With