the default axis labels uses a serif font:
getCaption().getFont().getName()
returns null
.
I need to set a given FontDefinition to sans-serif (whatever is the system default for sans-serif). how to achieve this in java code?
i already tried this:
FontDefinition oldFont = xAxisPrimary.getLabel().getCaption().getFont();
xAxisPrimary.getLabel()
.getCaption()
.setFont(FontDefinitionImpl.create("Helvetica",
oldFont.getSize(),
false,
false,
false,
false,
true,
oldFont.getRotation(),
oldFont.getAlignment()));
this is not working (x labels disapear)
the main problem is the name - i don't know the name and i don't know what "names" are available on a given system.
And i don't want to change any other aspects of font definition.