Skip to content

Commit 3680084

Browse files
author
Jon M. Mease
committed
Replace tooltip with hoverinfo
More consistent with other traces, and now it's possible to display only probabilities, only counts, both, none (with hover effects), or skip (not hover effects).
1 parent 22346d0 commit 3680084

File tree

4 files changed

+130
-104
lines changed

4 files changed

+130
-104
lines changed

src/traces/parcats/attributes.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
'use strict';
1010

1111
var extendFlat = require('../../lib/extend').extendFlat;
12+
var plotAttrs = require('../../plots/attributes');
1213
var colorAttributes = require('../../components/colorscale/attributes');
1314
var domainAttrs = require('../../plots/domain').attributes;
1415
var scatterAttrs = require('../scatter/attributes');
@@ -32,18 +33,13 @@ var line = extendFlat({
3233

3334
module.exports = {
3435
domain: domainAttrs({name: 'parcats', trace: true, editType: 'calc'}),
35-
36-
tooltip: {
37-
valType: 'boolean',
38-
dflt: true,
39-
role: 'info',
40-
editType: 'plot',
41-
description: 'Shows a tooltip when hover mode is `category` or `color`.'
42-
},
43-
36+
hoverinfo: extendFlat({}, plotAttrs.hoverinfo, {
37+
flags: ['count', 'probability'],
38+
editType: 'plot'
39+
}),
4440
hovermode: {
4541
valType: 'enumerated',
46-
values: ['none', 'category', 'color'],
42+
values: ['category', 'color'],
4743
dflt: 'category',
4844
role: 'info',
4945
editType: 'plot',

src/traces/parcats/defaults.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
8282
mergeLength(traceOut, dimensions, 'values', len);
8383

8484
coerce('hovermode');
85-
coerce('tooltip');
8685
coerce('bundlecolors');
8786
coerce('sortpaths');
8887
coerce('counts');

0 commit comments

Comments
 (0)