I'm afraid dimple doesn't have any native support for zooming. It is an enhancement I would like to add in the future, but there is no work towards it yet.
Zooming example in dimple.js?
-
18-06-2023 - |
سؤال
In pure d3 I would use .call(zoom) on g element like this
var zoom = d3.behavior.zoom()
.x(x)
.y(y)
.on("zoom", myZoomFunction);
svg = d3.select('#my-chart')
.append("svg:svg")
.attr('width', width + margin.left + margin.right)
.attr('height', height + margin.top + margin.bottom)
.append("svg:g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")")
.call(zoom);
Could you please provide me with an example on how I can do it using dimple.js?
المحلول
لا تنتمي إلى StackOverflow