Hi Germán,

The 'maxLines' option specifies the *maximum* number of lines that would be
used, it does not guarantee that 2 lines will always be used. If some text
needs to be wrapped, then it will be wrapped up to two lines; if the text
never needs to be wrapped, then the option will effectively be ignored.

Moreso, the 'maxLines' option is disabled for legend: position: 'top'.

On Thu, Jan 28, 2016 at 10:42 AM Germán Kuchen <[email protected]>
wrote:

> Hello. When I put the next code:
> <html xmlns="http://www.w3.org/1999/xhtml";>
>   <head>
>     <!--Load the AJAX API-->
>     <meta content="text/html; charset=iso-8859-1"
> http-equiv="Content-Type">
>     <script type="text/javascript" src="https://www.google.com/jsapi
> "></script>
>     <script type="text/javascript">
>
>       google.load('visualization', '1.0', {'packages':['corechart']});
>       google.setOnLoadCallback(drawChart);
> function drawChart() {
>         var data = google.visualization.arrayToDataTable([
>     ['Tipo', 'Cantidad'],
>         ['SECUNDARIO: 25939', 25939],
>     ['PRIMARIO: 14304', 14304]
>     ]);
>
>   var options = {'colors':
> ['#F58426','#DFD378','#63544A','#B4D8DD','#FBC49C','#E0DDDB','#F58426','#DFD378','#63544A','#B4D8DD','#FBC49C','#E0DDDB'],
>         'chartArea':{left:0, top: '30%', width:'100%', height:'70%'},
>         'tooltip': {text:'percentage', showColorCode:true,
> ignoreBounds:true},
>         'legend':{position: 'top',maxLines: 2},
>      'width':236
>     };
>
>         var chart = new
> google.visualization.PieChart(document.getElementById('chart_div'));
>         chart.draw(data, options);
> }
>     </script>
>   </head>
>
>   <body>
>     <div id="chart_div"></div>
>   </body>
> </html>
>
> The graph don't show the legend with 2 rows, what is the problem?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to
> [email protected].
> Visit this group at
> https://groups.google.com/group/google-visualization-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/d50b89bc-e50c-4671-b1b0-f58706b49e71%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/d50b89bc-e50c-4671-b1b0-f58706b49e71%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 

*[image: unnamed.gif]• Sergey Grabkovsky• Software Engineer• Google, Inc•
[email protected] <[email protected]>*

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAEwwup5Vi-KQOXY8DK63dfEr%3DXjU4hYvXbg4g7Ks_q%3D0-zcW%3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to