Guided Charts Issue Rendering Output from Formula Variables

I’ve found what I can only think is a bug in Guided charts. It doesn’t seem to allow for any fluidity in dynamic input options via the formula builder.

I have a bunch of data but I want the user to be able to set the data view to be aggregated over time by day, week, month, etc.

The above image here is set to “date” in the “Field”. If I change it to “month_year” from my array:

It works perfectly.

But if I try and change the “Day”, “Week”, “Month” via the buttons (when clicked these set a variable value which corelates to the “Field” value that previously worked, e.g. [‘date’]) then it doesn’t work:

It seems as though when using variable functions to output the values in Guided mode that there is just a lack of flexibility. Is this the case? Another example is trying to set a color using the variable function input in Guided mode:

The color is set (I also added the array brackets) but the color hasn’t rendered on the chart.

I know I can use Advanced mode but the native aggregation in Guided mode saves me messing with JS. Any input most appreciated!

To follow on here, I have a feeling that this might have something to do with updating the chart.js chart after changing?

This link discussed the topic. I am going to try adding a variable to the conditional rendering of the chart element. Will revert…

That was it… hallelujah.

If anyone else struggles with this, you need to re-render the chart following changes using the formula builder variables in Guided mode. Wish I’d known this a few hours ago, of course!

@Joyce feels like we could perhaps add a native re-render of the chart to the plugin onChange at some point to save others in the future :slight_smile:

1 Like