Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Vaadin Chart: axis label without ellipses
Hi,
I often create charts with categories on yAxis, and some label (category names) are quite long.
In the generated SVG the label is truncated with ellipses.
How can I tell vaadin chart to show the full label? the com.vaadin.addon.charts.model.style.Style class do not have the needed properties.
Thanks.
Looks like Style is missing the textOverflow property. Could you create an issue for the missing API in https://dev.vaadin.com/ ?
As a temporary workaround you can extend Style class to add the property like this:
public class StyleWithTextOverflow extends Style {
private String textOverflow;
public String getTextOverflow() {
return textOverflow;
}
public void setTextOverflow(String textOverflow) {
this.textOverflow = textOverflow;
}
}
And then use it like this:
StyleWithTextOverflow style = new StyleWithTextOverflow();
style.setTextOverflow("none");
config.getyAxis().getLabels().setStyle(style);
Hope this helps,
Guille
Thanks, this is a very simple and useful workaround. I tested it and all is OK.
I also opened a ticket.