Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/traces/histogram/calc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var isNumeric = require('fast-isnumeric');
var Lib = require('../../lib');
var Axes = require('../../plots/cartesian/axes');

var arraysToCalcdata = require('../bar/arrays_to_calcdata');
var binFunctions = require('./bin_functions');
var normFunctions = require('./norm_functions');
var doAvg = require('./average');
Expand Down Expand Up @@ -168,6 +169,8 @@ module.exports = function calc(gd, trace) {
}
}

arraysToCalcdata(cd, trace);

return cd;
};

Expand Down
Binary file added test/image/baselines/histogram_colorscale.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions test/image/mocks/histogram_colorscale.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"data": [
{
"xbins": {
"start": -1.5,
"end": 4.5,
"size": 1
},
"marker": {
"cmin": 0,
"colorscale": "Earth",
"color": [ 0, 1, 2, 3, 4, 5 ],
"cmax": 5
},
"x": [ 0, 1, 1, 2, 2, 2, 3, 3, 4 ],
"type": "histogram"
}
],
"layout": {
"height": 500,
"width": 700
}
}