Hi Daniel,
Now I am getting other error as "Uncaught TypeError:
google.setOnLoadCallback is not a function" and the chart is not
displaying.The following is the code:

google.charts.load('current', {
  'packages': ['corechart']
});
google.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: {
        title: 'Size',
        baseline: 0,
        viewWindow: { min: 0 }
      },
      1: {
        title: 'Time',
        viewWindow: { min: 0 }
      }
    },
            //vAxis.baseline: 0,
            hAxis: {title: 'Method'},
             vAxis: {
                            viewWindowMode: 'explicit',
                            viewWindow: {
                                min: 0
                            }
                        },
            pointSize: 5,
            curveType: 'function',
            seriesType: 'bars',
            series: {
                5: {type: 'line', targetAxisIndex: 1}
            }
            };

        var chart = new
google.visualization.ComboChart(document.getElementById('chart_div'));
        chart.draw(data, options);
    }


On Tue, Nov 20, 2018 at 11:00 PM 'Daniel LaLiberte' via Google
Visualization API <google-visualization-api@googlegroups.com> wrote:

> vAxes: {
>       // Adds titles to each axis.
>       0: {
>         title: 'Size',
>         baseline: 0,
>         viewWindow: { min: 0 }
>       },
>       1: {
>         title: 'Time',
>         viewWindow: { min: 0 }
>       }
>     },
>
> On Tue, Nov 20, 2018 at 11:52 AM Naresh <naresh.marema...@gmail.com>
> wrote:
>
>> Yes I get you but can u help me in my code how to set the constrain for
>> both of them,so that it will be greatful for me to solve the problem
>>
>> On Tue, Nov 20, 2018 at 10:18 PM 'Daniel LaLiberte' via Google
>> Visualization API <google-visualization-api@googlegroups.com> wrote:
>>
>>> You have 2 vAxes, so you will have to constrain both of them since the
>>> each have a separate viewWindow. Hope that helps.
>>>
>>> On Tue, Nov 20, 2018 at 11:41 AM Naresh <naresh.marema...@gmail.com>
>>> wrote:
>>>
>>>> I have already kept viewWindow.min to 0 in the vaxis,but still not able
>>>> to cut-off the negative values.Please check my code once .
>>>>
>>>> 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: {
>>>>         title: 'Size',
>>>>         baseline: 0
>>>>       },
>>>>       1: {
>>>>         title: 'Time'
>>>>       }
>>>>     },
>>>>     //vAxis.baseline: 0,
>>>>     hAxis: {
>>>>       title: 'Method'
>>>>     },
>>>>     vaxis:{
>>>>     viewWindowMode:'explicit',
>>>>     viewWindow:{min:0}
>>>>     },
>>>>     pointSize: 5,
>>>>     curveType: 'function',
>>>>     seriesType: 'bars',
>>>>     series: {
>>>>       5: {
>>>>         type: 'line',
>>>>         targetAxisIndex: 1
>>>>       }
>>>>     }
>>>>   };
>>>>
>>>>   var chart = new
>>>> google.visualization.ComboChart(document.getElementById('chart_div'));
>>>>   chart.draw(data, options);
>>>> }
>>>>
>>>>
>>>> On Tue, Nov 20, 2018 at 10:04 PM 'Daniel LaLiberte' via Google
>>>> Visualization API <google-visualization-api@googlegroups.com> wrote:
>>>>
>>>>> The 'function' curve can result in negative values being generated,
>>>>> unfortunately.  But you can force a cut-off of all negative values, if you
>>>>> want, by using the viewWindow.min option, set to 0.
>>>>>
>>>>> On Tue, Nov 20, 2018 at 11:26 AM Naresh <naresh.marema...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Daniel,I have used the following data and code,but still negative
>>>>>> numbers are displaying for the yaxis.Can you please look into this as I
>>>>>> dont need to display negative values in the chart
>>>>>>
>>>>>> 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: {
>>>>>>         title: 'Size',
>>>>>>         baseline: 0
>>>>>>       },
>>>>>>       1: {
>>>>>>         title: 'Time'
>>>>>>       }
>>>>>>     },
>>>>>>     //vAxis.baseline: 0,
>>>>>>     hAxis: {
>>>>>>       title: 'Method'
>>>>>>     },
>>>>>>     vaxis:{
>>>>>>     viewWindowMode:'explicit',
>>>>>>     viewWindow:{min:0}
>>>>>>     },
>>>>>>     pointSize: 5,
>>>>>>     curveType: 'function',
>>>>>>     seriesType: 'bars',
>>>>>>     series: {
>>>>>>       5: {
>>>>>>         type: 'line',
>>>>>>         targetAxisIndex: 1
>>>>>>       }
>>>>>>     }
>>>>>>   };
>>>>>>
>>>>>>   var chart = new
>>>>>> google.visualization.ComboChart(document.getElementById('chart_div'));
>>>>>>   chart.draw(data, options);
>>>>>> }
>>>>>>
>>>>>>
>>>>>> On Tue, Nov 20, 2018 at 9:37 PM 'Daniel LaLiberte' via Google
>>>>>> Visualization API <google-visualization-api@googlegroups.com> wrote:
>>>>>>
>>>>>>> Here is the same code updated to use the latest version:
>>>>>>> https://jsfiddle.net/dlaliberte/cL2q5p1z/99/
>>>>>>>
>>>>>>> On Tue, Nov 20, 2018 at 12:21 AM Naresh Gupta <
>>>>>>> naresh.marema...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi Daniel,
>>>>>>>> Even though I used the below code,it didn't worked out for me and
>>>>>>>> the script i am using is <script type="text/javascript" src="
>>>>>>>> https://www.gstatic.com/charts/loader.js";></script> where as in
>>>>>>>> the jsfiddle its showing the old one.
>>>>>>>> Can you please give the latest solution for forcing the combo chart
>>>>>>>> to start from zero for y-axis.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Naresh Gupta
>>>>>>>>
>>>>>>>> On Sunday, 2 August 2015 00:28:44 UTC+5:30, Daniel LaLiberte wrote:
>>>>>>>>>
>>>>>>>>> Hi Tong,
>>>>>>>>>
>>>>>>>>> The abbreviation 'vAxis.baseline' actually means 'vAxis: {
>>>>>>>>> baseline: 0 }', though this is not particularly clear.  It works 
>>>>>>>>> though:
>>>>>>>>> https://jsfiddle.net/cL2q5p1z/2/
>>>>>>>>>
>>>>>>>>> On Sat, Aug 1, 2015 at 11:27 AM, Tong Sun <sunto...@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> Google Chart will automatically raise the Y-axis' minimum value,
>>>>>>>>>> so as to emphasis there differences.
>>>>>>>>>>
>>>>>>>>>> This is what I mean -- in https://jsfiddle.net/cL2q5p1z/1/, you
>>>>>>>>>> can see that Y-axis' minimum value is 1.400,000. How to force it
>>>>>>>>>> to zero, so as to emphasis on the comparative *total* size?
>>>>>>>>>>
>>>>>>>>>> I looked into
>>>>>>>>>> https://developers.google.com/chart/interactive/docs/gallery/columnchart
>>>>>>>>>> and found,
>>>>>>>>>>
>>>>>>>>>> vAxis.baseline: vAxis property that specifies the baseline for
>>>>>>>>>> the vertical axis.
>>>>>>>>>>
>>>>>>>>>> so I tried to use "vAxis.baseline: 0," as shown in the jsfiddle,
>>>>>>>>>> but that gave me an empty chart.
>>>>>>>>>>
>>>>>>>>>> Please help.
>>>>>>>>>> Thanks
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> 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-visua...@googlegroups.com.
>>>>>>>>>> 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
>>>>>>>>> dlali...@google.com   5CC, Cambridge MA
>>>>>>>>> daniel.l...@gmail.com 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
>>>>>>>> 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/7942adf4-8369-4706-a347-2742cebc11b5%40googlegroups.com
>>>>>>>> <https://groups.google.com/d/msgid/google-visualization-api/7942adf4-8369-4706-a347-2742cebc11b5%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>> .
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Daniel LaLiberte
>>>>>>> <https://plus.google.com/100631381223468223275?prsrc=2>
>>>>>>> dlalibe...@google.com <dlalibe...@google.com>   Cambridge 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
>>>>>>> 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/CAOtcSJNoCT4%2Bhk9URR6ykV0YRM3ObBHJmfJWpLB1MGJxL-RrcA%40mail.gmail.com
>>>>>>> <https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJNoCT4%2Bhk9URR6ykV0YRM3ObBHJmfJWpLB1MGJxL-RrcA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>> --
>>>>>> 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/CAOY9Fn%3DsSyw0346_vqAq%3DOhK4CJFMg%3DidQXSNhBBHvuBGES8ww%40mail.gmail.com
>>>>>> <https://groups.google.com/d/msgid/google-visualization-api/CAOY9Fn%3DsSyw0346_vqAq%3DOhK4CJFMg%3DidQXSNhBBHvuBGES8ww%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Daniel LaLiberte
>>>>> <https://plus.google.com/100631381223468223275?prsrc=2>
>>>>> dlalibe...@google.com <dlalibe...@google.com>   Cambridge 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 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/CAOtcSJM%3Dt9x9d-J6iCy1EUDO9j0pC%2BPPUemE%2BnuYwOinUy0k1w%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJM%3Dt9x9d-J6iCy1EUDO9j0pC%2BPPUemE%2BnuYwOinUy0k1w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>> --
>>>> 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/CAOY9FnkzYL%3DgUxRLHFL-Ga%3DRqfD%2BC2zJ7621fGSmg%3DCLo2N3Xw%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/google-visualization-api/CAOY9FnkzYL%3DgUxRLHFL-Ga%3DRqfD%2BC2zJ7621fGSmg%3DCLo2N3Xw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>> --
>>> Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
>>> dlalibe...@google.com <dlalibe...@google.com>   Cambridge 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 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/CAOtcSJMpAqPoeXysM2gAFR%2BvuM%2Bygu0tX9Cg_ms_kVHeFa%2BV4A%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJMpAqPoeXysM2gAFR%2BvuM%2Bygu0tX9Cg_ms_kVHeFa%2BV4A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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/CAOY9FnmLo%3D1ut_D9LuVmnPH%2BAjZRU8rwAFUB-507_U4rnvA%2BBw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/google-visualization-api/CAOY9FnmLo%3D1ut_D9LuVmnPH%2BAjZRU8rwAFUB-507_U4rnvA%2BBw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
> dlalibe...@google.com <dlalibe...@google.com>   Cambridge 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 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/CAOtcSJO%3DZstYYvN3Zk9AvMJejhUwMMKs96AGCoBKZWtXPDVipg%40mail.gmail.com
> <https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJO%3DZstYYvN3Zk9AvMJejhUwMMKs96AGCoBKZWtXPDVipg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAOY9FnmPupJKf66EWcq_pawm6gr8Ao5s20JeJit0kuLOhn8j%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to