Fork me on GitHub

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

This example is similar to example 1, but adds the capability to change the range by using buttons below the graph.

Files

example2.html
This page. Contains the graph container's HTML, range selector buttons, and this documentation. No javascript.
j/JGS.Demo2Page.js
This is the most relevant file. Contains all of the Dygraphs specific handling, as well as the handling for range selector buttons.
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.
j/JGS.ServerDataSimulator.js
Simulates a remote time series data service. Includes simulated delays. This file is shared with example 1.