Vaadin Charts Heatmap: turboThreshold


There is an “optimization” flag that causes larger heatmaps not to display properly. The only way (as there is no support for HTML5 heatmap from highcharts yet) in pre 2.1.0-beta1 was to do a json trick like:
jsonConfig.replace(" "heatmap": {\n", " "heatmap": {\nturboThreshold: 0,\n");
to inject it into tthe json config. However this does not work anymore with 2.1.0-beta1 and plots with many points become black.

  1. Is it possible to add turboThreshold option to the interface?
  2. Anybody knows a workaround that would work with 2.1.0?
  3. Any chance to see support of HTML5 heatmap in Vaadin Charts?
    This is a stopper for us for using > 2.0.0…

Best regards,

Actually the trick still works, just that json format changed to no formatting.
I would still appreciate answer to p. 1 and 3 though.

Best regards


Regarding 1 and 2.

Looks like turboThreshold
and that enables configuration for the plotoptions for the following chart types:

  • bubble
  • errorbar
  • boxplot
  • line
  • polygon
  • scatter
  • series
  • spline
  • column
  • bar
  • columnrange
  • waterfall
  • area
  • arearange
  • areaspline
  • areasplinerange

But that doesn’t include treemap nor heatmap.

One workaround without changing the json configuration would be to extend PlotOptionsHeatMap and PlotOptionsTreeMap in the following way:

public class PlotOptionsHeatMapCustom extends PlotOptionsHeatMap {

private Integer turboThreshold;

 * @return the turbo threshold used for this chart type
 * @see #setTurboThreshold(Integer)
public Integer getTurboThreshold() {
    return turboThreshold;

 * Sets the threshold (number of data points) after library will always try
 * to use optimized rendering. For optimized rendering to work, data points
 * can only contain numeric values - no special data item specific settings.
 * <p>
 * The default setting used by library is 1000
 * @param turboThreshold
 *            the number of data points after the optimized rendering is
 *            forced
public void setTurboThreshold(Integer turboThreshold) {
    this.turboThreshold = turboThreshold;

[/code]Independently of that workaround I’ve created a ticket
for a definitive solution.

Vaadin Charts 2.1.2 was released fixing the
related issue
. Check it out from the