Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 32e4e09

Browse files
authored
Merge pull request plotly#1365 from plotly/barlayer-update-selection
Plot bar/histogram traces in bar layer update selection
2 parents 7c5a22d + 9d9aaa7 commit 32e4e09

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

src/traces/bar/plot.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ module.exports = function plot(gd, plotinfo, cdbar) {
3737

3838
var bartraces = plotinfo.plot.select('.barlayer')
3939
.selectAll('g.trace.bars')
40-
.data(cdbar)
41-
.enter().append('g')
40+
.data(cdbar);
41+
42+
bartraces.enter().append('g')
4243
.attr('class', 'trace bars');
4344

4445
bartraces.append('g')
13 KB
Loading
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"data": [
3+
{ "x": [1,1,1,1,1,2,2,2,3,3], "type": "histogram" },
4+
{ "x": [1,2,3], "y":[-1,-2,-3], "type": "bar" },
5+
{ "x": [1,2,3], "y":[-1,-2,-3], "type": "bar", "yaxis":"y2" },
6+
{ "x": [1,1,1,1,1,2,2,2,3,3], "type": "histogram", "yaxis":"y2" }
7+
],
8+
"layout": {
9+
"yaxis": { "domain": [0,0.49] },
10+
"yaxis2": { "domain": [0.51, 1] },
11+
"showlegend": false
12+
}
13+
}

0 commit comments

Comments
 (0)