plotly.js
Version:
The open source javascript graphing library that powers plotly
19 lines (14 loc) • 486 B
JavaScript
var arraysToCalcdata = require('../scatter/arrays_to_calcdata');
var calcColorscale = require('../scatter/colorscale_calc');
/**
* This is a kludge to put the array attributes into
* calcdata the way Scatter.plot does, so that legends and
* popovers know what to do with them.
*/
module.exports = function calc(gd, trace) {
var cd = [{x: false, y: false, trace: trace, t: {}}];
arraysToCalcdata(cd, trace);
calcColorscale(gd, trace);
return cd;
};
;