import org.knowm.xchart.DialChart;
import org.knowm.xchart.DialChartBuilder;
import org.knowm.xchart.SwingWrapper;

/**
 * Dial Chart
 *
 * <p>Demonstrates the following:
 *
 * <ul>
 *   <li>Dial Chart
 *   <li>DialChartBuilder
 */
public class xchart_dial {

  public static void main(String[] args) {

    DialChart chart = getChart();
    new SwingWrapper<>(chart).displayChart();
  }

  static public DialChart getChart() {

    // Create Chart
    DialChart chart =
        new DialChartBuilder().width(800).height(600).title("Dial").build();

    // Series
    chart.addSeries("Rate", 0.9381, "93.81 %");
    chart.getStyler().setToolTipsEnabled(true);
    chart.getStyler().setLabelVisible(true);
    chart.getStyler().setLegendVisible(false);
    return chart;
  }

}

