I need to include custom charts to a streamfield function, as you can find with Tauchart.
But how is it possible to a user to modify the data from the wagtail admin? I have absolutely no idea on how I can do this.
I'm pondering about a form but it's possible to add a form to a streamfield ? I think yes, I can do it with a link to an existing form. But that seems hard to make and not a good idea.
What do you think about? What is the best practice for you ?
Do you have any examples of Taucharts integration into a CMS?
You could make a custom block inside blocks.py, for example LineChartBlock() that references a template called line_chart.html. You'll need to import your custom block into your models.py file to add it to your StreamField. Then a user on the CMS admin side can enter values and save them as parameters. Which you can then pass into the template as dynamic JavaScript variables, which you can use to create your custom chart. Here's a super rough idea...
So blocks.py would look like this:
Your models.py:
Your template: