X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=experimental%2Fpalette%2Foptions.js;h=c91439d147896ac6e49f96188f498746911902fe;hb=abff9eae8bb3d8a69099525e80d42c4e626ca661;hp=56d515620352f99e21563a85cb970541a3cf1c7f;hpb=dd371798a58578e470de0a7e292ca5ca550aa3f3;p=dygraphs.git diff --git a/experimental/palette/options.js b/experimental/palette/options.js index 56d5156..c91439d 100644 --- a/experimental/palette/options.js +++ b/experimental/palette/options.js @@ -26,7 +26,21 @@ "use strict"; +/** + * Options availabile to the palette. + * + * Each entry is the name of the option, followed by: + * type: describes the type of option, which can be: + * boolean|string|float|int|array|array|array|array + * or function(parameter list) + * scope: if empty, then available in global scope only. Otherwise, + * it's an array with possible values global|series|x|y|y2|highlight. + */ var opts = { + // These two exist, but are not used by the palette at all. + series : { type : null, scope : [] }, + axes : { type : null, scope : [] }, + animatedZooms : { type : "boolean" }, @@ -45,23 +59,37 @@ var opts = { avoidMinZero : { type : "boolean" }, + axis : { + type : "string", + scope : [ "series" ] + }, axisLabelColor : { - type : "string" + type : "string", + // scope : [ "x", "y", "y2" ] }, axisLabelFontSize : { - type : "int" + type : "int", + // scope : [ "x", "y", "y2" ] + }, + axisLabelFormatter : { + type : "function(numberOrDate, granularity, opts, dygraph)", + scope : [ "x", "y", "y2" ] }, axisLabelWidth : { - type : "int" + type : "int", + // scope : [ "x", "y", "y2" ] }, axisLineColor : { - type : "string" + type : "string", + // scope : [ "x", "y", "y2" ] }, axisLineWidth : { - type : "int" + type : "int", + // scope : [ "x", "y", "y2" ] }, axisTickSize : { - type : "int" + type : "int", + // scope : [ "x", "y", "y2" ] }, clickCallback : { type : "function(e, x, points)" @@ -103,13 +131,16 @@ var opts = { type : "boolean" }, drawHighlightPointCallback : { - type : "function(g, seriesName, canvasContext, cx, cy, color, pointSize)" + type : "function(g, seriesName, canvasContext, cx, cy, color, pointSize)", + scope : [ "global", "series", "y", "y2" ] }, drawPoints : { - type : "boolean" + type : "boolean", + scope : [ "global", "series", "y", "y2" ] }, drawPointCallback : { - type : "function(g, seriesName, canvasContext, cx, cy, color, pointSize)" + type : "function(g, seriesName, canvasContext, cx, cy, color, pointSize)", + scope : [ "global", "series", "y", "y2" ] }, drawXAxis : { type : "boolean" @@ -151,7 +182,8 @@ var opts = { type : "function(event, x, points,row)" }, highlightCircleSize : { - type : "int" + type : "int", + scope : [ "global", "series", "y", "y2" ] }, includeZero : { type : "boolean" @@ -202,7 +234,8 @@ var opts = { type : "function(e, point)" }, pointSize : { - type : "integer" + type : "integer", + scope : [ "global", "series", "y", "y2" ] }, rangeSelectorHeight : { type : "int" @@ -241,16 +274,20 @@ var opts = { type : "boolean" }, strokeBorderColor : { - type : "string" + type : "string", + scope : [ "global", "series", "y", "y2" ] }, strokeBorderWidth : { - type : "float" + type : "float", + scope : [ "global", "series", "y", "y2" ] }, strokePattern : { - type : "array" + type : "array", + scope : [ "global", "series", "y", "y2" ] }, strokeWidth : { - type : "integer" + type : "float", + scope : [ "global", "series", "y", "y2" ] }, timingName : { type : "string" @@ -305,6 +342,6 @@ var opts = { }, zoomCallback : { type : "function(minDate, maxDate, yRanges)" - }, + } };