Skip to content

Commit bc8863c

Browse files
committed
no real axis title
1 parent 8796e76 commit bc8863c

14 files changed

+15
-154
lines changed

src/plots/polar/polar.js

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,9 @@ proto.updateRadialAxis = function(fullLayout, polarLayout) {
535535
};
536536

537537
proto.updateRadialAxisTitle = function(fullLayout, polarLayout, _angle) {
538+
if(this.isSmith) return;
539+
538540
var _this = this;
539-
var isSmith = this.isSmith;
540541
var gd = _this.gd;
541542
var radius = _this.radius;
542543
var cx = _this.cx;
@@ -560,21 +561,14 @@ proto.updateRadialAxisTitle = function(fullLayout, polarLayout, _angle) {
560561
h + ts * 0.8;
561562
}
562563

563-
var x, y, angle;
564-
if(isSmith) {
565-
x = cx;
566-
y = cy + pad;
567-
angle = 0;
568-
} else {
569-
angle = _angle !== undefined ? _angle : _this.radialAxisAngle;
564+
var angle = _angle !== undefined ? _angle : _this.radialAxisAngle;
570565

571-
var angleRad = deg2rad(angle);
572-
var cosa = Math.cos(angleRad);
573-
var sina = Math.sin(angleRad);
566+
var angleRad = deg2rad(angle);
567+
var cosa = Math.cos(angleRad);
568+
var sina = Math.sin(angleRad);
574569

575-
x = cx + (radius / 2) * cosa + pad * sina;
576-
y = cy - (radius / 2) * sina + pad * cosa;
577-
}
570+
var x = cx + (radius / 2) * cosa + pad * sina;
571+
var y = cy - (radius / 2) * sina + pad * cosa;
578572

579573
_this.layers['radial-axis-title'] = Titles.draw(gd, titleClass, {
580574
propContainer: radialLayout,

src/plots/smith/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ function clean(newFullData, newFullLayout, oldFullData, oldFullLayout) {
5050

5151
if(!newFullLayout[id] && !!oldSubplot) {
5252
oldSubplot.framework.remove();
53-
oldSubplot.layers['radial-axis-title'].remove();
5453

5554
for(var k in oldSubplot.clipPaths) {
5655
oldSubplot.clipPaths[k].remove();

src/plots/smith/layout_attributes.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,6 @@ var realAxisAttrs = {
7373
].join(' ')
7474
},
7575

76-
title: {
77-
text: extendFlat({}, axesAttrs.title.text, {editType: 'plot', dflt: ''}),
78-
font: extendFlat({}, axesAttrs.title.font, {editType: 'plot'}),
79-
80-
editType: 'plot'
81-
},
82-
8376
editType: 'calc',
8477
};
8578

src/plots/smith/layout_defaults.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,6 @@ function handleDefaults(contIn, contOut, coerce, opts) {
7070
if(visible) {
7171
if(axName === 'realaxis') {
7272
coerceAxis('side');
73-
74-
coerceAxis('title.text');
75-
Lib.coerceFont(coerceAxis, 'title.font', {
76-
family: opts.font.family,
77-
size: Lib.bigFont(opts.font.size),
78-
color: dfltFontColor
79-
});
8073
}
8174

8275
coerceAxis('tickvals');
-1.45 KB
Loading
-2.42 KB
Loading
-623 Bytes
Loading
-7.35 KB
Loading

test/image/mocks/zzz_smith_blank.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@
4242
"y": [0.56, 1]
4343
},
4444
"realaxis": {
45-
"side": "top",
46-
"title": {
47-
"text": "real title",
48-
"font": { "size": 20 }
49-
}
45+
"side": "top"
5046
}
5147
},
5248
"smith2": {
@@ -73,10 +69,6 @@
7369
"y": [0.56, 1]
7470
},
7571
"realaxis": {
76-
"title": {
77-
"text": "real title",
78-
"font": { "color": "red" }
79-
},
8072
"ticks": "top",
8173
"side": "bottom"
8274
},

test/image/mocks/zzz_smith_fills.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@
3939
},
4040
"realaxis": {
4141
"ticks": "top",
42-
"side": "bottom",
43-
"title": {
44-
"text": "Real axis<br>Title"
45-
}
42+
"side": "bottom"
4643
},
4744
"imaginaryaxis": {
4845
"ticks": "outside"
@@ -55,10 +52,7 @@
5552
},
5653
"realaxis": {
5754
"ticks": "top",
58-
"side": "top",
59-
"title": {
60-
"text": "Real axis<br>Title"
61-
}
55+
"side": "top"
6256
},
6357
"imaginaryaxis": {
6458
"ticks": "inside"

0 commit comments

Comments
 (0)