Hello Team, Below is my code and my requirement is to disable the sort.
I want the graph to be plotted like AAA[600],CCC[200],BBB[400] respectively. But Actually it is plotting like CCC[200],BBB[400],AAA[600] based on the sum values it is plotting the graph . Please help me out how I can Achieve my requirement . Belowis the Code Snippet of the chart . <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script> google.load('visualization', '1', {packages:['corechart'], callback:createCharts}); function createCharts() { drawRolesChart(); } function drawRolesChart() { var data = new google.visualization.DataTable(); data.addColumn('number', 'id'); data.addColumn('string', 'customername'); data.addColumn('number', 'revenue'); data.addRow([1,'AAA', 300]); data.addRow([2,'CCC', 200]); data.addRow([3,'AAA', 300]); data.addRow([4,'BBB', 400]); var agg_MAX_REVENUE = google.visualization.data.group(data, [1],[ {'column':2, 'aggregation':google.visualization.data.sum, 'type': 'number',label:'revenue'}]); agg_MAX_REVENUE.sort({column: 1, sort: 'disable'}); var chart = new google.visualization.ColumnChart(document.getElementById('roles_chart_sum')); chart.draw(agg_MAX_REVENUE, {width: 400, height: 300, legend:'none'}); } </script> <body> <div id="roles_chart_sum"></div> Thanks, Naresh -- 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/90cdfbb4-7be6-4f9d-bf00-83a76f192e59%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
