publiclab / simple-data-grapher

Turns CSVs into graphs in a few simple steps; embeds onto other websites!
https://publiclab.github.io/simple-data-grapher/
GNU General Public License v3.0
39 stars 52 forks source link

Update Graph feature #47

Open IshaGupta18 opened 5 years ago

IshaGupta18 commented 5 years ago

Describe the feature/solution you'd like I was thinking of implementing an "Update Graph" feature. We had this feature before the "Add Graph" feature was introduced, but now since we have multiple graphs, we have to write this feature again. But it would be a little tough since we'll have to save every graph's configuration even after it is plotted, which will be a heavy burden. The add graph feature might be substantial since the user can simply add another graph instead of updating the current one. But either ways, updating the graph is a good functionality to have. Also, we should have a delete graph feature as well. What is your take on both these? @jywarren @Souravirus @IgorWilbert @gauravano @namangupta01

Describe alternatives you've considered Add Graph is an alternate for this.

Propose ideas to implement this feature We will have to maintain a hash, with the graph id as key and it's configuration as it's value. Every time the user will click on "update graph" for a graph, we will reset the sample data tables and graph type table to the graph's configuration.