Chart dynamic datasource

Hey @p.siontoros!

Thanks for flagging this! This does look like a bug so I've gone ahead and built out a repro app/ bug report and will update this thread once a fix is merged. In the meantime, one workaround here could be to filter on the results of your multi-select component.

You could build out a pre-loaded javascript function to do the following:

window.filterChartInputs = (array, data) => {
  return data.map(row=> {
    let newRow = {}
    array.forEach(col=>newRow[col]=row[col])
    return newRow
  })
}

This would filter the tables data for any columns returned from the array. Next, you could call this function using your data in the chart component using something like:
{{filterChartInputs(multiselect1.value,table1.data)}}

Screen Recording 2021-07-23 at 5.20.46 PM.mov-42AED6D1-8D4D-4EC0-9E53-1C2D56AEEE9A

Do you think this could work for your use case here?