c3-angular-directive
c3-angular-directive copied to clipboard
Implement color.threshold
Can you implement color.threshold for gauges?
C3 Documentation at http://c3js.org/reference.html#color-threshold is not complete but here is a working example http://c3js.org/samples/chart_gauge.html.
@mdavid5 already implemented values property of this feature #68 but unit and max properties are missing.
Hi @noderino I am looking into this. Do you know by any chance if this configuration is specific to the Gauge? At the moment I have a color directive, but I am not sure whether this should be a generic feature or not. Based on the link you provided I would have to add support for this type of configuration:
color: {
pattern: ['#FF0000', '#F97600', '#F6C600', '#60B044'], // the three color levels for the percentage values.
threshold: {
// unit: 'value', // percentage is default
// max: 200, // 100 is default
values: [30, 60, 90, 100]
}
}
@jettro I'm also looking for this feature.. In fact I'd like to set dynamic thresholds (min/max) via the controller as well.. At the moment it appears you can only set static via http://jettro.github.io/c3-angular-directive/api-docs/0.7/chartGauge.html
Hi @jettro, "color.threshold" is specific to gauge chart. With commit https://github.com/jettro/c3-angular-directive/commit/4a8e40ae0411bea738e9c2756a416aa8bc2651f7 "color.threshold.values" property seems to be implemented correctly. I did not test it. We only need "color.threshold.unit" and color.threshold.max" properties.
Need to check the status in new c3 release and come with an example if it is possible.
can we also changes in
<chart-donut width="60" title="Attendance"/>
how to change title or other config in angularjs controller