Skip to content

modebar can't be hidden with multiple traces #56

Closed
@mheilman

Description

@mheilman

It looks like the mode bar can't be hidden in line charts with more than one trace (though it works fine for single trace charts).

Here's a minimal example:

<html>
<body>
  <div id="plotly-div"></div>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<script>

var trace1 = { x: [0, 1], y: [4, 5], type: "scatter"};
var trace2 = { x: [0, 1], y: [4, 5], type: "scatter"};
//var data = [trace1];  // This works: the mode bar gets removed.
var data = [trace1, trace2];  // This doesn't work: the mode bar remains.
Plotly.plot('plotly-div', data, {}, { displayModeBar: false });

</script>
</body>
</html>

I looked through the code a bit and thought that perhaps this has something to do with this comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions