Plotly stacked line hover
Hover over values to see 0's for lines not specified at that x. Is there a way to hide this?
HTML
<html>
<head>
</head>
<body>
<div id="test"></div>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
</body>
</html>
JavaScript
Plotly.newPlot('test', [{
line: { shape : 'vh' },
stackgroup: '1',
x: [1, 2],
y: [1, 1],
}, {
line: { shape : 'vh' },
stackgroup: '1',
x: [3, 4],
y: [2, 2],
}, {
line: { shape : 'vh' },
stackgroup: '1',
x: [3, 4, 5, 6],
y: [3, 3, 3, 3],
}], {
hovermode: 'x unified',
width: '100%',
});