Skip to content

Commit 6465c6c

Browse files
committed
add tick label and tick value attributes/default to ternary axes
1 parent 6cefff0 commit 6465c6c

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

src/plots/ternary/layout/axis_attributes.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,23 @@ module.exports = {
1818
titlefont: axesAttrs.titlefont,
1919
color: axesAttrs.color,
2020
// ticks
21+
tickmode: axesAttrs.tickmode,
2122
nticks: extendFlat({}, axesAttrs.nticks, {dflt: 6, min: 1}),
23+
tick0: axesAttrs.tick0,
24+
dtick: axesAttrs.dtick,
25+
tickvals: axesAttrs.tickvals,
26+
ticktext: axesAttrs.ticktext,
2227
ticks: axesAttrs.ticks,
2328
ticklen: axesAttrs.ticklen,
2429
tickwidth: axesAttrs.tickwidth,
2530
tickcolor: axesAttrs.tickcolor,
2631
showticklabels: axesAttrs.showticklabels,
32+
showtickprefix: axesAttrs.showtickprefix,
33+
tickprefix: axesAttrs.tickprefix,
34+
showticksuffix: axesAttrs.showticksuffix,
35+
ticksuffix: axesAttrs.ticksuffix,
36+
showexponent: axesAttrs.showexponent,
37+
exponentformat: axesAttrs.exponentformat,
2738
tickfont: axesAttrs.tickfont,
2839
tickangle: axesAttrs.tickangle,
2940
tickformat: axesAttrs.tickformat,

src/plots/ternary/layout/axis_defaults.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ var colorMix = require('tinycolor2').mix;
1313
var Lib = require('../../../lib');
1414

1515
var layoutAttributes = require('./axis_attributes');
16+
var handleTickLabelDefaults = require('../../cartesian/tick_label_defaults');
1617
var handleTickMarkDefaults = require('../../cartesian/tick_mark_defaults');
18+
var handleTickValueDefaults = require('../../cartesian/tick_value_defaults');
19+
1720

1821
module.exports = function supplyLayoutDefaults(containerIn, containerOut, options) {
1922

@@ -48,10 +51,11 @@ module.exports = function supplyLayoutDefaults(containerIn, containerOut, option
4851
// range is just set by 'min' - max is determined by the other axes mins
4952
coerce('min');
5053

51-
coerce('nticks');
52-
54+
handleTickValueDefaults(containerIn, containerOut, coerce, 'linear');
55+
handleTickLabelDefaults(containerIn, containerOut, coerce, 'linear',
56+
{ noHover: false });
5357
handleTickMarkDefaults(containerIn, containerOut, coerce, 'linear',
54-
{outerticks: false});
58+
{ outerticks: false });
5559

5660
// TODO - below is a bit repetitious from cartesian still...
5761

0 commit comments

Comments
 (0)