-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[jqplot] allow more / flexible options vs. switching to other charting library #633
Comments
P.S. any change should not break existing settings |
Great idea! Updates to SRF are always very welcome. |
message to self: looking at this issue today, I'm not sure if it's worth maintaining JqPlot which seems to be inactive since 2018. We should consider alternative charting/visualization libs like https://github.com/apache/echarts or enhancing D3 format. |
I am in favor of switching so something that is maintained. 5 year old code might also involve secuirty issues. D3 is not an alternative hiere, since SRF already is supporting it (and probably could do better), it is also very complex compared to jqplot. I don't know echarts. It's looking good. Also found this: https://github.com/chartjs/Chart.js I think we should think about branching SRF to version 5 at some point, where we also discontiue other obsolete formats such as exhibit, But this should be handled in a different ticket. Also to consider: there are at least 7 other issues qith jqplot, so starting a clean written result format based on a new, maintained library might also be a better idea reagarding effort. |
Based on this article https://medium.com/bazaar-tech/best-js-charting-libraries-99e3edfddc64 it seems that Charts.js could be the better option to replace jqplot, because it is simpler. We have D3.js support, so we have the complex end covered as well. |
Currently, jqplot SRF does provide a subset of options available in the jqplot lib, see https://www.semantic-mediawiki.org/wiki/Help:Jqplotchart_format and http://www.jqplot.com/docs/files/optionsTutorial-txt.html
For example, the Grid allows http://www.jqplot.com/docs/files/jqplot-core-js.html#Grid
Styling the jqplot SRF is limited at the moment, because it renders a canvas based on options provided. This does only allow limited styling via CSS. For example it is not trivial, to change the canvas border's width.
I suggest to replace the approach to use a theme (which can not be easily modified on a per query basis) to allow more flexible options.
SemanticResultFormats/formats/jqplot/SRF_jqPlotChart.php
Line 225 in 670487b
to be replaced with something like
This could be used for all options provided by the differen jqplot classes, like Grid, Axis, Legend and so on.
@JeroenDeDauw @kghbln @krabina what do you think?
The text was updated successfully, but these errors were encountered: