Skip to content

Commit 9770f2c

Browse files
committed
misc things to get scatterpolar traces to show up
1 parent 0826ee7 commit 9770f2c

File tree

5 files changed

+23
-2
lines changed

5 files changed

+23
-2
lines changed

lib/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ Plotly.register([
4646
require('./contourcarpet'),
4747

4848
require('./ohlc'),
49-
require('./candlestick')
49+
require('./candlestick'),
50+
51+
require('./scatterpolar')
5052
]);
5153

5254
// transforms

lib/scatterpolar.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* Copyright 2012-2017, 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+
'use strict';
10+
11+
module.exports = require('../src/traces/scatterpolar');

src/components/calendars/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,10 @@ module.exports = {
238238
// from yaxis if they only apply to x (rangeselector/rangeslider)
239239
yaxis: {calendar: axisAttrs},
240240
zaxis: {calendar: axisAttrs}
241+
},
242+
polar: {
243+
radialaxis: {calendar: axisAttrs},
244+
angularaxis: {calendar: axisAttrs}
241245
}
242246
},
243247
transforms: {

src/components/modebar/manage.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ function getButtonGroups(gd, buttonsToRemove, buttonsToAdd) {
8181
var hasGL2D = fullLayout._has('gl2d');
8282
var hasTernary = fullLayout._has('ternary');
8383
var hasMapbox = fullLayout._has('mapbox');
84+
var hasPolar = fullLayout._has('polar');
8485

8586
var groups = [];
8687

@@ -115,7 +116,7 @@ function getButtonGroups(gd, buttonsToRemove, buttonsToAdd) {
115116
var allAxesFixed = areAllAxesFixed(fullLayout),
116117
dragModeGroup = [];
117118

118-
if(((hasCartesian || hasGL2D) && !allAxesFixed) || hasTernary) {
119+
if(((hasCartesian || hasGL2D) && !allAxesFixed) || hasTernary || hasPolar) {
119120
dragModeGroup = ['zoom2d', 'pan2d'];
120121
}
121122
if(hasMapbox || hasGeo) {

src/plot_api/plot_api.js

+3
Original file line numberDiff line numberDiff line change
@@ -2865,6 +2865,9 @@ function makePlotFramework(gd) {
28652865
// single cartesian layer for the whole plot
28662866
fullLayout._cartesianlayer = fullLayout._paper.append('g').classed('cartesianlayer', true);
28672867

2868+
// single polar layer for the whole plot
2869+
fullLayout._polarlayer = fullLayout._paper.append('g').classed('polarlayer', true);
2870+
28682871
// single ternary layer for the whole plot
28692872
fullLayout._ternarylayer = fullLayout._paper.append('g').classed('ternarylayer', true);
28702873

0 commit comments

Comments
 (0)