Skip to content

Commit 643f7a7

Browse files
committed
introduce new attribute for log axes
1 parent 5e2163b commit 643f7a7

File tree

4 files changed

+66
-0
lines changed

4 files changed

+66
-0
lines changed

src/plots/cartesian/layout_attributes.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,17 @@ module.exports = {
768768
'and values (if desired) can include html-like tags or MathJax.'
769769
].join(' ')
770770
},
771+
loglabels: {
772+
valType: 'enumerated',
773+
values: ['small digits', 'full value'],
774+
dflt: 'small digits',
775+
editType: 'calc',
776+
description: [
777+
'Determines how minor log labels are displayed.',
778+
'If *small digits*, small digits are displayed for minor ticks.',
779+
'If *full value*, full values are displayed for minor ticks.',
780+
].join(' ')
781+
},
771782
automargin: {
772783
valType: 'flaglist',
773784
flags: ['height', 'width', 'left', 'right', 'top', 'bottom'],

src/plots/cartesian/tick_label_defaults.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ module.exports = function handleTickLabelDefaults(containerIn, containerOut, coe
7070
coerce('separatethousands');
7171
}
7272
}
73+
74+
if(axType === 'log') {
75+
coerce('loglabels');
76+
}
7377
}
7478
};
7579

src/plots/gl3d/layout/axis_attributes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ module.exports = overrideAll({
9797
tickcolor: axesAttrs.tickcolor,
9898
showticklabels: axesAttrs.showticklabels,
9999
labelalias: axesAttrs.labelalias,
100+
loglabels: axesAttrs.loglabels,
100101
tickfont: axesAttrs.tickfont,
101102
tickangle: axesAttrs.tickangle,
102103
tickprefix: axesAttrs.tickprefix,

test/plot-schema.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7262,6 +7262,16 @@
72627262
"min": 0,
72637263
"valType": "number"
72647264
},
7265+
"loglabels": {
7266+
"description": "Determines how minor log labels are displayed. If *small digits*, small digits are displayed for minor ticks. If *full value*, full values are displayed for minor ticks.",
7267+
"dflt": "small digits",
7268+
"editType": "plot",
7269+
"valType": "enumerated",
7270+
"values": [
7271+
"small digits",
7272+
"full value"
7273+
]
7274+
},
72657275
"maxallowed": {
72667276
"description": "Determines the maximum range of this axis.",
72677277
"editType": "plot",
@@ -8001,6 +8011,16 @@
80018011
"min": 0,
80028012
"valType": "number"
80038013
},
8014+
"loglabels": {
8015+
"description": "Determines how minor log labels are displayed. If *small digits*, small digits are displayed for minor ticks. If *full value*, full values are displayed for minor ticks.",
8016+
"dflt": "small digits",
8017+
"editType": "plot",
8018+
"valType": "enumerated",
8019+
"values": [
8020+
"small digits",
8021+
"full value"
8022+
]
8023+
},
80048024
"maxallowed": {
80058025
"description": "Determines the maximum range of this axis.",
80068026
"editType": "plot",
@@ -8740,6 +8760,16 @@
87408760
"min": 0,
87418761
"valType": "number"
87428762
},
8763+
"loglabels": {
8764+
"description": "Determines how minor log labels are displayed. If *small digits*, small digits are displayed for minor ticks. If *full value*, full values are displayed for minor ticks.",
8765+
"dflt": "small digits",
8766+
"editType": "plot",
8767+
"valType": "enumerated",
8768+
"values": [
8769+
"small digits",
8770+
"full value"
8771+
]
8772+
},
87438773
"maxallowed": {
87448774
"description": "Determines the maximum range of this axis.",
87458775
"editType": "plot",
@@ -13766,6 +13796,16 @@
1376613796
"min": 0,
1376713797
"valType": "number"
1376813798
},
13799+
"loglabels": {
13800+
"description": "Determines how minor log labels are displayed. If *small digits*, small digits are displayed for minor ticks. If *full value*, full values are displayed for minor ticks.",
13801+
"dflt": "small digits",
13802+
"editType": "calc",
13803+
"valType": "enumerated",
13804+
"values": [
13805+
"small digits",
13806+
"full value"
13807+
]
13808+
},
1376913809
"matches": {
1377013810
"description": "If set to another axis id (e.g. `x2`, `y`), the range of this axis will match the range of the corresponding axis in data-coordinates space. Moreover, matching axes share auto-range values, category lists and histogram auto-bins. Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint is currently forbidden. Moreover, note that matching axes must have the same `type`.",
1377113811
"editType": "calc",
@@ -15327,6 +15367,16 @@
1532715367
"min": 0,
1532815368
"valType": "number"
1532915369
},
15370+
"loglabels": {
15371+
"description": "Determines how minor log labels are displayed. If *small digits*, small digits are displayed for minor ticks. If *full value*, full values are displayed for minor ticks.",
15372+
"dflt": "small digits",
15373+
"editType": "calc",
15374+
"valType": "enumerated",
15375+
"values": [
15376+
"small digits",
15377+
"full value"
15378+
]
15379+
},
1533015380
"matches": {
1533115381
"description": "If set to another axis id (e.g. `x2`, `y`), the range of this axis will match the range of the corresponding axis in data-coordinates space. Moreover, matching axes share auto-range values, category lists and histogram auto-bins. Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint is currently forbidden. Moreover, note that matching axes must have the same `type`.",
1533215382
"editType": "calc",

0 commit comments

Comments
 (0)