Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

265
Views
El evento de zoom D3js no hace nada

Tengo problemas con el evento de zoom. Mi evento de zoom no llama a la función después de hacer zoom. El evento debería permitirme ampliar el eje x y la escala x del gráfico. Ni siquiera imprime el 'zoom'. ¿Qué estoy haciendo mal?

 chart = d3.select(self.renderTo) .append('svg') .attr('width', self.width) .attr('height', self.height) .attr('class', 'gantt-chart'); chart.append('defs').append('clipPath') .attr('id', 'clip') .append('rect') .attr('width', marginWidth) .attr('height', marginHeight); xScale = d3.scaleTime() .domain(getTimeDomain()) .range([0, marginWidth]); yScale = d3.scaleLinear() .domain([0, laneLength]) .range([0, marginHeight]); xAxis = d3.axisBottom().scale(xScale) .ticks(5); yAxis = d3.axisLeft().scale(yScale) .ticks(laneLength) .tickFormat(''); zoom = d3.zoom() .on('zoom', function (event, d) { zoomFunction(event); }); chart.call(zoom); function zoomFunction (event) { console.log('zoom'); // create new scale ojects based on event var newXscale = d3.event.transform.rescaleX(xScale); console.log(event.transform); // update axes d3.select('.g.main.axis.date').call(xAxis.scale(newXscale)); };
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!