Daniel, I see. Thank you. I assumed that I could use the same subset of SQL querying as used in Google Spreadsheets, which does not appear to be the case. So if I use a spreadsheet as a "data source" I will just have to have a worksheet where I display my intended query results, which can then be read by the Google Visualization API query. Does that make sense? The alternative being using the DataView class, as below.
I have been reading as much information on DataView as possible, including many examples from the forum posted by you, Andrew Gallant, and Sergey. It appears that it may be able to solve several other things I have been playing around with. Is something like this what you are referring to when using the DataView class with setColumnLabel method? var view = new google.visualization.DataView(data); view.setColumnLabel(1,'Header Title Example'); Thanks for your time Daniel. On Tuesday, February 23, 2016 at 1:26:12 PM UTC-5, Daniel LaLiberte wrote: > > The Query call by itself can only get what the Spreadsheet (or other data > source) provides. It doesn't provide a way of specifying how to customize > the data once it is returned, so you would have to modify the data table > once you have it in the browser. Also consider using a DataView instead: > https://developers.google.com/chart/glossary#dataview > > As another alternative you might want to consider, if you can use a > ChartWrapper to construct your chart, then you can also provide parameters > to specify a data source URL for the spreadsheet and a view parameter that > lets you construct the equivalent of a DataView. > > On Tue, Feb 23, 2016 at 12:21 PM, Jason <[email protected] <javascript:>> > wrote: > >> Hello again Daniel. >> >> That worked perfectly for the Line Chart. Thank you! >> >> In regards to custom column names via query statement is this possible? >> Or must you use the DataTable method setColumnLabel? >> >> Thanks again >> >> On Tuesday, February 23, 2016 at 11:55:32 AM UTC-5, Daniel LaLiberte >> wrote: >>> >>> For your line chart, there is a new option to specify the size of the >>> right side of the chart area. >>> >>> options = { >>> ... >>> chartArea: { right: 0 } >>> } >>> >>> You'll need to be using the 'current' version to get this feature. >>> https://developers.google.com/chart/interactive/docs/basic_load_libs >>> >>> On Tue, Feb 23, 2016 at 11:14 AM, Jason <[email protected]> wrote: >>> >>>> Update: Okay. The issue with the table custom label not showing from >>>> the spreadsheet query was solved by just manually increasing the style >>>> width in div. Simple enough. >>>> >>>> On Tuesday, February 23, 2016 at 10:58:42 AM UTC-5, Jason wrote: >>>>> >>>>> Hi!! >>>>> >>>>> So I have been trying to get a table chart with a custom column >>>>> name/label to appear. When I use the label function in the query for a >>>>> spreadsheet it works fine, but does not work as part of the Visualization >>>>> API. I tried to create a separate query in a spreadsheet with custom >>>>> labels >>>>> to query against the Visualization API but then get no column names at >>>>> all. >>>>> Does anyone know how to solve this? It is only a 2 row, 2 column table >>>>> (eg >>>>> 2 column names, 2 cells of numbers). >>>>> >>>>> Additionally I would like to eliminate the extra space on the right >>>>> side of a line chart, with NO legend. I tried messing with the chartArea >>>>> option by pushing the chartarea to the left then increasing the chartarea >>>>> width but it just messes it up. Here is a list of my options that work >>>>> but >>>>> produce a large blank space at the right end of the chart. >>>>> >>>>> var options = { >>>>> title: 'Line Chart, January 2016', >>>>> legend: { position: 'none' }, >>>>> width: 1000, >>>>> hAxis: { >>>>> title: 'Date', >>>>> format: 'M/d/yy', >>>>> textStyle: {fontSize: 10}, >>>>> gridlines: {count: 31} >>>>> }, >>>>> vAxis: { >>>>> title: 'Sales' >>>>> } >>>>> >>>>> }; >>>>> >>>>> Thanks for any help you can provide! >>>>> >>>> -- >>>> 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/37605408-0696-41be-9ce2-db7ad8cfef77%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/google-visualization-api/37605408-0696-41be-9ce2-db7ad8cfef77%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> >>> [email protected] 5CC, 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 [email protected] >> <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> 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/97424f80-5920-4688-879e-a3410e928dbe%40googlegroups.com >> >> <https://groups.google.com/d/msgid/google-visualization-api/97424f80-5920-4688-879e-a3410e928dbe%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> > [email protected] <javascript:> 5CC, 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 [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/ce80986b-04de-4b94-8347-be5db06e8579%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
