hatemalimam / ChartistJSF

Highly Customizable Responsive Charts for JavaServer Faces.
https://chartistjsf-showcase.herokuapp.com
Apache License 2.0
39 stars 12 forks source link

Bugfix: Support thresholds for bar charts #28

Open Hamsterbau opened 6 years ago

Hamsterbau commented 6 years ago

Like mentioned in the documentation, threshold plugin should also work for bar charts. But currently plugins are only usable for line charts because of missing support for plugins in bar chart.

LineRenderer.java:

if (chart.getPlugins() != null) {
    writer.write(",plugins:" + chart.getPlugins());
}

BarRenderer.java:

No part for handling plugins.

Fix should be easy, just add the lines from LineRenderer.java to BarRenderer.java.