سؤال

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?

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top