0.9.3 PiePlot
0.9.3 PiePlot
When running the PieChartDemo1 I'm getting a java application error - "the instruction at 0x----- referenced 0x-----. The memory could not be read." I'm using IBM's 1.2.2 JDK that came with WebSphere. Anyone have any ideas? The 0.9.2 works fine.
Re: 0.9.3 PiePlot
Well I answered my own question. But I dont understand the solution. In PiePlot.drawPie I changed the casts on the drawString at the bottom of the method from int to float. Funny part is that I was not executing this code. Here's the part I changed.
// draw the series label
if (label != null) {
g2.setPaint(seriesLabelPaint);
g2.setFont(seriesLabelFont);
Rectangle2D bounds = g2.getFontMetrics().getStringBounds(label, g2);
double labelX = pieX + (pieW/2) - (bounds.getWidth()/2);
double labelY = pieY + pieH + bounds.getHeight();
g2.drawString(label, (float)labelX, (float)labelY);
}
// draw the series label
if (label != null) {
g2.setPaint(seriesLabelPaint);
g2.setFont(seriesLabelFont);
Rectangle2D bounds = g2.getFontMetrics().getStringBounds(label, g2);
double labelX = pieX + (pieW/2) - (bounds.getWidth()/2);
double labelY = pieY + pieH + bounds.getHeight();
g2.drawString(label, (float)labelX, (float)labelY);
}