Skip to content

Commit ea43b25

Browse files
committed
rename 'box' category 'box-violin'
1 parent bb252a5 commit ea43b25

File tree

6 files changed

+8
-10
lines changed

6 files changed

+8
-10
lines changed

src/components/legend/style.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ module.exports = function style(s, gd) {
197197
var trace = d[0].trace,
198198
pts = d3.select(this).select('g.legendpoints')
199199
.selectAll('path.legendbox')
200-
.data(Registry.traceIs(trace, 'box') && trace.visible ? [d] : []);
200+
.data(Registry.traceIs(trace, 'box-violin') && trace.visible ? [d] : []);
201201
pts.enter().append('path').classed('legendbox', true)
202202
// if we want the median bar, prepend M6,0H-6
203203
.attr('d', 'M6,6H-6V-6H6Z')

src/components/modebar/manage.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ function isSelectable(fullData) {
179179
if(scatterSubTypes.hasMarkers(trace) || scatterSubTypes.hasText(trace)) {
180180
selectable = true;
181181
}
182-
} else if(Registry.traceIs(trace, 'box')) {
183-
if(trace.boxpoints === 'all') {
182+
} else if(Registry.traceIs(trace, 'box-violin')) {
183+
if(trace.boxpoints === 'all' || trace.points === 'all') {
184184
selectable = true;
185185
}
186186
}

src/plots/cartesian/type_defaults.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function setAutoType(ax, data) {
7575

7676
for(var i = 0; i < data.length; i++) {
7777
trace = data[i];
78-
if(!Registry.traceIs(trace, 'box') ||
78+
if(!Registry.traceIs(trace, 'box-violin') ||
7979
(trace[axLetter + 'axis'] || axLetter) !== id) continue;
8080

8181
if(trace[posLetter] !== undefined) boxPositions.push(trace[posLetter][0]);
@@ -113,7 +113,7 @@ function getBoxPosLetter(trace) {
113113

114114
function isBoxWithoutPositionCoords(trace, axLetter) {
115115
var posLetter = getBoxPosLetter(trace),
116-
isBox = Registry.traceIs(trace, 'box'),
116+
isBox = Registry.traceIs(trace, 'box-violin'),
117117
isCandlestick = Registry.traceIs(trace._fullInput || {}, 'candlestick');
118118

119119
return (

src/traces/box/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Box.selectPoints = require('./select');
2424
Box.moduleType = 'trace';
2525
Box.name = 'box';
2626
Box.basePlotModule = require('../../plots/cartesian');
27-
Box.categories = ['cartesian', 'symbols', 'oriented', 'box', 'showLegend'];
27+
Box.categories = ['cartesian', 'symbols', 'oriented', 'box-violin', 'showLegend'];
2828
Box.meta = {
2929
description: [
3030
'In vertical (horizontal) box plots,',

src/traces/box/set_positions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module.exports = function setPositions(gd, plotinfo) {
4444
t = cd[0].t;
4545
trace = cd[0].trace;
4646

47-
if(trace.visible === true && Registry.traceIs(trace, 'box') &&
47+
if(trace.visible === true && trace.type === 'box' &&
4848
!t.empty &&
4949
trace.orientation === orientation &&
5050
trace.xaxis === xa._id &&

src/traces/violin/index.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ module.exports = {
2323
moduleType: 'trace',
2424
name: 'violin',
2525
basePlotModule: require('../../plots/cartesian'),
26-
// TODO
27-
// - should maybe rename 'box' category to something more general
28-
categories: ['cartesian', 'symbols', 'oriented', 'box', 'showLegend'],
26+
categories: ['cartesian', 'symbols', 'oriented', 'box-violin', 'showLegend'],
2927
meta: {
3028
description: [
3129
'In vertical (horizontal) violin plots,',

0 commit comments

Comments
 (0)