Re: [visualization-api] chartRangeFilter separate values from Table

41 views
Skip to first unread message
Message has been deleted

Daniel LaLiberte

unread,
Feb 3, 2016, 11:55:50 AM2/3/16
to Google Visualization API
Jason,

Your subject says ChartRangeFilter, but the code you reference uses a CategoryFilter.   But regardless, your question is independent of that.

You also mention using a RangeFilter to change the value in your spreadsheet.  But nothing in the Google Charts is able to change data in the spreadsheet.

If you want to fetch a different part of your data, say based on user interaction, then after fetching the new data by doing another query, you'll need to draw your charts and controls again with the new data.  If you are using a Dashboard around your charts and controls, then draw the dashboard again with the new data.  

Hope that helps.

On Wed, Feb 3, 2016 at 10:58 AM, Jason <jgdk...@gmail.com> wrote:
Hey! INTRO: I am messing around with the Visualization API. I've created dynamic charts, tables and graphics in the past with Excel no problem. I would like to transition to using Google for more flexibility and ease of sharing. I made some dynamic tables (using pivots, vlookups, and indexing) that correspond to charts and graphs in a spreadsheet. Now I would like to get familiar with display this data in HTML/JS formats for a simple dashboard so everyone does not have to share the spreadsheets to view the data.

PROBLEM: I have successfully linked my spreadsheet to a test JSFiddle to collect the data I want. Now I would like to have it update, similar to a vlookup, the data in I2,J2,K2 based on the string in H2. The list values are in A2:A24. So I would like the RangeFilter to change the value in the spreadsheet based on the value selected from the list, thereby updating the vlookup and changing the data. Is this the correct path of thought or is this simply a read-only application? Or a simpler way of accomplishing this perhaps? Thoughts appreciated.

var queryString = encodeURIComponent('SELECT H,I,J,K');

  var chartRangeFilter = new google.visualization.ControlWrapper({
    'controlType': 'CategoryFilter',
    'containerId': 'control_div',
    'options': {
      'filterColumnIndex': 0
    }

MY THOUGHTS: I thought maybe to call the pivot table, not display it then use that data to draw the chart and use the first column of the pivot as the list? Not sure how to accomplish that though.

--
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 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/4fef1818-6d39-43f4-8e10-b7f63ff7398a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Message has been deleted

Jason

unread,
Feb 3, 2016, 5:36:33 PM2/3/16
to Google Visualization API
Daniel,
I deleted my original post as it was no longer on task.
Took your advice and created a new project on JSFiddle after reading more documentation. I got a working prototype for about what I want, just a tad simpler! It correctly pulls my table and the control works. I also have a pie chart though and have some trouble with it.
My next question for you: Is it possible to set my pieChart to view a specific range? In this case from the spreadsheet data called it would be the totals found in the last row. Row 24, columns 1, 2, 3, 4.
eg: 'view': {'range':[xy:xy]}
var pieChart = new google.visualization.ChartWrapper({
          'chartType': 'PieChart',
          'containerId': 'chart_div',
          'options': {
            'width': 300,
            'height': 300,
            'pieSliceText': 'value'
          },
          //'view': {'columns': []}

Thanks for all your assistance and patience with an inexperienced person!
Reply all
Reply to author
Forward
0 new messages