I have created a thermometer chart with JFreeChart, but I want to change the mercury color in thermometer. How can I do this? Here is my code so far; please explain where to change this code:
final DefaultValueDataset dataset = new DefaultValueDataset(new Double(10));
// create the chart...
final ThermometerPlot plot = new ThermometerPlot(dataset);
final JFreeChart chart = new JFreeChart("Thermometer Demo 2", // chart title
JFreeChart.DEFAULT_TITLE_FONT,
plot, // plot
false); // include legend
chart.setBackgroundPaint(new Color(241,250,224));
plot.setMercuryPaint();
final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
rangeAxis.setUpperBound(50);
setMercuryPaint()
– FulfillmentsetMercuryPaint()
– FulfillmentsetMercuryPaint()
– Fulfillmentorg.jfree.chart.plot.ThermometerPlot
class. – Chopplot.setMercuryPaint(new Color(int,int,int));
– Fulfillment