[英]Google Chart Pan Zoom Buttons
I'm searching for having zoom and pan buttons on a google chart.我正在搜索谷歌图表上的缩放和平移按钮。
Like Here .喜欢这里。 (Maybe there is no option to have it and i have to dev it myself)
(也许没有选择拥有它,我必须自己开发它)
I also wondering how they do to have dynamic Xmin and Xmax.我还想知道他们是如何获得动态 Xmin 和 Xmax 的。 Is this calculated in real time by the client ?
这是客户端实时计算的吗?
Here is one possiblity to zoom in a google chart.这是放大谷歌图表的一种可能性。 The zooming is done by clicking and dragging the mouse left or right.
缩放是通过单击并向左或向右拖动鼠标来完成的。 Panning ist not possible in this version (but you don't need a scroll wheel).
在此版本中无法进行平移(但您不需要滚轮)。
explorer: {
actions: ['dragToZoom', 'rightClickToReset'],
axis: 'horizontal',
keepInBounds: true,
maxZoomIn: 4.0
}
If you want to try it look here: https://jsfiddle.net/4w626v2s/2/如果你想试试看这里: https : //jsfiddle.net/4w626v2s/2/
Another possiblity is the following.另一种可能性如下。 Here you need a mouse scroll wheel to zoom into the chart.
在这里,您需要一个鼠标滚轮来放大图表。 After zooming you can click and drag to pan within the chart.
缩放后,您可以单击并拖动以在图表内平移。
explorer: {
axis: 'horizontal',
keepInBounds: true,
maxZoomIn: 4.0
}
And here you can test it: https://jsfiddle.net/5h7jxqq8/2/在这里你可以测试它: https : //jsfiddle.net/5h7jxqq8/2/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.