Skip to content

Filtering transform Category + Range #1135

Closed
@bpostlethwaite

Description

@bpostlethwaite

@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);

gives
image

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions