Google Charts: Moving Legend Positions

I use Google Charts to visualize data on my website. I have a problem with "visualization" 1.1 and the "pakcages" line:

google.load('visualization', '1.1', {packages: ['line']}); 

I am trying to put the legend column down, and other types of Google Chart use the following line and it works:

 var options = { legend: { position: 'bottom'} }; 

But there is no work with this type of diagram, it puts the legend column to the right, as you can see in this image of my network:

Thanks!

+5
source share
2 answers

I believe the syntax is as follows:

 var options = { legend: 'bottom' }; 

A source

EDIT: Actually, it doesn't seem to be supported yet. Just right or not. A source

+4
source

Try it.

 legend: { position: 'top', alignment: 'end' }, 
+3
source

Source: https://habr.com/ru/post/1238769/


All Articles