Hi Steve,

If you could set up a publicly viewable page that demonstrates your code,
that would make it possible for me to debug it.

It is possible that the ChartWrapper's setView method has some bugs in it
that we are not aware of (I see only one simple test).    If it turns out
you have found a bug, it might be best to find an alternative way to
implement a similar effect, using your own DataView instead of the
ChartWrapper.


On Mon, Jan 6, 2020 at 6:35 AM 'Steven Lovell' via Google Visualization API
<[email protected]> wrote:

> Hi Daniel,
>
> Thanks for pointing me in the direction of data joins. That all seems to
> work and the filter is aligned to the correct data array. Unfortunately it
> seems to be a bit confusing trying to plot the data on the chart as it
> still filters out the default values.
>
> The issue seems to be in the code below, hopefully I'll crack it soon.
>
> Regards,
> Steve.
>
>     function setChartView () {
>         var state = columnFilter.getState();
>         var row;
>         var view = {
>             columns: [0]
>         };
>         for (var i = 0; i < state.selectedValues.length; i++) {
>             row = columnsTable.getFilteredRows([{column: 1, value:
> state.selectedValues[i]}])[0];
>             view.columns.push(columnsTable.getValue(row, 0));
>         }
>         // sort the indices into their original order
>         view.columns.sort(function (a, b) {
>             return (a - b);
>         });
>         if (state.selectedValues.length > 0) {
>           chart.setView(view);
>         } else {
>           chart.setView(null);
>         }
>         chart.draw();
>     }
>     google.visualization.events.addListener(columnFilter, 'statechange',
> setChartView);
>
> On Tuesday, 24 December 2019 10:19:44 UTC, Steven Lovell wrote:
>>
>> Hi All,
>>
>> I'm new to Google charts and was wondering if anyone out there knows if
>> it is possible to have a combo chart with filters that do the following.
>>
>> The stacked values should always be present on the chart and the filter
>> will only act upon the line data values.
>>
>> So far I can hide the stacked values from the filter. When using the
>> filter it removes the stacked section, only leaving the filtered values on
>> the chart. I've attached my attempt if anyone would like to take a look.
>>
>> Any help would be greatly appreciated.
>>
>> Regards,
>> Steve.
>> [image: Chart.PNG]
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/5e4e03b3-c0d7-4b25-8fb4-3409ff2bfb80%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/5e4e03b3-c0d7-4b25-8fb4-3409ff2bfb80%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
[email protected] <[email protected]>   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 view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJNAS6_zU4RK%3Dcub%2BxHgs719Cy5o_VSw34aVZaJyoc3Z1g%40mail.gmail.com.

Reply via email to