Closurize dygraph-options.js. Not done.
[dygraphs.git] / NOTES
1 Axis-related properties:
2 includeZero
3 valueRange
4 labelsKMB
5 labelsKMG2
6 pixelsPerYLabel
7 yAxisLabelWidth
8 axisLabelFontSize
9 axisTickSize
10
11 How is the y-axis determined?
12
13 Dygraph.numericTicks: min, max -> set of ticks for axis
14 tick = { label: label, v: value }
15
16 addYTicks_: min, max -> void
17 sets the yAxis and yTicks properties of layout_
18
19 drawGraph_:
20 if set, uses this.valueRange_ ([low, high] array)
21   -> adds ticks via addYTicks_
22   -> sets displayedYRange_
23
24 otherwise, calculates a good axis based on minY and maxY.
25
26 this.displayedYRange_ is returned by the yAxisRange function.
27 this is, in turn, used by the toDataCoords and toDomCoords methods.
28
29 Path of least resistance:
30 - in drawGraph_, calculate [minY, maxY] per-series
31 - write a function to compute y-axes for all series, ensure only two axes.
32 - make yAxis, yTicks into arrays in layout_
33 - add a series -> axis mapping to layout_, dygraph
34 - add code to Renderer to add second axis.
35 - add optional 'series' parameter to toDomCoords/toDataCoords
36
37 This won't be compatible with stacked charts.