Hi,
I have two questions about MeterPlot:
Q1:
I've used MeterPlot to display several temperature sensors in a chart.
I created 8 MeterPlot and put each of them into a ChartPanel, then use a GridLayout(2, 4, 0, 0) to display them in a JPanel.
The problem is the MeterPlot has a bigger x inset then y inset (which is always 0) so the meter plot are narrow ellipses instead of a circles, even when each plot has a square data area.
I used plot.setInsets(new Insets(0, 0, 0, 0)) and chartPanel.setBorder(new EmptyBorder(0, 0, 0, 0)) trying to set the plot border to 0, but it does not work.
Q2:
In the meter plot, the needle is too long. in some position, the needle is loonger then the distance between the center of the ellipse to the border of the ellipse. It seems that the needle's length is fixed, not adjusted accordingly.
I wonder whether there is a quick fixed of these problems or I have to extends MeterPlot by my own.
Thanks
Robin
Questions about MeterPlot
Re: Questions about MeterPlot
Most of the MeterPlot dimensions are hard-coded in the draw(...) method. I've made one pass through the code to tidy it up a bit, but there is more work to be done. It's not at the top of my list right now though...
Regards,
DG.
Regards,
DG.