0

I found https://api.highcharts.com/highcharts/chart.zoomType which implies that zooming is possible, but I couldn't figure out either

  1. the java code to enable zooming or
  2. the html code (in the declarative template html files) to enable zooming.

Is zooming automatically/easily supported in Vaadin 12 charts just like it is with highcharts? (In highcharts, it's a simple option to enable...)

(Similarly, highcharts supports panning, and probably a bunch of other nice "sexy"/"useful" features -- how do we get those in Vaadin?)

Jonathan Sylvester
  • 1,275
  • 10
  • 23

1 Answers1

2

You can set pinchType via Java API

Configuration conf = chart.getConfiguration();
conf.getChart().setZoomType(Dimension.XY);

You can see it action in the scatter and polygon java demo por instance

I don't think there is declarative API for setting zoomType specifically, but you can use the additionalOptions property of the component to set the zoomType This area range demo shows how to set zoomType via additional options

Guille
  • 449
  • 3
  • 6