marmelab / EventDrops

A time based / event series interactive visualization using d3.js
http://marmelab.com/EventDrops/
MIT License
1.24k stars 237 forks source link

draw() not supposed to redraw the chart? #283

Open infinity77 opened 4 years ago

infinity77 commented 4 years ago

What you were expecting:

Following the documentation:

draw(config, scale) redraws chart using given configuration and d3.scaleTime scale

I was naively expecting that I could update the zoom in the chart (without recreating a new one) by giving it a new domain interval, such as:

var xScale = d3
        .scaleTime()
        .domain([new_start_date, new_end_date])

chart.draw(config, xScale);

So that the interval new_start_date and new_end_date would be in focus.

What happened instead:

Chart is not redrawn. Nothing happens.

Other information:

I am forced to use the package at https://unpkg.com/event-drops@1.3.0/dist/index.js as I have no way to run npm on this locked machine.

Environment