The area chart will always use the baseline, if you provide it, as the 'base' of the area. So what you are seeing is correct given your baseline of 0. If you specify the baseline to be whatever value you want at the bottom of the chart, then it will use that instead. But you must also set the isStacked option to false in order to have a non-zero baseline. Also, if you set a non-zero baseline, you won't be able to highlight the gridline at 0.
On Tue, Apr 8, 2014 at 5:23 AM, <[email protected]> wrote: > Ok, thank you very much. > Here is my code : > function drawVisualization() { > var m, arr, data, chart, color; > m= 2000; > arr=[ > ['dist', 'dum1', 'dum2', 'elevation'], > [0, -m, m, -1000], > [10, -m, m, 1500], > [20, -m, m, -1000] > ]; > data = google.visualization.arrayToDataTable(arr); > color= "#FFAA55"; > chart = new > google.visualization.AreaChart(document.getElementById('dvChart')); > chart.draw( > data, { > 'isStacked': true, > 'width': 300, > 'height': 200, > 'title':'Elevations', > 'axisTitlesPosition': 'none', > 'legend': 'none', > vAxis: { > viewWindow: { > min: -m > } > }, > series: { > 0: { > "lineWidth": 0, > "color": color > }, > 1: { > "lineWidth": 0, > "areaOpacity": 0 > }, > 2: { > "lineWidth": 2, > "color": color > } > } > } > ); > } > > And the result : > > > > -- > 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 > http://groups.google.com/group/google-visualization-api. > For more options, visit https://groups.google.com/d/optout. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> - 978-394-1058 [email protected] <[email protected]> 5CC, Cambridge MA [email protected] <[email protected]> 9 Juniper Ridge Road, Acton MA -- 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 http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
