在JFreeChart中改變溫度計中的水銀顏色我用JFreeChart創(chuàng)建了一個溫度計圖表,但我想改變溫度計中的水銀顏色。我怎樣才能做到這一點?到目前為止,這是我的代碼; 請說明更改此代碼的位置: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 legendchart.setBackgroundPaint(new Color(241,250,224));plot.setMercuryPaint();final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();rangeAxis.setUpperBound(50);
添加回答
舉報
0/150
提交
取消