plotly.js
Version:
The open source javascript graphing library that powers plotly
49 lines (43 loc) • 1.49 kB
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.
*/
;
module.exports = {
attributes: require('./attributes'),
supplyDefaults: require('./defaults'),
colorbar: require('../heatmap/colorbar'),
formatLabels: require('../scattermapbox/format_labels'),
calc: require('./calc'),
plot: require('./plot'),
hoverPoints: require('./hover'),
eventData: require('./event_data'),
getBelow: function(trace, subplot) {
var mapLayers = subplot.getMapLayers();
// find first layer with `type: 'symbol'`,
// that is not a plotly layer
for(var i = 0; i < mapLayers.length; i++) {
var layer = mapLayers[i];
var layerId = layer.id;
if(layer.type === 'symbol' &&
typeof layerId === 'string' && layerId.indexOf('plotly-') === -1
) {
return layerId;
}
}
},
moduleType: 'trace',
name: 'densitymapbox',
basePlotModule: require('../../plots/mapbox'),
categories: ['mapbox', 'gl', 'showLegend'],
meta: {
hr_name: 'density_mapbox',
description: [
'Draws a bivariate kernel density estimation with a Gaussian kernel',
'from `lon` and `lat` coordinates and optional `z` values using a colorscale.'
].join(' ')
}
};