We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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);} }
The text was updated successfully, but these errors were encountered:
Fix for tick label font when number format override is in place #98
403bcda
Fix for #98
cd11304
Fix bug #98
487f423
Fixed for the next release.
Sorry, something went wrong.
No branches or pull requests
JFreeChart version: 1.0.19.
The problem appears to be in LogAxis.createTickLabel:
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);}
}
The text was updated successfully, but these errors were encountered: