Closed
Description
JFreeChart version: 1.0.19.
The problem appears to be in LogAxis.createTickLabel:
protected AttributedString createTickLabel(double value) {
if (this.numberFormatOverride != null) {
return new AttributedString(
this.numberFormatOverride.format(value));
} else ...
which bypasses font processing.
Subclassing LogAxis and providing the font attributes in createTickLabel gets around the problem:
private static class MyLogAxis extends LogAxis
{
public static final long serialVersionUID = 1L;
protected AttributedString createTickLabel(double value)
{
AttributedString result = super.createTickLabel(value);
java.awt.Font font = getTickLabelFont();
for (Map.Entry<TextAttribute,?> entry : font.getAttributes().entrySet())
result.addAttribute(entry.getKey(),entry.getValue());
return result;
}
MyLogAxis( ){super( );}
MyLogAxis(String t){super(t);}
}
Metadata
Metadata
Assignees
Labels
No labels