Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Dynamically generating charts with quickchart

76 1
cancel
Showing results for 
Search instead for 
Did you mean: 

I've been successful using Airtable data with quickchart.io to create charts that can be viewed in airtable or placed in Documint templates. 

What I'm trying to do now is "dynamically" code the chart inputs vice "hard coding"

Specifically: I would like to select the fields to plot using a multi-select field and have that dynamically encode the chartURL. 

Example: FieldsToPlot includes 4 items (Units, Rate, Shared, Credit)- and from this I need to dynamically create this code:
"&data1=" & ARRAYJOIN({Units}, ",") & "&data2=" & ARRAYJOIN({Rate}, ",") & "&data3=" & ARRAYJOIN({Shared}, ",") & "&data4=" & ARRAYJOIN({Credit}, ",")

I can use substitute() to alter the data from FieldsToPlot- but I'm stuck on incrementing the number since it won't always be 4 items. I've thought of using a count function to determine how many items, but I'm not sure how to increment the number in a formula without using a loop.. 

Anyone have any experience doing something like this?

1 Reply 1

Technically, you could solve this problem by hardcoding even more heh

Here's what I managed to come up with, works up to 150 select options:

Screenshot 2022-12-17 at 8.06.26 PM.png
I've DMed you the formula