Fork me on GitHub

Using Dygraphs to load down-sampled data while zooming - Example 4

Same underlying javascript and setup as example 3, but with multiple graphs on the page. This is primarily a test as there were originally some issues with multiple graphs when panning because the endPan handling is global to all DyGraphs instances. See code comments in _setupPanInteractionHandling method.

Graph 1

Graph 2

Files

example4.html
This page. Contains the graph containers' HTML, range selector buttons, and this documentation. No javascript except to init the two graph's object instances.
j/JGS.Demo3Page.js
This is the most relevant file. Contains all of the Dygraphs specific handling. 95% is the same as example 1 & 2.
j/JGS.GraphDataProvider.js
Responsible for getting range and detail data from the server/simulator and then aggregating,splicing, and converting it for dygraphs. This file is shared with example 1 & 2.
j/JGS.ServerDataSimulator.js
Simulates a remote time series data service. Includes simulated delays. This file is shared with example 1 & 2.