Closed
Description
@etpinard think I found another one for ya :)
var INCLUSIVE = '[]';
var EXCLUSIVE = '][';
var trace1 = {
x: [1, 2, 3],
y: [10, 20, 30],
mode: 'markers',
transforms: [{
type: 'filter',
operation: INCLUSIVE,
target: ['a', 'b', 'c'],
value: ['a', 'b']
}]
};
var trace2 = {
x: [1, 2, 3],
y: [30, 20, 10],
mode: 'markers',
transforms: [{
type: 'filter',
operation: EXCLUSIVE,
target: ['a', 'b', 'c'],
value: ['a', 'b']
}]
};
var data = [trace1, trace2];
var layout = {
title:'Filtering category data',
height: 400,
width: 480
};
Plotly.newPlot($('.js-plotly-plot')[0], data, layout);