Skip to content

Commit 3c26428

Browse files
committed
create choropleth-only calc step (can no longer re-use surface's)
1 parent 608a706 commit 3c26428

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/traces/choropleth/calc.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Copyright 2012-2016, Plotly, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
10+
'use strict';
11+
12+
var colorscaleCalc = require('../../components/colorscale/calc');
13+
14+
15+
module.exports = function calc(gd, trace) {
16+
colorscaleCalc(trace, trace.z, '', 'z');
17+
};

src/traces/choropleth/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var Choropleth = {};
1414
Choropleth.attributes = require('./attributes');
1515
Choropleth.supplyDefaults = require('./defaults');
1616
Choropleth.colorbar = require('../heatmap/colorbar');
17-
Choropleth.calc = require('../surface/calc');
17+
Choropleth.calc = require('./calc');
1818
Choropleth.plot = require('./plot').plot;
1919

2020
Choropleth.moduleType = 'trace';

0 commit comments

Comments
 (0)