| 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 | |
| 29 | var opts = { |
| 30 | animatedZooms : { |
| 31 | type : "boolean" |
| 32 | }, |
| 33 | annotationClickHandler : { |
| 34 | type : "function(annotation, point, dygraph, event)" |
| 35 | }, |
| 36 | annotationDblClickHandler : { |
| 37 | type : "function(annotation, point, dygraph, event)" |
| 38 | }, |
| 39 | annotationMouseOutHandler : { |
| 40 | type : "function(annotation, point, dygraph, event)" |
| 41 | }, |
| 42 | annotationMouseOverHandler : { |
| 43 | type : "function(annotation, point, dygraph, event)" |
| 44 | }, |
| 45 | avoidMinZero : { |
| 46 | type : "boolean" |
| 47 | }, |
| 48 | axisLabelColor : { |
| 49 | type : "string" |
| 50 | }, |
| 51 | axisLabelFontSize : { |
| 52 | type : "int" |
| 53 | }, |
| 54 | axisLabelWidth : { |
| 55 | type : "int" |
| 56 | }, |
| 57 | axisLineColor : { |
| 58 | type : "string" |
| 59 | }, |
| 60 | axisLineWidth : { |
| 61 | type : "int" |
| 62 | }, |
| 63 | axisTickSize : { |
| 64 | type : "int" |
| 65 | }, |
| 66 | clickCallback : { |
| 67 | type : "function(e, x, points)" |
| 68 | }, |
| 69 | colorSaturation : { |
| 70 | type : "float" |
| 71 | }, |
| 72 | colors : { |
| 73 | type : "array<string>" |
| 74 | }, |
| 75 | colorValue : { |
| 76 | type : "float" |
| 77 | }, |
| 78 | connectSeparatedPoints : { |
| 79 | type : "boolean" |
| 80 | }, |
| 81 | customBars : { |
| 82 | type : "boolean" |
| 83 | }, |
| 84 | dateWindow : { |
| 85 | type : "array<Date>" |
| 86 | }, |
| 87 | delimiter : { |
| 88 | type : "string" |
| 89 | }, |
| 90 | digitsAfterDecimal : { |
| 91 | type : "int" |
| 92 | }, |
| 93 | displayAnnotations : { |
| 94 | type : "boolean" |
| 95 | }, |
| 96 | drawAxesAtZero : { |
| 97 | type : "boolean" |
| 98 | }, |
| 99 | drawCallback : { |
| 100 | type : "function(dygraph, is_initial)" |
| 101 | }, |
| 102 | drawGapEdgePoints : { |
| 103 | type : "boolean" |
| 104 | }, |
| 105 | drawHighlightPointCallback : { |
| 106 | type : "function(g, seriesName, canvasContext, cx, cy, color, pointSize)" |
| 107 | }, |
| 108 | drawPoints : { |
| 109 | type : "boolean" |
| 110 | }, |
| 111 | drawPointCallback : { |
| 112 | type : "function(g, seriesName, canvasContext, cx, cy, color, pointSize)" |
| 113 | }, |
| 114 | drawXAxis : { |
| 115 | type : "boolean" |
| 116 | }, |
| 117 | drawXGrid : { |
| 118 | type : "boolean" |
| 119 | }, |
| 120 | drawYAxis : { |
| 121 | type : "boolean" |
| 122 | }, |
| 123 | drawYGrid : { |
| 124 | type : "boolean" |
| 125 | }, |
| 126 | errorBars : { |
| 127 | type : "boolean" |
| 128 | }, |
| 129 | fillAlpha : { |
| 130 | type : "float" |
| 131 | }, |
| 132 | fillGraph : { |
| 133 | type : "boolean" |
| 134 | }, |
| 135 | fractions : { |
| 136 | type : "boolean" |
| 137 | }, |
| 138 | gridLineColor : { |
| 139 | type : "string" |
| 140 | }, |
| 141 | gridLineWidth : { |
| 142 | type : "int" |
| 143 | }, |
| 144 | height : { |
| 145 | type : "int" |
| 146 | }, |
| 147 | hideOverlayOnMouseOut : { |
| 148 | type : "boolean" |
| 149 | }, |
| 150 | highlightCallback : { |
| 151 | type : "function(event, x, points,row)" |
| 152 | }, |
| 153 | highlightCircleSize : { |
| 154 | type : "int" |
| 155 | }, |
| 156 | includeZero : { |
| 157 | type : "boolean" |
| 158 | }, |
| 159 | isZoomedIgnoreProgrammaticZoom : { |
| 160 | type : "boolean" |
| 161 | }, |
| 162 | labelsDivWidth : { |
| 163 | type : "integer" |
| 164 | }, |
| 165 | labels : { |
| 166 | type : "array<string>" |
| 167 | }, |
| 168 | labelsKMB : { |
| 169 | type : "boolean" |
| 170 | }, |
| 171 | labelsKMG2 : { |
| 172 | type : "boolean" |
| 173 | }, |
| 174 | labelsSeparateLines : { |
| 175 | type : "boolean" |
| 176 | }, |
| 177 | labelsShowZeroValues : { |
| 178 | type : "boolean" |
| 179 | }, |
| 180 | legend : { |
| 181 | type : "string" |
| 182 | }, |
| 183 | logscale : { |
| 184 | type : "boolean" |
| 185 | }, |
| 186 | maxNumberWidth : { |
| 187 | type : "int" |
| 188 | }, |
| 189 | panEdgeFraction : { |
| 190 | type : "float" |
| 191 | }, |
| 192 | pixelsPerLabel : { |
| 193 | type : "int" |
| 194 | }, |
| 195 | pixelsPerXLabel : { |
| 196 | type : "int" |
| 197 | }, |
| 198 | pixelsPerYLabel : { |
| 199 | type : "int" |
| 200 | }, |
| 201 | pointClickCallback : { |
| 202 | type : "function(e, point)" |
| 203 | }, |
| 204 | pointSize : { |
| 205 | type : "integer" |
| 206 | }, |
| 207 | rangeSelectorHeight : { |
| 208 | type : "int" |
| 209 | }, |
| 210 | rangeSelectorPlotFillColor : { |
| 211 | type : "int" |
| 212 | }, |
| 213 | rangeSelectorPlotStrokeColor : { |
| 214 | type : "int" |
| 215 | }, |
| 216 | rightGap : { |
| 217 | type : "boolean" |
| 218 | }, |
| 219 | rollPeriod : { |
| 220 | type : "int" |
| 221 | }, |
| 222 | showLabelsOnHighlight : { |
| 223 | type : "boolean" |
| 224 | }, |
| 225 | showRangeSelector : { |
| 226 | type : "boolean" |
| 227 | }, |
| 228 | showRoller : { |
| 229 | type : "boolean" |
| 230 | }, |
| 231 | sigFigs : { |
| 232 | type : "int" |
| 233 | }, |
| 234 | sigma : { |
| 235 | type : "float" |
| 236 | }, |
| 237 | stackedGraph : { |
| 238 | type : "boolean" |
| 239 | }, |
| 240 | stepPlot : { |
| 241 | type : "boolean" |
| 242 | }, |
| 243 | strokeBorderColor : { |
| 244 | type : "string" |
| 245 | }, |
| 246 | strokeBorderWidth : { |
| 247 | type : "float" |
| 248 | }, |
| 249 | strokePattern : { |
| 250 | type : "array<integer>" |
| 251 | }, |
| 252 | strokeWidth : { |
| 253 | type : "integer" |
| 254 | }, |
| 255 | timingName : { |
| 256 | type : "string" |
| 257 | }, |
| 258 | title : { |
| 259 | type : "string" |
| 260 | }, |
| 261 | titleHeight : { |
| 262 | type : "integer" |
| 263 | }, |
| 264 | underlayCallback : { |
| 265 | type : "function(canvas, area, dygraph)" |
| 266 | }, |
| 267 | unhighlightCallback : { |
| 268 | type : "function(event)" |
| 269 | }, |
| 270 | valueRange : { |
| 271 | type : "array<float>" |
| 272 | }, |
| 273 | visibility : { |
| 274 | type : "array<boolean>" |
| 275 | }, |
| 276 | width : { |
| 277 | type : "int" |
| 278 | }, |
| 279 | wilsonInterval : { |
| 280 | type : "boolean" |
| 281 | }, |
| 282 | xAxisHeight : { |
| 283 | type : "int" |
| 284 | }, |
| 285 | xAxisLabelWidth : { |
| 286 | type : "int" |
| 287 | }, |
| 288 | xLabelHeight : { |
| 289 | type : "int" |
| 290 | }, |
| 291 | xlabel : { |
| 292 | type : "string" |
| 293 | }, |
| 294 | xValueParser : { |
| 295 | type : "function(str)" |
| 296 | }, |
| 297 | yAxisLabelWidth : { |
| 298 | type : "int" |
| 299 | }, |
| 300 | yLabelWidth : { |
| 301 | type : "int" |
| 302 | }, |
| 303 | ylabel : { |
| 304 | type : "string" |
| 305 | }, |
| 306 | zoomCallback : { |
| 307 | type : "function(minDate, maxDate, yRanges)" |
| 308 | }, |
| 309 | }; |
| 310 | |