Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7433f7a commit 3356c9eCopy full SHA for 3356c9e
src/traces/histogram/calc.js
@@ -15,8 +15,9 @@ var getBinSpanLabelRound = require('./bin_label_vals');
15
function calc(gd, trace) {
16
var pos = [];
17
var size = [];
18
- var pa = Axes.getFromId(gd, trace.orientation === 'h' ? trace.yaxis : trace.xaxis);
19
- var mainData = trace.orientation === 'h' ? 'y' : 'x';
+ var isHorizontal = trace.orientation === 'h';
+ var pa = Axes.getFromId(gd, isHorizontal ? trace.yaxis : trace.xaxis);
20
+ var mainData = isHorizontal ? 'y' : 'x';
21
var counterData = {x: 'y', y: 'x'}[mainData];
22
var calendar = trace[mainData + 'calendar'];
23
var cumulativeSpec = trace.cumulative;
0 commit comments