Search code examples
javascriptdygraphs

Dygraphs: How to use both range-selector and manual zooming


If the range-selector is set to true, the manual zooming with the mouse is off. I would like to have both. Is it possible to use both range-selector and manual zooming with the mouse with the dygraphs library? How does this work?

Regards, Wolfgang


Solution

  • When you set the showRangeSelector option, it changes the interaction model for the main chart so that drag=pan. If you don't want this, you can reset it to the default (drag=zoom) explicitly:

    new Dygraph(div, data, {
        showRangeSelector: true,
        interactionModel: Dygraph.defaultInteractionModel
    });
    

    Here's a full fiddle.