please help me to take the data for this chart onnetsourcing.com/vivera/chart.html
On Friday, 28 February 2014 03:44:15 UTC+5:30, Patrick Beaudan wrote: > > Thanks very much, worked great. > > On Mon, Feb 24, 2014 at 9:03 AM, asgallant <[email protected] > <javascript:>> wrote: > > Take away the hAxis.format option, and you will see what is going on. > Try > > these for your hAxis options instead: > > > > hAxis: { > > textStyle: { > > fontSize:10, > > color:'black', > > bold:'true' > > }, > > format: '####', > > ticks: data.getDistinctValues(0) > > } > > > > On Sunday, February 23, 2014 1:03:14 PM UTC-5, Patrick Beaudan wrote: > >> > >> My bar charts used to work fine until a few days ago, but I've noticed > >> today that the horizontal legend now shows multiple times the same > value. It > >> seems that the chart creates vertical lines interpolated between the > bars > >> and sticks a legend there even though that legend does not correspond > to a > >> bar. > >> > >> My JSON string for a stacked bar chart is > >> > >> {"cols":[{"label":"Year","type":"number"},{"label":"Positive > >> Months","type":"number"},{"label":"Negative > >> > Months","type":"number"}],"rows":[{"c":[{"v":2007},{"v":1},{"v":2}]},{"c":[{"v":2008},{"v":5},{"v":7}]},{"c":[{"v":2009},{"v":8},{"v":4}]},{"c":[{"v":2010},{"v":7},{"v":5}]},{"c":[{"v":2011},{"v":6},{"v":6}]},{"c":[{"v":2012},{"v":10},{"v":2}]},{"c":[{"v":2013},{"v":9},{"v":3}]},{"c":[{"v":2014},{"v":1},{"v":1}]}]} > > > >> > >> > >> the resulting chart horizontal axis displays twice 2007 (once without a > >> bar and once under the stacked bars), and so on for every year. > >> > >> I've tried using the option to show only every other legend, the > problem > >> is then that the chart picks up every legend that is not under the > stacked > >> bars, creating an even worse result. Could someone help me fix this? > >> > >> This is my function to create the data: > >> google.load("visualization", "1", {packages:["corechart"]}); > >> google.setOnLoadCallback(drawChart); > >> function drawChart() { > >> var jsonData = $.ajax({ > >> url: > >> "http://www.beladv.com/charts/custom/chart_customPositiveMonths.php", > >> dataType:"json", > >> async: false > >> }).responseText; > >> > >> var data = new google.visualization.DataTable(jsonData); // Create > our > >> data table out of JSON data loaded from server. > >> > >> var options = { > >> 'legend': {position: 'top'}, > >> 'colors': ['green' , 'red'], > >> 'vAxis': {minorGridlines: 'NULL', baselineColor:'blue', baseline:0, > >> maxValue: 12, gridlines: {count:5}, textStyle: {fontSize:10, > color:'black', > >> bold:'true'} }, > >> 'hAxis': {gridlines: {count:-1}, minorGridlines: 'NULL', textStyle: > >> {fontSize:10, color:'black', bold:'true'}, format:'####' }, > >> 'isStacked': true, > >> 'fontName':'Trebuchet MS' > >> }; > >> > >> var chart = new > >> > google.visualization.ColumnChart(document.getElementById('chart_customPositiveMonths')); > > > >> chart.draw(data, options); > >> } > >> > >> > >> > > -- > > You received this message because you are subscribed to a topic in the > > Google Groups "Google Visualization API" group. > > To unsubscribe from this topic, visit > > > https://groups.google.com/d/topic/google-visualization-api/oQvIZwE1rC4/unsubscribe. > > > > To unsubscribe from this group and all its topics, send an email to > > [email protected] <javascript:>. > > To post to this group, send email to > > [email protected] <javascript:>. > > Visit this group at > http://groups.google.com/group/google-visualization-api. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- > > Best Regards, > Patrick Beaudan > (415) 839-5239 > -- 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/a9634555-0fe4-4c4a-85e0-cd3215fb68d9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
