1

In Vaadin Charts 2, when moving the Legend from its default place below the chart to appear above the chart:

myChart.configuration.getLegend().setVerticalAlign( VerticalAlign.TOP );

… the result is the Title being rendered as a layer hovering over the Legend. How can I fix this, to not be overlapped?

screen shot of Vaadin Charts 2 chart with Title layered on Legend

Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154

1 Answers1

3

You can use verticalAlign, x and y properties to set both the legend and the title location. Using title default position and setting legend vertical layout will result in the overlapping you see. But changing the title or legends 'Y' value can prevent it. EG:

myChart.configuration.getLegend().setY(15);

Hope this helps!

Guille
  • 449
  • 3
  • 6