Here is my sample code
Code: Select all
MeterPlot plot = new MeterPlot(dataset);
Color c1 = new Color(255,79,100);
Color c2 = new Color(252,252,106);
Color c3 = new Color(79,255,132);
plot.addInterval(new MeterInterval("Low"));
plot.addInterval(new MeterInterval("Medium") );
plot.addInterval(new MeterInterval("High"));
plot.setUnits ("%");
plot.setDialBackgroundPaint (Color.DARK_GRAY);
plot.setNeedlePaint (Color.BLACK);
plot.setShadow (false);
plot.setDialShape (DialShape.CHORD);
plot.setMeterAngle (180);
JFreeChart chart = new JFreeChart("Meter Chart 2",
JFreeChart.DEFAULT_TITLE_FONT, plot, false);
chart.setBackgroundPaint (Color.WHITE);
return chart;
Gopi