Skip to content

Commit a4f6839

Browse files
committed
Update descriptions to hint at template attributes
1 parent 3e45ab2 commit a4f6839

8 files changed

Lines changed: 48 additions & 14 deletions

File tree

src/lib/coerce.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ exports.valObjectMeta = {
240240
flaglist: {
241241
description: [
242242
'A string representing a combination of flags',
243-
'(order does not matter here).',
243+
'(flag order does not affect the output).',
244244
'Combine any of the available `flags` with *+*.',
245245
"(e.g. ('lines+markers')).",
246246
'Values in `extras` cannot be combined.'

src/plots/attributes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ module.exports = {
174174
dflt: 'all',
175175
editType: 'none',
176176
description: [
177-
'Determines which trace information appear on hover.',
177+
'Determines what trace information appears on hover.',
178178
'If `none` or `skip` are set, no information is displayed upon hovering.',
179179
'But, if `none` is set, click and hover events are still fired.'
180180
].join(' ')

src/traces/funnel/attributes.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,12 @@ module.exports = {
4141
editType: 'plot',
4242
arrayOk: false,
4343
description: [
44-
'Determines which trace information appear on the graph.',
44+
'Determines what trace information appears on the graph.',
4545
'In the case of having multiple funnels, percentages & totals',
46-
'are computed separately (per trace).'
46+
'are computed separately (per trace).',
47+
'Flags are rendered in a fixed order; use `texttemplate` if you',
48+
'need explicit control over the rendered string, including the',
49+
'order of fields and surrounding text.'
4750
].join(' ')
4851
},
4952
// TODO: incorporate `label` and `value` in the eventData

src/traces/funnelarea/attributes.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@ module.exports = {
5050
texttemplatefallback: templatefallbackAttrs({ editType: 'plot' }),
5151

5252
hoverinfo: extendFlat({}, baseAttrs.hoverinfo, {
53-
flags: ['label', 'text', 'value', 'percent', 'name']
53+
flags: ['label', 'text', 'value', 'percent', 'name'],
54+
description: [
55+
'Determines what trace information appears on hover.',
56+
'Flags are rendered in a fixed order; use `hovertemplate` if you',
57+
'need explicit control over the rendered string, including the',
58+
'order of fields and surrounding text.'
59+
].join(' ')
5460
}),
5561

5662
hovertemplate: hovertemplateAttrs({}, { keys: ['label', 'color', 'value', 'text', 'percent'] }),

src/traces/pie/attributes.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,21 @@ module.exports = {
133133
flags: ['label', 'text', 'value', 'percent'],
134134
extras: ['none'],
135135
editType: 'calc',
136-
description: ['Determines which trace information appear on the graph.'].join(' ')
136+
description: [
137+
'Determines what trace information appears on the graph.',
138+
'Flags are rendered in a fixed order; use `texttemplate` if you',
139+
'need explicit control over the rendered string, including the',
140+
'order of fields and surrounding text.'
141+
].join(' ')
137142
},
138143
hoverinfo: extendFlat({}, baseAttrs.hoverinfo, {
139-
flags: ['label', 'text', 'value', 'percent', 'name']
144+
flags: ['label', 'text', 'value', 'percent', 'name'],
145+
description: [
146+
'Determines what trace information appears on hover.',
147+
'Flags are rendered in a fixed order; use `hovertemplate` if you',
148+
'need explicit control over the rendered string, including the',
149+
'order of fields and surrounding text.'
150+
].join(' ')
140151
}),
141152
hovertemplate: hovertemplateAttrs({}, { keys: ['label', 'color', 'value', 'percent', 'text'] }),
142153
hovertemplatefallback: templatefallbackAttrs(),

src/traces/sankey/attributes.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var attrs = (module.exports = overrideAll(
1919
flags: [],
2020
arrayOk: false,
2121
description: [
22-
'Determines which trace information appear on hover.',
22+
'Determines what trace information appears on hover.',
2323
'If `none` or `skip` are set, no information is displayed upon hovering.',
2424
'But, if `none` is set, click and hover events are still fired.',
2525
'Note that this attribute is superseded by `node.hoverinfo` and `node.hoverinfo`',
@@ -150,7 +150,7 @@ var attrs = (module.exports = overrideAll(
150150
values: ['all', 'none', 'skip'],
151151
dflt: 'all',
152152
description: [
153-
'Determines which trace information appear when hovering nodes.',
153+
'Determines what trace information appears when hovering nodes.',
154154
'If `none` or `skip` are set, no information is displayed upon hovering.',
155155
'But, if `none` is set, click and hover events are still fired.'
156156
].join(' ')
@@ -242,7 +242,7 @@ var attrs = (module.exports = overrideAll(
242242
values: ['all', 'none', 'skip'],
243243
dflt: 'all',
244244
description: [
245-
'Determines which trace information appear when hovering links.',
245+
'Determines what trace information appears when hovering links.',
246246
'If `none` or `skip` are set, no information is displayed upon hovering.',
247247
'But, if `none` is set, click and hover events are still fired.'
248248
].join(' ')

src/traces/sunburst/attributes.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,12 @@ module.exports = {
138138
flags: ['label', 'text', 'value', 'current path', 'percent root', 'percent entry', 'percent parent'],
139139
extras: ['none'],
140140
editType: 'plot',
141-
description: ['Determines which trace information appear on the graph.'].join(' ')
141+
description: [
142+
'Determines what trace information appears on the graph.',
143+
'Flags are rendered in a fixed order; use `texttemplate` if you',
144+
'need explicit control over the rendered string, including the',
145+
'order of fields and surrounding text.'
146+
].join(' ')
142147
},
143148

144149
// TODO: incorporate `label` and `value` in the eventData
@@ -148,7 +153,13 @@ module.exports = {
148153
hovertext: pieAttrs.hovertext,
149154
hoverinfo: extendFlat({}, baseAttrs.hoverinfo, {
150155
flags: ['label', 'text', 'value', 'name', 'current path', 'percent root', 'percent entry', 'percent parent'],
151-
dflt: 'label+text+value+name'
156+
dflt: 'label+text+value+name',
157+
description: [
158+
'Determines what trace information appears on hover.',
159+
'Flags are rendered in a fixed order; use `hovertemplate` if you',
160+
'need explicit control over the rendered string, including the',
161+
'order of fields and surrounding text.'
162+
].join(' ')
152163
}),
153164
hovertemplate: hovertemplateAttrs({}, { keys: constants.eventDataKeys }),
154165
hovertemplatefallback: templatefallbackAttrs(),

src/traces/waterfall/attributes.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,12 @@ module.exports = {
8989
editType: 'plot',
9090
arrayOk: false,
9191
description: [
92-
'Determines which trace information appear on the graph.',
92+
'Determines what trace information appears on the graph.',
9393
'In the case of having multiple waterfalls, totals',
94-
'are computed separately (per trace).'
94+
'are computed separately (per trace).',
95+
'Flags are rendered in a fixed order; use `texttemplate` if you',
96+
'need explicit control over the rendered string, including the',
97+
'order of fields and surrounding text.'
9598
].join(' ')
9699
},
97100
// TODO: incorporate `label` and `value` in the eventData

0 commit comments

Comments
 (0)