Just adding a further comment to this: it seems odd to me that the API forces me to format data twice: once with NumberFormat and a second time for chart axes. Shouldn't there be a way for chart axes to inherit the data format already defined by NumberFormat? It would save a lot of trouble if that was possible.
On Wed, Sep 2, 2015 at 5:44 PM, <[email protected]> wrote: > Hi, > > I'm trying to find a way to use multiple category filters to display > filtered views of a data table in line chart form. The data is a table with > time series columns representing different categories/subcategories, some > of which are dollar amounts and some are ratios of these amounts (expressed > as percentages). > > My approach has been to adapt Andrew Gallant's code converting data > columns into rows and using the dashboards to filter that from an initial > default state. Because I need to be able to display dollar and percentage > quantities in the same chart container, I have to apply two formatting > routines 1) a NumberFormat rule applied to the data table, which gets the > tooltip quantities right, and 2) Two chart wrappers with vAxis formats for > dollars and percentages respectively. I then use a setView function to draw > chart1 or chart2 depending on an if/else test for data type. > > The problem is that while this works for the initial default state (say > chart1) and for the first time the dashboard control changes the data type > (displaying chart2), it doesn't allow the user to make any changes > subsequently. This is the case even though I have checked that the computer > is correctly performing the if/else test and therefore is trying to execute > the correct chart display every time there is a control event. > > I am mystified why the Google Visualization API won't let me draw a chart > more than twice. The only way out I can see is to have separate <div>'s for > each chart but I don't want to do that. Perhaps there is a fundamentally > better way of approaching this problem within the framework you provide. > > All assistance appreciated. > > Nick > > -- > 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/05NLFG5r6HI/unsubscribe > . > To unsubscribe from this group and all its topics, 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-visualization-api. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-visualization-api/2c195155-0502-49ba-b0d2-5d83182d937a%40googlegroups.com > <https://groups.google.com/d/msgid/google-visualization-api/2c195155-0502-49ba-b0d2-5d83182d937a%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 http://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/CAO5F7cujRxSpn5QkAV89n6QRayq1dXLJDAWraw9j3s9r3h3F%2Bw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
