Show only min, max and median in boxplot - plotly js

Viewed 582

i am just getting started with plotly js. And, I am trying to use boxplot, but it is showing min, max, q1, q3 and median. But, I want to display only min,max and median on hover.

My code:

var y0 = [];
var y1 = [];
for (var i = 0; i < 50; i ++) {
    y0[i] = Math.random();
    y1[i] = Math.random() + 1;
}

var trace1 = {
  y: y0,
  type: 'box'
};


var data = [trace1];

Plotly.newPlot('myDiv', data);
<head>
    <!-- Load plotly.js into the DOM -->
    <script src='https://cdn.plot.ly/plotly-latest.min.js'></script>
</head>

<body>
    <div id='myDiv'><!-- Plotly chart will be drawn inside this DIV --></div>
</body>

jsfiddle

0 Answers
Related