@@ -21,13 +21,17 @@ module.exports = {
21
21
// no interactivity, for export or image generation
22
22
staticPlot : false ,
23
23
24
- // we can edit titles, move annotations, etc - sets all pieces of `edits`
25
- // unless a separate `edits` config item overrides individual parts
24
+ /*
25
+ * we can edit titles, move annotations, etc - sets all pieces of `edits`
26
+ * unless a separate `edits` config item overrides individual parts
27
+ */
26
28
editable : false ,
27
29
edits : {
28
- // annotationPosition: the main anchor of the annotation, which is the
29
- // text (if no arrow) or the arrow (which drags the whole thing leaving
30
- // the arrow length & direction unchanged)
30
+ /*
31
+ * annotationPosition: the main anchor of the annotation, which is the
32
+ * text (if no arrow) or the arrow (which drags the whole thing leaving
33
+ * the arrow length & direction unchanged)
34
+ */
31
35
annotationPosition : false ,
32
36
// just for annotations with arrows, change the length and direction of the arrow
33
37
annotationTail : false ,
@@ -43,8 +47,10 @@ module.exports = {
43
47
titleText : false
44
48
} ,
45
49
46
- // DO autosize once regardless of layout.autosize
47
- // (use default width or height values otherwise)
50
+ /*
51
+ * DO autosize once regardless of layout.autosize
52
+ * (use default width or height values otherwise)
53
+ */
48
54
autosizable : false ,
49
55
50
56
// set the length of the undo/redo queue
@@ -68,7 +74,10 @@ module.exports = {
68
74
// enable axis pan/zoom drag handles
69
75
showAxisDragHandles : true ,
70
76
71
- // enable direct range entry at the pan/zoom drag points (drag handles must be enabled above)
77
+ /*
78
+ * enable direct range entry at the pan/zoom drag points
79
+ * (drag handles must be enabled above)
80
+ */
72
81
showAxisRangeEntryBoxes : true ,
73
82
74
83
// link to open this plot in plotly
@@ -86,18 +95,24 @@ module.exports = {
86
95
// display the mode bar (true, false, or 'hover')
87
96
displayModeBar : 'hover' ,
88
97
89
- // remove mode bar button by name
90
- // (see ./components/modebar/buttons.js for the list of names)
98
+ /*
99
+ * remove mode bar button by name
100
+ * (see ./components/modebar/buttons.js for the list of names)
101
+ */
91
102
modeBarButtonsToRemove : [ ] ,
92
103
93
- // add mode bar button using config objects
94
- // (see ./components/modebar/buttons.js for list of arguments)
104
+ /*
105
+ * add mode bar button using config objects
106
+ * (see ./components/modebar/buttons.js for list of arguments)
107
+ */
95
108
modeBarButtonsToAdd : [ ] ,
96
109
97
- // fully custom mode bar buttons as nested array,
98
- // where the outer arrays represents button groups, and
99
- // the inner arrays have buttons config objects or names of default buttons
100
- // (see ./components/modebar/buttons.js for more info)
110
+ /*
111
+ * fully custom mode bar buttons as nested array,
112
+ * where the outer arrays represents button groups, and
113
+ * the inner arrays have buttons config objects or names of default buttons
114
+ * (see ./components/modebar/buttons.js for more info)
115
+ */
101
116
modeBarButtons : false ,
102
117
103
118
// add the plotly logo on the end of the mode bar
@@ -106,51 +121,65 @@ module.exports = {
106
121
// increase the pixel ratio for Gl plot images
107
122
plotGlPixelRatio : 2 ,
108
123
109
- // background setting function
110
- // 'transparent' sets the background `layout.paper_color`
111
- // 'opaque' blends bg color with white ensuring an opaque background
112
- // or any other custom function of gd
124
+ /*
125
+ * background setting function
126
+ * 'transparent' sets the background `layout.paper_color`
127
+ * 'opaque' blends bg color with white ensuring an opaque background
128
+ * or any other custom function of gd
129
+ */
113
130
setBackground : 'transparent' ,
114
131
115
132
// URL to topojson files used in geo charts
116
133
topojsonURL : 'https://cdn.plot.ly/' ,
117
134
118
- // Mapbox access token (required to plot mapbox trace types)
119
- // If using an Mapbox Atlas server, set this option to '',
120
- // so that plotly.js won't attempt to authenticate to the public Mapbox server.
135
+ /*
136
+ * Mapbox access token (required to plot mapbox trace types)
137
+ * If using an Mapbox Atlas server, set this option to '',
138
+ * so that plotly.js won't attempt to authenticate to the public Mapbox server.
139
+ */
121
140
mapboxAccessToken : null ,
122
141
123
- // Turn all console logging on or off (errors will be thrown)
124
- // This should ONLY be set via Plotly.setPlotConfig
125
- // 0: no logs
126
- // 1: warnings and errors, but not informational messages
127
- // 2: verbose logs
142
+ /*
143
+ * Turn all console logging on or off (errors will be thrown)
144
+ * This should ONLY be set via Plotly.setPlotConfig
145
+ * 0: no logs
146
+ * 1: warnings and errors, but not informational messages
147
+ * 2: verbose logs
148
+ */
128
149
logging : 1 ,
129
150
130
- // Set global transform to be applied to all traces with no
131
- // specification needed
151
+ /*
152
+ * Set global transform to be applied to all traces with no
153
+ * specification needed
154
+ */
132
155
globalTransforms : [ ] ,
133
156
134
- // Which localization should we use?
135
- // Should be a string like 'en' or 'en-US'.
157
+ /*
158
+ * Which localization should we use?
159
+ * Should be a string like 'en' or 'en-US'.
160
+ */
136
161
locale : 'en-US' ,
137
162
138
- // Localization dictionaries
139
- // Dictionaries can be provided either here (specific to one chart) or globally
140
- // by registering them as modules (which contain dateFormat specs as well).
141
- // Here `dictionaries` should be an object of objects
142
- // {'da': {'Reset axes': 'Nulstil aksler', ...}, ... }
143
- // When looking for a translation we look at these dictionaries first, then
144
- // the ones registered as modules. If those fail, we strip off any
145
- // regionalization ('en-US' -> 'en') and try each again
146
- dictionaries : { } ,
147
-
148
- // Localization specs for dates and numbers
149
- // Each localization should be an object with keys matching most of d3.locale,
150
- // see https://github.com/d3/d3-3.x-api-reference/blob/master/Localization.md
151
- // {'da': {months: [...], shortMonths: [...], ...}, ... }
152
- // Unlike d3.locale, every key is optional, we will fall back on English ('en').
153
- // Currently `grouping` and `currency` are ignored for our automatic number
154
- // formatting, but can be used in custom formats.
155
- formats : { }
163
+ /*
164
+ * Localization definitions
165
+ * Locales can be provided either here (specific to one chart) or globally
166
+ * by registering them as modules.
167
+ * Should be an object of objects {locale: {dictionary: {...}, format: {...}}}
168
+ * {
169
+ * da: {
170
+ * dictionary: {'Reset axes': 'Nulstil aksler', ...},
171
+ * format: {months: [...], shortMonths: [...]}
172
+ * },
173
+ * ...
174
+ * }
175
+ * All parts are optional. When looking for translation or format fields, we
176
+ * look first for an exact match in a config locale, then in a registered
177
+ * module. If those fail, we strip off any regionalization ('en-US' -> 'en')
178
+ * and try each (config, registry) again. The final fallback for translation
179
+ * is untranslated (which is US English) and for formats is the base English
180
+ * (the only consequence being the last fallback date format %x is DD/MM/YYYY
181
+ * instead of MM/DD/YYYY). Currently `grouping` and `currency` are ignored
182
+ * for our automatic number formatting, but can be used in custom formats.
183
+ */
184
+ locales : { }
156
185
} ;
0 commit comments