Hi,
Following is the code I have used to display only positive values in the 
axis but still its showing negative axis for zero values.Can you please 
suggest the solution for this problem.

<script type="text/javascript" 
src="https://www.gstatic.com/charts/loader.js";></script>
google.charts.load('current', {
  'packages': ['corechart']
});
google.charts.setOnLoadCallback(drawVisualization);
    
    function drawVisualization() {
        // Some raw data (not necessarily accurate)
        var data = google.visualization.arrayToDataTable([
            ['Method', 'Result size', 'conversion time (in seconds)'],
            ['veryfast',   0,    0],
            ['faster',     0,    0],
            ['fast',       0,    0],
            ['medium',     0,   0],
            ['slow',       0,   0],
            ['slower',     0,   0],
            ['veryslow',   0,  0]
        ]);
            
        var options = {
            title : 'ffmpeg preset comparison',
           vAxes: {
      // Adds titles to each axis.
      0: {
          viewWindow: { min: 0 },
        viewWindowMode: 'explicit'
      },
      1: {
      
        viewWindow: { min: 0 },
        viewWindowMode: 'explicit'
      }
    },
            //vAxis.baseline: 0,
            
            seriesType: 'bars',
            series: {
                5: {type: 'line', targetAxisIndex: 1}
            }
            };
            
        var chart = new 
google.visualization.ComboChart(document.getElementById('chart_div'));
        chart.draw(data, options);
    }



On Wednesday, 25 April 2012 20:14:23 UTC+5:30, asgallant wrote:
>
> Try setting the bar's axis viewWindowMode option to 'explicit' and the 
> viewWindow.min option to 0.
>
> On Wednesday, April 25, 2012 5:22:03 AM UTC-4, James Spibey wrote:
>>
>> Hi
>>
>> I'm using the combo chart to show some stats. The left x axis shows a bar 
>> chart and the right x-axis shows line charts.
>>
>> However, I have a problem when the left x-axis has zero values for the 
>> series, but the right x-axis does have values as you can see in the 
>> screenshot below
>>
>>
>> http://www.evernote.com/shard/s15/sh/70dfc54d-b9f8-41fe-b874-a184dde8c456/db962b9f60a101f8b30239be4d8e6d3d
>>
>> The left x-axis shows a range of between -1 and +1 when it should just be 
>> zero. I've tried playing with the minValue and maxValue of the vAxis 
>> property but to no avail.
>>
>> How can I fix this?
>>
>> Thanks
>>
>> James
>>
>

-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
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/3b80b2eb-88e0-4bd7-a618-332515078b7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to