@@ -9,14 +9,9 @@ function axisHoverFormat(x, noDates) {
9
9
valType : 'string' ,
10
10
dflt : '' ,
11
11
editType : 'none' ,
12
- description : [
13
- 'Sets the hover text formatting rule for `' + x + '`' ,
14
- ' using d3 formatting mini-languages which are very similar to those in Python.' ,
15
- 'See: ' + FORMAT_LINK + (
16
- noDates ?
17
- '' :
18
- ' And for dates see: ' + DATE_FORMAT_LINK
19
- ) ,
12
+ description : (
13
+ noDates ? descriptionOnlyNumbers : descriptionWithDates
14
+ ) ( 'hover text' , x ) + [
20
15
'By default the values are formatted using ' + (
21
16
noDates ?
22
17
'generic number format' :
@@ -26,15 +21,16 @@ function axisHoverFormat(x, noDates) {
26
21
} ;
27
22
}
28
23
29
- function descriptionOnlyNumbers ( label ) {
24
+ function descriptionOnlyNumbers ( label , x ) {
30
25
return [
31
- 'Sets the ' + label + ' formatting rule using d3 formatting mini-languages' ,
26
+ 'Sets the ' + label + ' formatting rule' + ( x ? 'for `' + x + '` ' : '' ) ,
27
+ 'using d3 formatting mini-languages' ,
32
28
'which are very similar to those in Python. For numbers, see: ' + FORMAT_LINK
33
29
] . join ( ' ' ) ;
34
30
}
35
31
36
- function descriptionWithDates ( label ) {
37
- return descriptionOnlyNumbers ( label ) + [
32
+ function descriptionWithDates ( label , x ) {
33
+ return descriptionOnlyNumbers ( label , x ) + [
38
34
' And for dates see: ' + DATE_FORMAT_LINK ,
39
35
'We add two items to d3\'s date formatter:' ,
40
36
'*%h* for half of the year as a decimal number as well as' ,
0 commit comments