Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e18c8e8

Browse files
committed
Enable default fonts if spec doesn't specify any
1 parent d25ea5a commit e18c8e8

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/plots/smith/smith.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -411,14 +411,16 @@ proto.updateRadialAxis = function(fullLayout, smithLayout) {
411411
crisp: false
412412
});
413413

414+
var font = ax.tickfont || {};
415+
414416
Axes.drawLabels(gd, ax, {
415417
vals: realStops.map(function(d) {
416418
return {
417419
x: d,
418420
text: d,
419-
font: ax.tickfont.family,
420-
fontColor: ax.tickfont.color,
421-
fontSize: ax.tickfont.size
421+
font: font.family,
422+
fontColor: font.color,
423+
fontSize: font.size
422424
};
423425
}),
424426
layer: layers['radial-axis'],
@@ -606,12 +608,14 @@ proto.updateAngularAxis = function(fullLayout, smithLayout) {
606608
var radius = _this.radius / v;
607609
var theta = 2.0 * Math.atan2(radius, _this.radius);
608610

611+
var font = ax.tickfont || {};
612+
609613
return {
610614
x: theta * 360.0 / (2 * Math.PI),
611615
text: v === Infinity ? '∞' : ((v === 0.0 ? '0 + 0' : v) + 'j'),
612-
font: ax.tickfont.family,
613-
fontColor: ax.tickfont.color,
614-
fontSize: ax.tickfont.size
616+
font: font.family,
617+
fontColor: font.color,
618+
fontSize: font.size
615619
};
616620
}),
617621
layer: layers['angular-axis'],

0 commit comments

Comments
 (0)