Charter and dynamic data

Stuart, how can I load data dynamically into charter?
I would like Charter to read data from stacks like Pi or Feeds or even a plain form. Is that possible? If not, could it become possible?
Cheers, Erwin

Charter needs to read from a csv file but it does allow you to dynamically change the csv it points to (e.g. via a url parameter) but at the end of the day it does need a csv as the data source. If you can write your data to a csv then you could have charter point to it - though that is not a particularly easy solution to implement.

I have Charter 2 about half done* and it will have more options around tapping into data from different sources.

* it has been half done for a long time so no clear timeline for getting it out there.

1 Like

Maybe editing that csv-file with a stack like CSVcrud would be feasible:

Thanks @wolf though using a CSV isn’t really an option as the visitor enters their data and that data is for every visitor different. I could create unique CSV files but don’t think ending up with a ton of uniquely named CSV files would be wise.

@habitualshaker charts.js is used, right? Could i use its functions addData and removeData?

If that’s possible I could use Pi?

Yes - is chart.js that is used in the stack. Worth noting that it is v2 though (think we are now at v4).

Stuart, in a comment you talk about using dynamic URLs with Charter. I also recall a blog post. However I cannot find the article and or instructions on how to achieve this. Can you help me please?

Hi @Konfuzzious -

Yes that is right. I seem to have lost that page in my site refresh :).

Here is a example of that approach though. And here is a related demo project.

1 Like

Awesome! Thank you.