Skip to content

Commit 1b0e133

Browse files
committedNov 10, 2016
documentation updates
1 parent 05c762d commit 1b0e133

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed
 

‎src/plots/cartesian/axes.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ axes.coerceRef = function(containerIn, containerOut, gd, attr, dflt, extraOption
9292
*
9393
* Also cleans the values, since the attribute definition itself has to say
9494
* valType: 'any' to handle date axes. This allows us to accept:
95-
* - for category axes: category names, and convert them here into serial numbers
95+
* - for category axes: category names, and convert them here into serial numbers.
96+
* Note that this will NOT work for axis range endpoints, because we don't know
97+
* the category list yet (it's set by ax.makeCalcdata during calc)
98+
* but it works for component (note, shape, images) positions.
9699
* - for date axes: JS Dates or milliseconds, and convert to date strings
97100
* - for other types: coerce them to numbers
98101
*/

‎src/plots/cartesian/layout_attributes.js

+16-10
Original file line numberDiff line numberDiff line change
@@ -329,23 +329,29 @@ module.exports = {
329329
dflt: '',
330330
role: 'style',
331331
description: [
332-
'Sets the tick label formatting rule using the',
333-
'python/d3 number formatting language.',
334-
'See https://github.com/mbostock/d3/wiki/Formatting#numbers',
335-
'or https://docs.python.org/release/3.1.3/library/string.html#formatspec',
336-
'for more info.'
332+
'Sets the tick label formatting rule using d3 formatting mini-languages',
333+
'which are very similar to those in Python. For numbers, see:',
334+
'https://github.com/d3/d3-format/blob/master/README.md#locale_format',
335+
'And for dates see:',
336+
'https://github.com/d3/d3-time-format/blob/master/README.md#locale_format',
337+
'We add one item to d3\'s date formatter: *%{n}f* for fractional seconds',
338+
'with n digits. For example, *2016-10-13 09:15:23.456* with tickformat',
339+
'*%H~%M~%S.%2f* would display *09~15~23.46*'
337340
].join(' ')
338341
},
339342
hoverformat: {
340343
valType: 'string',
341344
dflt: '',
342345
role: 'style',
343346
description: [
344-
'Sets the hover text formatting rule for data values on this axis,',
345-
'using the python/d3 number formatting language.',
346-
'See https://github.com/mbostock/d3/wiki/Formatting#numbers',
347-
'or https://docs.python.org/release/3.1.3/library/string.html#formatspec',
348-
'for more info.'
347+
'Sets the hover text formatting rule using d3 formatting mini-languages',
348+
'which are very similar to those in Python. For numbers, see:',
349+
'https://github.com/d3/d3-format/blob/master/README.md#locale_format',
350+
'And for dates see:',
351+
'https://github.com/d3/d3-time-format/blob/master/README.md#locale_format',
352+
'We add one item to d3\'s date formatter: *%{n}f* for fractional seconds',
353+
'with n digits. For example, *2016-10-13 09:15:23.456* with tickformat',
354+
'*%H~%M~%S.%2f* would display *09~15~23.46*'
349355
].join(' ')
350356
},
351357
// lines and grids

0 commit comments

Comments
 (0)
Please sign in to comment.