List of usage examples for org.jfree.chart.plot.dial DialValueIndicator DialValueIndicator
public DialValueIndicator()
DialValueIndicator
. From source file:org.rdv.viz.dial.DialPanel.java
/** * Creates the panel containing the dial. * //from www .java 2s. c om * @return the dial panel */ private JPanel createDialPanel() { plot = new DialPlot(dataset); plot.setDialFrame(new StandardDialFrame()); engineeringFormat = new EngineeringFormat(); engineeringFormatWithUnit = new EngineeringFormat(); dialValueIndicator = new DialValueIndicator(); dialValueIndicator.setOutlinePaint(Color.black); dialValueIndicator.setRadius(0.7); dialValueIndicator.setVisible(false); dialValueIndicator.setNumberFormat(engineeringFormatWithUnit); plot.addLayer(dialValueIndicator); dialTextAnnotation = new DialTextAnnotation(""); dialTextAnnotation.setRadius(0.8); plot.addLayer(dialTextAnnotation); DialPointer dialPointer = new DialPointer.Pointer(); dialPointer.setRadius(0.9); plot.addPointer(dialPointer); plot.setCap(new DialCap()); dialScale = new BoundedDialScale(); dialScale.setStartAngle(-120); dialScale.setExtent(-300); dialScale.setMinorTickCount(5); dialScale.setTickLabelFormatter(engineeringFormat); dialScale.setTickRadius(0.9); JFreeChart chart = new JFreeChart(plot); chart.removeLegend(); return new ChartPanel(chart); }