@Override
protected void encodeOptions(FacesContext context, Chart chart) throws IOException {
super.encodeOptions(context, chart);
ResponseWriter writer = context.getResponseWriter();
MeterGaugeChartModel model = (MeterGaugeChartModel) chart.getModel();
String gaugeLabel = model.getGaugeLabel();
double min = model.getMin();
double max = model.getMax();
Integer intervalInnerRadius = model.getIntervalInnerRadius();
Integer intervalOuterRadius = model.getIntervalOuterRadius();
encodeNumberList(context, "intervals", model.getIntervals());
encodeNumberList(context, "ticks", model.getTicks());
if(gaugeLabel != null) {
writer.write(",gaugeLabel:\"" + gaugeLabel + "\"");
writer.write(",gaugeLabelPosition:\"" + model.getGaugeLabelPosition() + "\"");
}
writer.write(",showTickLabels:" + model.isShowTickLabels());
writer.write(",labelHeightAdjust:" + model.getLabelHeightAdjust());
if(intervalInnerRadius != null) writer.write(",intervalInnerRadius:" + intervalInnerRadius);
if(intervalOuterRadius != null) writer.write(",intervalOuterRadius:" + intervalOuterRadius);
if(min != Double.MIN_VALUE) writer.write(",min:" + min);