Skip to content

Commit 7e93370

Browse files
committed
Change tickmode 'proportional' to 'domain array'
1 parent c3f590d commit 7e93370

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/plot_api/plot_api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2945,7 +2945,7 @@ function getDiffFlags(oldContainer, newContainer, outerparts, opts) {
29452945
// so newContainer won't have them.
29462946
if((key === 'tick0' || key === 'dtick') && outerparts[0] !== 'geo') {
29472947
var tickMode = newContainer.tickmode;
2948-
if(tickMode === 'auto' || tickMode === 'array' || tickMode === 'proportional' || !tickMode) continue;
2948+
if(tickMode === 'auto' || tickMode === 'array' || tickMode === 'domain array' || !tickMode) continue;
29492949
}
29502950
// FIXME: Similarly for axis ranges for 3D
29512951
// contourcarpet doesn't HAVE zmin/zmax, they're just auto-added. It needs them.

src/plots/cartesian/axes.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -682,10 +682,10 @@ axes.prepTicks = function(ax, opts) {
682682
if(ax._name === 'radialaxis') nt *= 2;
683683
}
684684

685-
if(!(ax.minor && (ax.minor.tickmode !== 'array' && ax.minor.tickmode !== 'proportional'))) {
685+
if(!(ax.minor && (ax.minor.tickmode !== 'array' && ax.minor.tickmode !== 'domain array'))) {
686686
// add a couple of extra digits for filling in ticks when we
687687
// have explicit tickvals without tick text
688-
if(ax.tickmode === 'array' || ax.tickmode === 'proportional') nt *= 100;
688+
if(ax.tickmode === 'array' || ax.tickmode === 'domain array') nt *= 100;
689689
}
690690

691691
ax._roughDTick = Math.abs(rng[1] - rng[0]) / nt;
@@ -949,13 +949,13 @@ axes.calcTicks = function calcTicks(ax, opts) {
949949
axes.prepTicks(mockAx, opts);
950950
}
951951

952-
// tickmode 'proportional' is just 'array' but with a pre-calc step
952+
// tickmode 'domain array' is just 'array' but with a pre-calc step
953953
// original comment:
954954
// now that we've figured out the auto values for formatting
955955
// in case we're missing some ticktext, we can break out for array ticks
956-
if(mockAx.tickmode === 'array' || mockAx.tickmode === 'proportional') {
956+
if(mockAx.tickmode === 'array' || mockAx.tickmode === 'domain array') {
957957
// Mapping proportions to array:
958-
if(mockAx.tickmode === 'proportional') {
958+
if(mockAx.tickmode === 'domain array') {
959959
var width = (maxRange - minRange);
960960
if(axrev) width *= -1;
961961
var offset = !axrev ? minRange : maxRange;
@@ -1248,7 +1248,7 @@ axes.calcTicks = function calcTicks(ax, opts) {
12481248
ticksOut[0].noTick = true;
12491249
}
12501250

1251-
// Reset tickvals back to proportional
1251+
// Reset tickvals back to domain array
12521252
if(tickFractionalVals._isSet) {
12531253
delete tickFractionalVals._isSet;
12541254
Lib.nestedProperty(ax, 'tickvals').set(tickFractionalVals);
@@ -1662,7 +1662,7 @@ axes.tickFirst = function(ax, opts) {
16621662
// more precision for hovertext
16631663
axes.tickText = function(ax, x, hover, noSuffixPrefix) {
16641664
var out = tickTextObj(ax, x);
1665-
var arrayMode = (ax.tickmode === 'array' || ax.tickmode === 'proportional');
1665+
var arrayMode = (ax.tickmode === 'array' || ax.tickmode === 'domain array');
16661666
var extraPrecision = hover || arrayMode;
16671667
var axType = ax.type;
16681668
// TODO multicategory, if we allow ticktext / tickvals
@@ -3378,7 +3378,7 @@ axes.drawGrid = function(gd, ax, opts) {
33783378

33793379
var counterAx = opts.counterAxis;
33803380
if(counterAx && axes.shouldShowZeroLine(gd, ax, counterAx)) {
3381-
var isArrayMode = (ax.tickmode === 'array' || ax.tickmode === 'proportional');
3381+
var isArrayMode = (ax.tickmode === 'array' || ax.tickmode === 'domain array');
33823382
for(var i = 0; i < majorVals.length; i++) {
33833383
var xi = majorVals[i].x;
33843384
if(isArrayMode ? !xi : (Math.abs(xi) < ax.dtick / 100)) {

src/plots/cartesian/layout_attributes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var DAY_OF_WEEK = constants.WEEKDAY_PATTERN;
1414

1515
var minorTickmode = {
1616
valType: 'enumerated',
17-
values: ['auto', 'linear', 'array', 'proportional'],
17+
values: ['auto', 'linear', 'array', 'domain array'],
1818
editType: 'ticks',
1919
impliedEdits: {tick0: undefined, dtick: undefined},
2020
description: [
@@ -26,7 +26,7 @@ var minorTickmode = {
2626
'If *array*, the placement of the ticks is set via `tickvals`,',
2727
'which are actual values, and the tick text is `ticktext`.',
2828
'(*array* is the default value if `tickvals` is provided).',
29-
'If *proportional*, the placement is similiar to *array* except that',
29+
'If *domain array*, the placement is similiar to *array* except that',
3030
'`tickvals` are fractions between 0 and 1 representing distance on',
3131
'the corresponding axis.'
3232
].join(' ')

0 commit comments

Comments
 (0)