Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
290 changes: 137 additions & 153 deletions src/lib/coerce.js

Large diffs are not rendered by default.

28 changes: 10 additions & 18 deletions src/plots/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var fxAttrs = require('../components/fx/attributes');
module.exports = {
type: {
valType: 'enumerated',
values: [], // listed dynamically
values: [], // listed dynamically
dflt: 'scatter',
editType: 'calc+clearAxisTypes',
_noTemplating: true // we handle this at a higher level
Expand All @@ -27,10 +27,9 @@ module.exports = {
valType: 'boolean',
dflt: true,
editType: 'style',
description: [
'Determines whether or not an item corresponding to this',
'trace is shown in the legend.'
].join(' ')
description: ['Determines whether or not an item corresponding to this', 'trace is shown in the legend.'].join(
' '
)
},
legend: {
valType: 'subplotid',
Expand Down Expand Up @@ -59,17 +58,13 @@ module.exports = {
valType: 'string',
dflt: '',
editType: 'style',
description: [
'Sets the title of the legend group.'
].join(' ')
description: ['Sets the title of the legend group.'].join(' ')
},
font: fontAttrs({
editType: 'style',
description: [
'Sets this legend group\'s title font.'
].join(' '),
description: ["Sets this legend group's title font."].join(' ')
}),
editType: 'style',
editType: 'style'
},
legendrank: {
valType: 'number',
Expand All @@ -90,7 +85,7 @@ module.exports = {
valType: 'number',
min: 0,
editType: 'style',
description: 'Sets the width (in px or fraction) of the legend for this trace.',
description: 'Sets the width (in px or fraction) of the legend for this trace.'
},
opacity: {
valType: 'number',
Expand All @@ -103,10 +98,7 @@ module.exports = {
name: {
valType: 'string',
editType: 'style',
description: [
'Sets the trace name.',
'The trace name appears as the legend item and on hover.'
].join(' ')
description: ['Sets the trace name.', 'The trace name appears as the legend item and on hover.'].join(' ')
},
uid: {
valType: 'string',
Expand Down Expand Up @@ -182,7 +174,7 @@ module.exports = {
dflt: 'all',
editType: 'none',
description: [
'Determines which trace information appear on hover.',
'Determines what trace information appears on hover.',
'If `none` or `skip` are set, no information is displayed upon hovering.',
'But, if `none` is set, click and hover events are still fired.'
].join(' ')
Expand Down
7 changes: 5 additions & 2 deletions src/traces/funnel/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ module.exports = {
editType: 'plot',
arrayOk: false,
description: [
'Determines which trace information appear on the graph.',
'Determines what trace information appears on the graph.',
'In the case of having multiple funnels, percentages & totals',
'are computed separately (per trace).'
'are computed separately (per trace).',
'Flags are rendered in a fixed order; use `texttemplate` if you',
'need explicit control over the rendered string, including the',
'order of fields and surrounding text.'
].join(' ')
},
// TODO: incorporate `label` and `value` in the eventData
Expand Down
8 changes: 7 additions & 1 deletion src/traces/funnelarea/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ module.exports = {
texttemplatefallback: templatefallbackAttrs({ editType: 'plot' }),

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

hovertemplate: hovertemplateAttrs({}, { keys: ['label', 'color', 'value', 'text', 'percent'] }),
Expand Down
15 changes: 13 additions & 2 deletions src/traces/pie/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,21 @@ module.exports = {
flags: ['label', 'text', 'value', 'percent'],
extras: ['none'],
editType: 'calc',
description: ['Determines which trace information appear on the graph.'].join(' ')
description: [
'Determines what trace information appears on the graph.',
'Flags are rendered in a fixed order; use `texttemplate` if you',
'need explicit control over the rendered string, including the',
'order of fields and surrounding text.'
].join(' ')
},
hoverinfo: extendFlat({}, baseAttrs.hoverinfo, {
flags: ['label', 'text', 'value', 'percent', 'name']
flags: ['label', 'text', 'value', 'percent', 'name'],
description: [
'Determines what trace information appears on hover.',
'Flags are rendered in a fixed order; use `hovertemplate` if you',
'need explicit control over the rendered string, including the',
'order of fields and surrounding text.'
].join(' ')
}),
hovertemplate: hovertemplateAttrs({}, { keys: ['label', 'color', 'value', 'percent', 'text'] }),
hovertemplatefallback: templatefallbackAttrs(),
Expand Down
6 changes: 3 additions & 3 deletions src/traces/sankey/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var attrs = (module.exports = overrideAll(
flags: [],
arrayOk: false,
description: [
'Determines which trace information appear on hover.',
'Determines what trace information appears on hover.',
'If `none` or `skip` are set, no information is displayed upon hovering.',
'But, if `none` is set, click and hover events are still fired.',
'Note that this attribute is superseded by `node.hoverinfo` and `node.hoverinfo`',
Expand Down Expand Up @@ -150,7 +150,7 @@ var attrs = (module.exports = overrideAll(
values: ['all', 'none', 'skip'],
dflt: 'all',
description: [
'Determines which trace information appear when hovering nodes.',
'Determines what trace information appears when hovering nodes.',
'If `none` or `skip` are set, no information is displayed upon hovering.',
'But, if `none` is set, click and hover events are still fired.'
].join(' ')
Expand Down Expand Up @@ -242,7 +242,7 @@ var attrs = (module.exports = overrideAll(
values: ['all', 'none', 'skip'],
dflt: 'all',
description: [
'Determines which trace information appear when hovering links.',
'Determines what trace information appears when hovering links.',
'If `none` or `skip` are set, no information is displayed upon hovering.',
'But, if `none` is set, click and hover events are still fired.'
].join(' ')
Expand Down
15 changes: 13 additions & 2 deletions src/traces/sunburst/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,12 @@ module.exports = {
flags: ['label', 'text', 'value', 'current path', 'percent root', 'percent entry', 'percent parent'],
extras: ['none'],
editType: 'plot',
description: ['Determines which trace information appear on the graph.'].join(' ')
description: [
'Determines what trace information appears on the graph.',
'Flags are rendered in a fixed order; use `texttemplate` if you',
'need explicit control over the rendered string, including the',
'order of fields and surrounding text.'
].join(' ')
},

// TODO: incorporate `label` and `value` in the eventData
Expand All @@ -148,7 +153,13 @@ module.exports = {
hovertext: pieAttrs.hovertext,
hoverinfo: extendFlat({}, baseAttrs.hoverinfo, {
flags: ['label', 'text', 'value', 'name', 'current path', 'percent root', 'percent entry', 'percent parent'],
dflt: 'label+text+value+name'
dflt: 'label+text+value+name',
description: [
'Determines what trace information appears on hover.',
'Flags are rendered in a fixed order; use `hovertemplate` if you',
'need explicit control over the rendered string, including the',
'order of fields and surrounding text.'
].join(' ')
}),
hovertemplate: hovertemplateAttrs({}, { keys: constants.eventDataKeys }),
hovertemplatefallback: templatefallbackAttrs(),
Expand Down
7 changes: 5 additions & 2 deletions src/traces/waterfall/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,12 @@ module.exports = {
editType: 'plot',
arrayOk: false,
description: [
'Determines which trace information appear on the graph.',
'Determines what trace information appears on the graph.',
'In the case of having multiple waterfalls, totals',
'are computed separately (per trace).'
'are computed separately (per trace).',
'Flags are rendered in a fixed order; use `texttemplate` if you',
'need explicit control over the rendered string, including the',
'order of fields and surrounding text.'
].join(' ')
},
// TODO: incorporate `label` and `value` in the eventData
Expand Down
Loading
Loading