Column Chart: Incorrect Scale and graph

Skip to first unread message

Glady B

unread,
Oct 10, 2015, 12:28:46 PM10/10/15
to Google Visualization API

Here is my table, this is also the data rendered in the column chart


then here is my Column chart:
Take a look at the scale, from 22 it continues to 2 ,3 ,5 which seems to be incorrect.
Please advise.

Code:

<script type="text/javascript">
    google.load("visualization", "1", { packages: ["corechart"] });
    google.setOnLoadCallback(drawChart);
    function drawChart() {
        var data = new google.visualization.DataTable(@(Html.Raw(ViewBag.Data)));

        var options = {
            chart: {
                title: 'Incident Ticket by Status Per Month',
            },
            bars: 'vertical',
            vAxis: { format: 'decimal' },
            height: 400,
            Width: 1700,
            colors: ['Red', 'Yellow', 'Green', 'Orange', 'Blue'],

        };



        var chart = new google.charts.Bar(document.getElementById('chart_div2'));

        chart.draw(data, google.charts.Bar.convertOptions(options));
  
    }
</script>

Message has been deleted

Glady B

unread,
Oct 10, 2015, 12:51:58 PM10/10/15
to Google Visualization API
Another example:

 

Daniel LaLiberte

unread,
Oct 10, 2015, 6:15:12 PM10/10/15
to Google Visualization API
You didn't share your data, but it looks like you must be using strings rather than numbers.  Remove the quotes from your numbers and it will work better.

On Sat, Oct 10, 2015 at 12:51 PM, Glady B <gbo...@gmail.com> wrote:
Another example:

 

--
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-visualizati...@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.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/ebbc78c0-a6b0-4453-bd29-0d5633bb4f9b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
dlaliberte@Google.com   5CC, Cambridge MA
daniel.laliberte@GMail.com 9 Juniper Ridge Road, Acton MA
Reply all
Reply to author
Forward
0 new messages