Changing the hover color in a Vaadin Charts heatmap

Is there a way to change the hover color or other effects in a Charts heatmap? I’ve tried achieving this through the States object of PlotOptionsHeatmap (com.vaadin.addon.charts.model.PlotOptionsHeatmap.getStates().getHover().setFillColor(Color color)), but this did nothing.

Hi Niko,

Sorry to hear that you’re having issues with Charts.

Your current approach seems right to me. Would you mind creating an issue in
regarding this?


Thank you Guillermo, the issue ticket can be found in

As a temporary workaround while the issue is not fixed and released you can extend the Hover class like this:

public class HoverWithColor extends Hover {

private Color color;

public HoverWithColor() {

 * @see #setColor(Color)
public Color getColor() {
    return color;

 * The color of the marker in hover state.
public void setColor(Color color) {
    this.color = color;

[/code]And then use it in your PlotOptionsHeatmap:

HoverWithColor hoverWithColor = new HoverWithColor(); hoverWithColor.setColor(SolidColor.YELLOW); plotOptionsHeatmap.getStates().setHover(hoverWithColor); config.setPlotOptions(plotOptionsHeatmap); Hope this helps in the meantime,