The open source JavaScript graphing library that powers Plotly

Show Sidebar Hide Sidebar

Filter in plotly.js

How to use D3.js-based Filters in Plotly.js.

var subject = ['Moe','Larry','Curly','Moe','Larry','Curly','Moe','Larry','Curly','Moe','Larry','Curly']
var score = [1,6,2,8,2,9,4,5,1,5,2,8]

var data = [{
  type: 'scatter',
  x: subject,
  y: score,
  mode: 'markers',
  transforms: [{
    type: 'filter',
    target: 'y',
    operation: '>',
    value: 4

var layout = {
	title: 'Filter Scores > 4'

Plotly.plot('graph', data, layout)
Still need help?
Contact Us

For guaranteed 24 hour response turnarounds, upgrade to a Developer Support Plan.