plotly.js
Version:
The open source javascript graphing library that powers plotly
27 lines (21 loc) • 679 B
JavaScript
/**
* Copyright 2012-2020, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
;
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;
};