On Mon, Oct 28, 2013 at 1:15 PM, GoogleChartsNewbie <[email protected]>wrote:
> Great! I see the values now. So in a couple of days I won't have to put > 1.1, I can keep it as 1? > Yep! 1.1 is our development version; 1 is guaranteed stable. > Also, is there documentation to explain view.setColumns? If not, can you > explain what each part does because I tried to apply your example to one of > my charts (see attached) but it won't show the values and only shows one of > the bar graphs (blue one). > Documentation is here: https://developers.google.com/chart/interactive/docs/reference#DataView_setColumns Jon > Here's my code: > > google.load("visualization", "1.1", {packages:["corechart"]}); > google.setOnLoadCallback(drawChart1); > > function drawChart1() { > var jsonData1 = $.ajax({ > url: "GetChartData1.php", > dataType:"json", > async: false > }).responseTex > > var data = new google.visualization.DataTable(jsonData1); > var options = {'title':'Super Slab Workload', > 'width':1300, > 'height':700}; > var chart = new > google.visualization.ColumnChart(document.getElementById('chart_div1')); > chart.draw(data, options); > > On Monday, October 28, 2013 12:26:11 PM UTC-4, Jon Orwant wrote: > >> In the line: >> >> google.load("visualization", '1', {packages:['corechart']}); >> >> change the '1' to '1.1'. Or you can wait a few days and it'll work >> automatically. >> >> Jon >> >> >> On Mon, Oct 28, 2013 at 12:09 PM, GoogleChartsNewbie >> <[email protected]>wrote: >> >>> That was it. I now see the graph but I do not see the values on each bar >>> graph. Attached is a screen shot. >>> >>> >>> On Monday, October 28, 2013 11:05:27 AM UTC-4, Jon Orwant wrote: >>> >>>> Looks like a spurious backslash ended up on the line below >>>> var chart = new google.visualization.ColumnCha****rt(document. >>>> getElementById('**fo**o')); >>>> >>>> Remove that and it should work fine. >>>> >>>> Jon >>>> >>>> >>>> On Mon, Oct 28, 2013 at 9:49 AM, GoogleChartsNewbie <[email protected] >>>> > wrote: >>>> >>>>> Hi Jon. >>>>> >>>>> Thank you for your reply. >>>>> >>>>> I pasted your code to my webpage, but the graph does not appear, the >>>>> webpage is blank. >>>>> >>>>> >>>>> On Friday, October 25, 2013 4:46:58 PM UTC-4, Jon Orwant wrote: >>>>>> >>>>>> Hello GoogleChartsNewbie, >>>>>> >>>>>> We'll have new documentation showing how to do this next week, but in >>>>>> the meantime, here's an example. It uses the annotation role and a view. >>>>>> >>>>>> <html> >>>>>> <head> >>>>>> <script type="text/javascript" src="https://www.google.com/**js**** >>>>>> api <https://www.google.com/jsapi>"></script> >>>>>> <script type="text/javascript"> >>>>>> google.load("visualization", '1', {packages:['corechart']}); >>>>>> google.setOnLoadCallback(**draw****Chart); >>>>>> >>>>>> function drawChart() { >>>>>> var data = google.visualization.**arrayToDa****taTable([ >>>>>> ['Year', 'Visitations'], >>>>>> ['2010', 10], >>>>>> ['2020', 14], >>>>>> ['2030', 16], >>>>>> ['2040', 22], >>>>>> ['2050', 28], >>>>>> ]); >>>>>> >>>>>> var view = new google.visualization.DataView(******data); >>>>>> view.setColumns([0, 1, >>>>>> { calc: "stringify", >>>>>> sourceColumn: 1, >>>>>> type: "string", >>>>>> role: "annotation" }, >>>>>> ]); >>>>>> >>>>>> var chart = new google.visualization.**ColumnCha**** >>>>>> rt(document.**getElementById('**fo**o')); \ >>>>>> >>>>>> chart.draw(view); >>>>>> } >>>>>> </script> >>>>>> </head> >>>>>> <body> >>>>>> <div id="foo" style="width: 900px; height: 500px;"></div> >>>>>> </body> >>>>>> </html> >>>>>> >>>>>> Jon >>>>>> >>>>>> On Friday, October 25, 2013 3:26:04 PM UTC-4, GoogleChartsNewbie >>>>>> wrote: >>>>>>> >>>>>>> Hi all. >>>>>>> >>>>>>> I created the attached Google column and bar charts on my website >>>>>>> but I don't know how to show the values of each column? If the end user >>>>>>> hovers over the column it will show them the value, but I would like to >>>>>>> show it on the graph itself without having to hover over it with the >>>>>>> mouse. >>>>>>> How can I do this? Is there an option I should be looking at? >>>>>>> >>>>>>> Thank you in advance! >>>>>>> >>>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Google Chart API" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to google-chart-a...@**googlegroups**.com. >>>>> To post to this group, send email to google-c...@googlegroups.**com. >>>>> >>>>> Visit this group at http://groups.google.com/**group** >>>>> /google-chart-api <http://groups.google.com/group/google-chart-api>. >>>>> For more options, visit >>>>> https://groups.google.com/**grou**ps/opt_out<https://groups.google.com/groups/opt_out> >>>>> . >>>>> >>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Google Chart API" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to google-chart-a...@**googlegroups.com. >>> To post to this group, send email to google-c...@googlegroups.**com. >>> Visit this group at >>> http://groups.google.com/**group/google-chart-api<http://groups.google.com/group/google-chart-api> >>> . >>> For more options, visit >>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> >>> . >>> >> >> -- > You received this message because you are subscribed to the Google Groups > "Google Chart 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 http://groups.google.com/group/google-chart-api. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Google Chart 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 http://groups.google.com/group/google-chart-api. For more options, visit https://groups.google.com/groups/opt_out.
