Skip to content

Commit e7eeb38

Browse files
committed
add category 'noSortingByValue' and tag appropriate Cartesian traces
1 parent e86c95b commit e7eeb38

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

src/traces/carpet/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = {
1919
moduleType: 'trace',
2020
name: 'carpet',
2121
basePlotModule: require('../../plots/cartesian'),
22-
categories: ['cartesian', 'svg', 'carpet', 'carpetAxis', 'notLegendIsolatable', 'noMultiCategory', 'noHover'],
22+
categories: ['cartesian', 'svg', 'carpet', 'carpetAxis', 'notLegendIsolatable', 'noMultiCategory', 'noHover', 'noSortingByValue'],
2323
meta: {
2424
description: [
2525
'The data describing carpet axis layout is set in `y` and (optionally)',

src/traces/contourcarpet/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = {
1919
moduleType: 'trace',
2020
name: 'contourcarpet',
2121
basePlotModule: require('../../plots/cartesian'),
22-
categories: ['cartesian', 'svg', 'carpet', 'contour', 'symbols', 'showLegend', 'hasLines', 'carpetDependent', 'noHover'],
22+
categories: ['cartesian', 'svg', 'carpet', 'contour', 'symbols', 'showLegend', 'hasLines', 'carpetDependent', 'noHover', 'noSortingByValue'],
2323
meta: {
2424
hrName: 'contour_carpet',
2525
description: [

src/traces/image/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = {
2020
moduleType: 'trace',
2121
name: 'image',
2222
basePlotModule: require('../../plots/cartesian'),
23-
categories: ['cartesian', 'svg', '2dMap'],
23+
categories: ['cartesian', 'svg', '2dMap', 'noSortingByValue'],
2424
animatable: false,
2525
meta: {
2626
description: [

test/jasmine/tests/calcdata_test.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -885,11 +885,9 @@ describe('calculated data and points', function() {
885885
return t.categories.length && t.categories.indexOf('cartesian') !== -1;
886886
});
887887

888-
// excludedTraces are traces that do not support sorting by value
889-
var excludedTraces = [ 'carpet', 'contourcarpet', 'image'];
890-
888+
// exclude traces that do not support sorting by value
891889
var supportedCartesianTraces = cartesianTraces.filter(function(t) {
892-
if(excludedTraces.indexOf(t.type) === -1) return true;
890+
if(t.categories.indexOf('noSortingByValue') === -1) return true;
893891
});
894892

895893
var cat = ['a', 'b', 'c'];

0 commit comments

Comments
 (0)