Add per-axis specification in Dygraphs. Adding jquery as part of introducing multi...
[dygraphs.git] / experimental / palette / options.js
CommitLineData
20590000
RK
1// Copyright (c) 2011 Google, Inc.
2//
3// Permission is hereby granted, free of charge, to any person obtaining a copy
4// of this software and associated documentation files (the "Software"), to deal
5// in the Software without restriction, including without limitation the rights
6// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7// copies of the Software, and to permit persons to whom the Software is
8// furnished to do so, subject to the following conditions:
9//
10// The above copyright notice and this permission notice shall be included in
11// all copies or substantial portions of the Software.
12//
13// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19// THE SOFTWARE.
20
21/**
22 * @fileoverview List of options and their types, used for the palette.
23 *
24 * @author konigsberg@google.com (Robert Konigsberg)
25 */
26
27"use strict";
28
0193e7ef
RK
29/**
30 * Options availabile to the palette.
31 *
32 * Each entry is the name of the option, followed by:
33 * type: describes the type of option, which can be:
34 * boolean|string|float|int|array<boolean>|array<int>|array<float>|array<Date>
35 * or function(parameter list)
36 * scope: if empty, then available in global scope only. Otherwise,
37 * it's an array with possible values global|series|x|y|y2.
38 */
20590000 39var opts = {
dd371798
RK
40 animatedZooms : {
41 type : "boolean"
42 },
43 annotationClickHandler : {
44 type : "function(annotation, point, dygraph, event)"
45 },
46 annotationDblClickHandler : {
47 type : "function(annotation, point, dygraph, event)"
48 },
49 annotationMouseOutHandler : {
50 type : "function(annotation, point, dygraph, event)"
51 },
52 annotationMouseOverHandler : {
53 type : "function(annotation, point, dygraph, event)"
54 },
55 avoidMinZero : {
56 type : "boolean"
57 },
58 axisLabelColor : {
0193e7ef
RK
59 type : "string",
60 // scope : [ "x", "y", "y2" ]
dd371798
RK
61 },
62 axisLabelFontSize : {
0193e7ef
RK
63 type : "int",
64 // scope : [ "x", "y", "y2" ]
65 },
66 axisLabelFormatter : {
67 type : "function(numberOrDate, granularity, opts, dygraph)",
68 scope : [ "x", "y", "y2" ]
dd371798
RK
69 },
70 axisLabelWidth : {
0193e7ef
RK
71 type : "int",
72 // scope : [ "x", "y", "y2" ]
dd371798
RK
73 },
74 axisLineColor : {
0193e7ef
RK
75 type : "string",
76 // scope : [ "x", "y", "y2" ]
dd371798
RK
77 },
78 axisLineWidth : {
0193e7ef
RK
79 type : "int",
80 // scope : [ "x", "y", "y2" ]
dd371798
RK
81 },
82 axisTickSize : {
0193e7ef
RK
83 type : "int",
84 // scope : [ "x", "y", "y2" ]
dd371798
RK
85 },
86 clickCallback : {
87 type : "function(e, x, points)"
88 },
89 colorSaturation : {
90 type : "float"
91 },
92 colors : {
93 type : "array<string>"
94 },
95 colorValue : {
96 type : "float"
97 },
98 connectSeparatedPoints : {
99 type : "boolean"
100 },
101 customBars : {
102 type : "boolean"
103 },
104 dateWindow : {
105 type : "array<Date>"
106 },
107 delimiter : {
108 type : "string"
109 },
110 digitsAfterDecimal : {
111 type : "int"
112 },
113 displayAnnotations : {
114 type : "boolean"
115 },
116 drawAxesAtZero : {
117 type : "boolean"
118 },
119 drawCallback : {
120 type : "function(dygraph, is_initial)"
121 },
122 drawGapEdgePoints : {
123 type : "boolean"
124 },
125 drawHighlightPointCallback : {
0193e7ef
RK
126 type : "function(g, seriesName, canvasContext, cx, cy, color, pointSize)",
127 scope : [ "global", "series", "y", "y2" ]
dd371798
RK
128 },
129 drawPoints : {
0193e7ef
RK
130 type : "boolean",
131 scope : [ "global", "series", "y", "y2" ]
dd371798
RK
132 },
133 drawPointCallback : {
0193e7ef
RK
134 type : "function(g, seriesName, canvasContext, cx, cy, color, pointSize)",
135 scope : [ "global", "series", "y", "y2" ]
dd371798
RK
136 },
137 drawXAxis : {
138 type : "boolean"
139 },
140 drawXGrid : {
141 type : "boolean"
142 },
143 drawYAxis : {
144 type : "boolean"
145 },
146 drawYGrid : {
147 type : "boolean"
148 },
149 errorBars : {
150 type : "boolean"
151 },
152 fillAlpha : {
153 type : "float"
154 },
155 fillGraph : {
156 type : "boolean"
157 },
158 fractions : {
159 type : "boolean"
160 },
161 gridLineColor : {
162 type : "string"
163 },
164 gridLineWidth : {
165 type : "int"
166 },
167 height : {
168 type : "int"
169 },
170 hideOverlayOnMouseOut : {
171 type : "boolean"
172 },
173 highlightCallback : {
174 type : "function(event, x, points,row)"
175 },
176 highlightCircleSize : {
177 type : "int"
178 },
179 includeZero : {
180 type : "boolean"
181 },
182 isZoomedIgnoreProgrammaticZoom : {
183 type : "boolean"
184 },
185 labelsDivWidth : {
186 type : "integer"
187 },
188 labels : {
189 type : "array<string>"
190 },
191 labelsKMB : {
192 type : "boolean"
193 },
194 labelsKMG2 : {
195 type : "boolean"
196 },
197 labelsSeparateLines : {
198 type : "boolean"
199 },
200 labelsShowZeroValues : {
201 type : "boolean"
202 },
203 legend : {
204 type : "string"
205 },
206 logscale : {
207 type : "boolean"
208 },
209 maxNumberWidth : {
210 type : "int"
211 },
212 panEdgeFraction : {
213 type : "float"
214 },
215 pixelsPerLabel : {
216 type : "int"
217 },
218 pixelsPerXLabel : {
219 type : "int"
220 },
221 pixelsPerYLabel : {
222 type : "int"
223 },
224 pointClickCallback : {
225 type : "function(e, point)"
226 },
227 pointSize : {
0193e7ef
RK
228 type : "integer",
229 scope : [ "global", "series", "y", "y2" ]
dd371798
RK
230 },
231 rangeSelectorHeight : {
232 type : "int"
233 },
234 rangeSelectorPlotFillColor : {
235 type : "int"
236 },
237 rangeSelectorPlotStrokeColor : {
238 type : "int"
239 },
240 rightGap : {
241 type : "boolean"
242 },
243 rollPeriod : {
244 type : "int"
245 },
246 showLabelsOnHighlight : {
247 type : "boolean"
248 },
249 showRangeSelector : {
250 type : "boolean"
251 },
252 showRoller : {
253 type : "boolean"
254 },
255 sigFigs : {
256 type : "int"
257 },
258 sigma : {
259 type : "float"
260 },
261 stackedGraph : {
262 type : "boolean"
263 },
264 stepPlot : {
265 type : "boolean"
266 },
267 strokeBorderColor : {
268 type : "string"
269 },
270 strokeBorderWidth : {
271 type : "float"
272 },
273 strokePattern : {
274 type : "array<integer>"
275 },
276 strokeWidth : {
277 type : "integer"
278 },
279 timingName : {
280 type : "string"
281 },
282 title : {
283 type : "string"
284 },
285 titleHeight : {
286 type : "integer"
287 },
288 underlayCallback : {
289 type : "function(canvas, area, dygraph)"
290 },
291 unhighlightCallback : {
292 type : "function(event)"
293 },
294 valueRange : {
295 type : "array<float>"
296 },
297 visibility : {
298 type : "array<boolean>"
299 },
300 width : {
301 type : "int"
302 },
303 wilsonInterval : {
304 type : "boolean"
305 },
306 xAxisHeight : {
307 type : "int"
308 },
309 xAxisLabelWidth : {
310 type : "int"
311 },
312 xLabelHeight : {
313 type : "int"
314 },
315 xlabel : {
316 type : "string"
317 },
318 xValueParser : {
319 type : "function(str)"
320 },
321 yAxisLabelWidth : {
322 type : "int"
323 },
324 yLabelWidth : {
325 type : "int"
326 },
327 ylabel : {
328 type : "string"
329 },
330 zoomCallback : {
331 type : "function(minDate, maxDate, yRanges)"
332 },
333};
334