@@ -21,13 +21,17 @@ module.exports = {
2121 // no interactivity, for export or image generation
2222 staticPlot : false ,
2323
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+ */
2628 editable : false ,
2729 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+ */
3135 annotationPosition : false ,
3236 // just for annotations with arrows, change the length and direction of the arrow
3337 annotationTail : false ,
@@ -43,8 +47,10 @@ module.exports = {
4347 titleText : false
4448 } ,
4549
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+ */
4854 autosizable : false ,
4955
5056 // set the length of the undo/redo queue
@@ -68,7 +74,10 @@ module.exports = {
6874 // enable axis pan/zoom drag handles
6975 showAxisDragHandles : true ,
7076
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+ */
7281 showAxisRangeEntryBoxes : true ,
7382
7483 // link to open this plot in plotly
@@ -86,18 +95,24 @@ module.exports = {
8695 // display the mode bar (true, false, or 'hover')
8796 displayModeBar : 'hover' ,
8897
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+ */
91102 modeBarButtonsToRemove : [ ] ,
92103
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+ */
95108 modeBarButtonsToAdd : [ ] ,
96109
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+ */
101116 modeBarButtons : false ,
102117
103118 // add the plotly logo on the end of the mode bar
@@ -106,51 +121,65 @@ module.exports = {
106121 // increase the pixel ratio for Gl plot images
107122 plotGlPixelRatio : 2 ,
108123
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+ */
113130 setBackground : 'transparent' ,
114131
115132 // URL to topojson files used in geo charts
116133 topojsonURL : 'https://cdn.plot.ly/' ,
117134
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+ */
121140 mapboxAccessToken : null ,
122141
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+ */
128149 logging : 1 ,
129150
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+ */
132155 globalTransforms : [ ] ,
133156
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+ */
136161 locale : 'en-US' ,
137162
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 : { }
156185} ;
0 commit comments