Skip to content

Commit e97dccb

Browse files
committed
Draw tick labels for real axis
1 parent a976c68 commit e97dccb

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

src/plots/smith/smith.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,10 @@ proto.updateRadialAxis = function(fullLayout, polarLayout) {
389389
return strTranslate(ax.l2p(d.x) + innerRadius, 0);
390390
};
391391

392+
var transFn2 = function(d) {
393+
return strTranslate(ax.c2p(d.x), 12);
394+
};
395+
392396
// set special grid path function
393397
var gridPathFn = function(d) {
394398
var value = d.x
@@ -461,13 +465,21 @@ proto.updateRadialAxis = function(fullLayout, polarLayout) {
461465
crisp: false
462466
});
463467

464-
// Axes.drawLabels(gd, ax, {
465-
// vals: vals,
466-
// layer: layers['radial-axis'],
467-
// transFn: transFn,
468-
// // labelFns: Axes.makeLabelFns(ax, 0)
469-
// labelFns: labelFns
470-
// });
468+
Axes.drawLabels(gd, ax, {
469+
vals: [0.2, 0.5, 1.0, 2.0, 5.0].map(function (d) {
470+
return {
471+
x: d,
472+
text: d,
473+
font: '"Open Sans", verdana, arial, sans-serif',
474+
fontColor: '#444',
475+
fontSize: 12,
476+
};
477+
}),
478+
layer: layers['radial-axis'],
479+
transFn: transFn2,
480+
// labelFns: Axes.makeLabelFns(ax, 0),
481+
labelFns: labelFns
482+
});
471483
}
472484

473485
// stash 'actual' radial axis angle for drag handlers (in degrees)

0 commit comments

Comments
 (0)