You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if it could be possible to provide an API using composition DP to build graphs in order to improve code extensibility, reuse, and readability.
For example :
classMyCurveextends??? {attach(chart){chart.data.datasets.push({...});// ... potentially changes other options.}detach(){//...}}mychart.addCurve(newMyCurve());// call MyCurve.attach(mychart)mychart.addAxis(newAxisLabelWhatever('x',['Toto','titi']));
Indeed, in big graphs, configurations can quickly become a big chunk, hard to read.
Providing an API using composition DP would enable to better split big chunks of configurations, and facilitate code reusing/extensibility.
This would also enable to easily move curves (or other elements) from one graph to another, e.g. for a GUI graph editor or whatever.
Feature Proposal
Hi,
I wonder if it could be possible to provide an API using composition DP to build graphs in order to improve code extensibility, reuse, and readability.
For example :
Indeed, in big graphs, configurations can quickly become a big chunk, hard to read.
Providing an API using composition DP would enable to better split big chunks of configurations, and facilitate code reusing/extensibility.
This would also enable to easily move curves (or other elements) from one graph to another, e.g. for a GUI graph editor or whatever.
Possible Implementation
In a project I started (a PoC for an HTML binding of Chart.js), I use compositions DP with HTML elements :
https://github.com/denis-migdal/ChartsHTML
The JS code behind uses a composition DP, so this is a PoC for a possible implementation.
The text was updated successfully, but these errors were encountered: