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.