From 98c69376d9b0817063c0d08ed00f98f79eb716c3 Mon Sep 17 00:00:00 2001 From: Ignacio Martinez Date: Thu, 27 Aug 2020 13:29:18 -0300 Subject: [PATCH 01/15] Add `eng` exponentformat for engineering notation Works just like `SI`, except it uses prefixes for kilo- and milli-. --- src/plots/cartesian/axes.js | 4 ++-- src/plots/cartesian/layout_attributes.js | 5 +++-- src/traces/carpet/axis_attributes.js | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/plots/cartesian/axes.js b/src/plots/cartesian/axes.js index 26e73e7b0cf..98282236b57 100644 --- a/src/plots/cartesian/axes.js +++ b/src/plots/cartesian/axes.js @@ -1042,7 +1042,7 @@ function autoTickRound(ax) { var maxend = Math.max(Math.abs(rng[0]), Math.abs(rng[1])); var rangeexp = Math.floor(Math.log(maxend) / Math.LN10 + 0.01); - if(Math.abs(rangeexp) > 3) { + if(Math.abs(rangeexp) > 3 || ax.exponentformat === 'eng') { if(isSIFormat(ax.exponentformat) && !beyondSI(rangeexp)) { ax._tickexponent = 3 * Math.round((rangeexp - 1) / 3); } else ax._tickexponent = rangeexp; @@ -1496,7 +1496,7 @@ function num2frac(num) { var SIPREFIXES = ['f', 'p', 'n', 'μ', 'm', '', 'k', 'M', 'G', 'T']; function isSIFormat(exponentFormat) { - return exponentFormat === 'SI' || exponentFormat === 'B'; + return exponentFormat === 'SI' || exponentFormat === 'B' || exponentFormat === 'eng'; } // are we beyond the range of common SI prefixes? diff --git a/src/plots/cartesian/layout_attributes.js b/src/plots/cartesian/layout_attributes.js index 3e732dda964..1c85109c983 100644 --- a/src/plots/cartesian/layout_attributes.js +++ b/src/plots/cartesian/layout_attributes.js @@ -665,7 +665,7 @@ module.exports = { }, exponentformat: { valType: 'enumerated', - values: ['none', 'e', 'E', 'power', 'SI', 'B'], + values: ['none', 'e', 'E', 'power', 'SI', 'B', 'eng'], dflt: 'B', role: 'style', editType: 'ticks', @@ -677,7 +677,8 @@ module.exports = { 'If *E*, 1E+9.', 'If *power*, 1x10^9 (with 9 in a super script).', 'If *SI*, 1G.', - 'If *B*, 1B.' + 'If *B*, 1B.', + '*eng* works like *SI*, except it also uses prefixes for milli- and kilo-.' ].join(' ') }, separatethousands: { diff --git a/src/traces/carpet/axis_attributes.js b/src/traces/carpet/axis_attributes.js index 16b03ee3c48..67edc66fb04 100644 --- a/src/traces/carpet/axis_attributes.js +++ b/src/traces/carpet/axis_attributes.js @@ -269,7 +269,7 @@ module.exports = { }, exponentformat: { valType: 'enumerated', - values: ['none', 'e', 'E', 'power', 'SI', 'B'], + values: ['none', 'e', 'E', 'power', 'SI', 'B', 'eng'], dflt: 'B', role: 'style', editType: 'calc', @@ -281,7 +281,8 @@ module.exports = { 'If *E*, 1E+9.', 'If *power*, 1x10^9 (with 9 in a super script).', 'If *SI*, 1G.', - 'If *B*, 1B.' + 'If *B*, 1B.', + '*eng* works like *SI*, except it also uses prefixes for milli- and kilo-.' ].join(' ') }, separatethousands: { From 65ae0f0770fc76362f70e66a88a749e5ab50c5a8 Mon Sep 17 00:00:00 2001 From: Ignacio Martinez Date: Tue, 1 Sep 2020 08:17:36 -0300 Subject: [PATCH 02/15] Create new axis attribute `minexponent` Hide SI prefix for 10^n if |n| <= minexponent --- src/components/colorbar/attributes.js | 1 + src/plots/cartesian/axes.js | 5 +++-- src/plots/cartesian/layout_attributes.js | 14 +++++++++++--- src/plots/cartesian/tick_label_defaults.js | 1 + src/plots/gl3d/layout/axis_attributes.js | 1 + src/plots/polar/layout_attributes.js | 1 + src/plots/ternary/layout_attributes.js | 1 + src/traces/carpet/axis_attributes.js | 14 +++++++++++--- src/traces/carpet/axis_defaults.js | 2 ++ src/traces/indicator/attributes.js | 1 + 10 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/components/colorbar/attributes.js b/src/components/colorbar/attributes.js index 8c34b050b17..9246d98fa26 100644 --- a/src/components/colorbar/attributes.js +++ b/src/components/colorbar/attributes.js @@ -173,6 +173,7 @@ module.exports = overrideAll({ showticksuffix: axesAttrs.showticksuffix, separatethousands: axesAttrs.separatethousands, exponentformat: axesAttrs.exponentformat, + minexponent: axesAttrs.minexponent, showexponent: axesAttrs.showexponent, title: { text: { diff --git a/src/plots/cartesian/axes.js b/src/plots/cartesian/axes.js index 98282236b57..275e7b0379c 100644 --- a/src/plots/cartesian/axes.js +++ b/src/plots/cartesian/axes.js @@ -1042,7 +1042,7 @@ function autoTickRound(ax) { var maxend = Math.max(Math.abs(rng[0]), Math.abs(rng[1])); var rangeexp = Math.floor(Math.log(maxend) / Math.LN10 + 0.01); - if(Math.abs(rangeexp) > 3 || ax.exponentformat === 'eng') { + if(Math.abs(rangeexp) > ax.minexponent) { if(isSIFormat(ax.exponentformat) && !beyondSI(rangeexp)) { ax._tickexponent = 3 * Math.round((rangeexp - 1) / 3); } else ax._tickexponent = rangeexp; @@ -1496,7 +1496,7 @@ function num2frac(num) { var SIPREFIXES = ['f', 'p', 'n', 'μ', 'm', '', 'k', 'M', 'G', 'T']; function isSIFormat(exponentFormat) { - return exponentFormat === 'SI' || exponentFormat === 'B' || exponentFormat === 'eng'; + return exponentFormat === 'SI' || exponentFormat === 'B'; } // are we beyond the range of common SI prefixes? @@ -1525,6 +1525,7 @@ function numFormat(v, ax, fmtoverride, hover) { // make a dummy axis obj to get the auto rounding and exponent var ah = { exponentformat: exponentFormat, + minexponent: ax.minexponent, dtick: ax.showexponent === 'none' ? ax.dtick : (isNumeric(v) ? Math.abs(v) || 1 : 1), // if not showing any exponents, don't change the exponent diff --git a/src/plots/cartesian/layout_attributes.js b/src/plots/cartesian/layout_attributes.js index 1c85109c983..6ee4ad376b5 100644 --- a/src/plots/cartesian/layout_attributes.js +++ b/src/plots/cartesian/layout_attributes.js @@ -665,7 +665,7 @@ module.exports = { }, exponentformat: { valType: 'enumerated', - values: ['none', 'e', 'E', 'power', 'SI', 'B', 'eng'], + values: ['none', 'e', 'E', 'power', 'SI', 'B'], dflt: 'B', role: 'style', editType: 'ticks', @@ -677,8 +677,16 @@ module.exports = { 'If *E*, 1E+9.', 'If *power*, 1x10^9 (with 9 in a super script).', 'If *SI*, 1G.', - 'If *B*, 1B.', - '*eng* works like *SI*, except it also uses prefixes for milli- and kilo-.' + 'If *B*, 1B.' + ].join(' ') + }, + minexponent: { + valType: 'number', + dflt: 3, + role: 'style', + editType: 'ticks', + description: [ + 'Hide SI prefix for 10^n if |n| is below this number' ].join(' ') }, separatethousands: { diff --git a/src/plots/cartesian/tick_label_defaults.js b/src/plots/cartesian/tick_label_defaults.js index ad3a1d166a1..959b200d828 100644 --- a/src/plots/cartesian/tick_label_defaults.js +++ b/src/plots/cartesian/tick_label_defaults.js @@ -72,6 +72,7 @@ function handleOtherDefaults(containerIn, containerOut, coerce, axType, options) if(!tickFormat && axType !== 'date') { coerce('showexponent', showAttrDflt); coerce('exponentformat'); + coerce('minexponent'); coerce('separatethousands'); } } diff --git a/src/plots/gl3d/layout/axis_attributes.js b/src/plots/gl3d/layout/axis_attributes.js index 4a805ff8dbb..76081cc764f 100644 --- a/src/plots/gl3d/layout/axis_attributes.js +++ b/src/plots/gl3d/layout/axis_attributes.js @@ -108,6 +108,7 @@ module.exports = overrideAll({ showticksuffix: axesAttrs.showticksuffix, showexponent: axesAttrs.showexponent, exponentformat: axesAttrs.exponentformat, + minexponent: axesAttrs.minexponent, separatethousands: axesAttrs.separatethousands, tickformat: axesAttrs.tickformat, tickformatstops: axesAttrs.tickformatstops, diff --git a/src/plots/polar/layout_attributes.js b/src/plots/polar/layout_attributes.js index fc296524e34..c9cf34ecf29 100644 --- a/src/plots/polar/layout_attributes.js +++ b/src/plots/polar/layout_attributes.js @@ -47,6 +47,7 @@ var axisTickAttrs = overrideAll({ ticksuffix: axesAttrs.ticksuffix, showexponent: axesAttrs.showexponent, exponentformat: axesAttrs.exponentformat, + minexponent: axesAttrs.minexponent, separatethousands: axesAttrs.separatethousands, tickfont: axesAttrs.tickfont, tickangle: axesAttrs.tickangle, diff --git a/src/plots/ternary/layout_attributes.js b/src/plots/ternary/layout_attributes.js index d451a6d729d..aa763b38b8e 100644 --- a/src/plots/ternary/layout_attributes.js +++ b/src/plots/ternary/layout_attributes.js @@ -40,6 +40,7 @@ var ternaryAxesAttrs = { ticksuffix: axesAttrs.ticksuffix, showexponent: axesAttrs.showexponent, exponentformat: axesAttrs.exponentformat, + minexponent: axesAttrs.minexponent, separatethousands: axesAttrs.separatethousands, tickfont: axesAttrs.tickfont, tickangle: axesAttrs.tickangle, diff --git a/src/traces/carpet/axis_attributes.js b/src/traces/carpet/axis_attributes.js index 67edc66fb04..6717f4d4622 100644 --- a/src/traces/carpet/axis_attributes.js +++ b/src/traces/carpet/axis_attributes.js @@ -269,7 +269,7 @@ module.exports = { }, exponentformat: { valType: 'enumerated', - values: ['none', 'e', 'E', 'power', 'SI', 'B', 'eng'], + values: ['none', 'e', 'E', 'power', 'SI', 'B'], dflt: 'B', role: 'style', editType: 'calc', @@ -281,8 +281,16 @@ module.exports = { 'If *E*, 1E+9.', 'If *power*, 1x10^9 (with 9 in a super script).', 'If *SI*, 1G.', - 'If *B*, 1B.', - '*eng* works like *SI*, except it also uses prefixes for milli- and kilo-.' + 'If *B*, 1B.' + ].join(' ') + }, + minexponent: { + valType: 'number', + dflt: 3, + role: 'style', + editType: 'ticks', + description: [ + 'Hide SI prefix for 10^n if |n| is below this number' ].join(' ') }, separatethousands: { diff --git a/src/traces/carpet/axis_defaults.js b/src/traces/carpet/axis_defaults.js index 680a787a6c8..f6ae5e36344 100644 --- a/src/traces/carpet/axis_defaults.js +++ b/src/traces/carpet/axis_defaults.js @@ -78,6 +78,7 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, options) coerce('separatethousands'); coerce('tickformat'); coerce('exponentformat'); + coerce('minexponent'); coerce('showexponent'); coerce('categoryorder'); @@ -186,6 +187,7 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, options) delete containerOut.tickangle; delete containerOut.showexponent; delete containerOut.exponentformat; + delete containerOut.minexponent; delete containerOut.tickformat; delete containerOut.showticksuffix; delete containerOut.showtickprefix; diff --git a/src/traces/indicator/attributes.js b/src/traces/indicator/attributes.js index e9bd0ab5c92..452f9665f1a 100644 --- a/src/traces/indicator/attributes.js +++ b/src/traces/indicator/attributes.js @@ -355,6 +355,7 @@ module.exports = { showticksuffix: axesAttrs.showticksuffix, separatethousands: axesAttrs.separatethousands, exponentformat: axesAttrs.exponentformat, + minexponent: axesAttrs.minexponent, showexponent: axesAttrs.showexponent, editType: 'plot' }, 'plot'), From c27653c1d4ab696d5ae119dadf5d4e6b6c3efd3e Mon Sep 17 00:00:00 2001 From: Ignacio Martinez Date: Thu, 3 Sep 2020 10:06:33 -0300 Subject: [PATCH 03/15] Add tests for `minexponent` attribute --- test/jasmine/tests/axes_test.js | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/test/jasmine/tests/axes_test.js b/test/jasmine/tests/axes_test.js index 1f9e9ca9781..f5717a28b39 100644 --- a/test/jasmine/tests/axes_test.js +++ b/test/jasmine/tests/axes_test.js @@ -2851,6 +2851,57 @@ describe('Test axes', function() { ]); }); + it('Does not use SI prefixes for 10^n with |n| < minexponent', function() { + var textOut = mockCalc({ + type: 'log', + tickmode: 'linear', + exponentformat: 'SI', + minexponent: 5, + showexponent: 'all', + tick0: 0, + dtick: 1, + range: [-18.5, 18.5] + }); + + expect(textOut).toEqual([ + '10\u221218', + '10\u221217', + '10\u221216', + '1f', '10f', '100f', '1p', '10p', '100p', '1n', '10n', '100n', + '1μ', '0.00001', '0.0001', '0.001', '0.01', '0.1', '1', '10', '100', + '1000', '10,000', '100,000', '1M', '10M', '100M', '1G', '10G', '100G', + '1T', '10T', '100T', + '1015', + '1016', + '1017', + '1018' + ]); + var textOut = mockCalc({ + type: 'log', + tickmode: 'linear', + exponentformat: 'SI', + minexponent: 0, + showexponent: 'all', + tick0: 0, + dtick: 1, + range: [-18.5, 18.5] + }); + + expect(textOut).toEqual([ + '10\u221218', + '10\u221217', + '10\u221216', + '1f', '10f', '100f', '1p', '10p', '100p', '1n', '10n', '100n', + '1μ', '10μ', '100μ', '1m', '10m', '100m', '1', '10', '100', + '1k', '10k', '100k', '1M', '10M', '100M', '1G', '10G', '100G', + '1T', '10T', '100T', + '1015', + '1016', + '1017', + '1018' + ]); + }); + it('supports e/E format on log axes', function() { ['e', 'E'].forEach(function(e) { var textOut = mockCalc({ From f74e17f7039e1dae8a5450e88074f3123ae85b01 Mon Sep 17 00:00:00 2001 From: Ignacio Martinez Date: Thu, 3 Sep 2020 11:02:40 -0300 Subject: [PATCH 04/15] minexponent test: do not redeclare textOut --- test/jasmine/tests/axes_test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/jasmine/tests/axes_test.js b/test/jasmine/tests/axes_test.js index f5717a28b39..a3682c8054c 100644 --- a/test/jasmine/tests/axes_test.js +++ b/test/jasmine/tests/axes_test.js @@ -2876,7 +2876,8 @@ describe('Test axes', function() { '1017', '1018' ]); - var textOut = mockCalc({ + + textOut = mockCalc({ type: 'log', tickmode: 'linear', exponentformat: 'SI', From 83273cf54ab951d745afe0f1ae272ed3ad460ecc Mon Sep 17 00:00:00 2001 From: Ignacio Martinez Date: Thu, 3 Sep 2020 11:04:25 -0300 Subject: [PATCH 05/15] minexponent: add minimum value --- src/plots/cartesian/layout_attributes.js | 1 + src/traces/carpet/axis_attributes.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/plots/cartesian/layout_attributes.js b/src/plots/cartesian/layout_attributes.js index 6ee4ad376b5..cf7b4ee72f6 100644 --- a/src/plots/cartesian/layout_attributes.js +++ b/src/plots/cartesian/layout_attributes.js @@ -683,6 +683,7 @@ module.exports = { minexponent: { valType: 'number', dflt: 3, + min: 0, role: 'style', editType: 'ticks', description: [ diff --git a/src/traces/carpet/axis_attributes.js b/src/traces/carpet/axis_attributes.js index 6717f4d4622..5d60657e757 100644 --- a/src/traces/carpet/axis_attributes.js +++ b/src/traces/carpet/axis_attributes.js @@ -287,6 +287,7 @@ module.exports = { minexponent: { valType: 'number', dflt: 3, + min: 0, role: 'style', editType: 'ticks', description: [ From f171cb6e4e4dd74cd9eb5d637dbc62736b50ff79 Mon Sep 17 00:00:00 2001 From: imartinezvazquez Date: Fri, 4 Sep 2020 08:19:05 -0300 Subject: [PATCH 06/15] axes_test mockCalc: add default value to minexponent attribute --- test/jasmine/tests/axes_test.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/jasmine/tests/axes_test.js b/test/jasmine/tests/axes_test.js index a3682c8054c..382dd1ce924 100644 --- a/test/jasmine/tests/axes_test.js +++ b/test/jasmine/tests/axes_test.js @@ -2722,6 +2722,7 @@ describe('Test axes', function() { describe('calcTicks and tickText', function() { function mockCalc(ax) { + ax = {minexponent: 3, ...ax}; ax.tickfont = {}; Axes.setConvert(ax, {separators: '.,', _extraFormat: { year: '%Y', From cb6ffefe20a46b1c253aa0c59f8336eba141c166 Mon Sep 17 00:00:00 2001 From: imartinezvazquez Date: Fri, 4 Sep 2020 08:27:03 -0300 Subject: [PATCH 07/15] traces/carpet/axis_attributes: set minexponent editType to `calc` --- src/traces/carpet/axis_attributes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/traces/carpet/axis_attributes.js b/src/traces/carpet/axis_attributes.js index 5d60657e757..a6e1ea53cfb 100644 --- a/src/traces/carpet/axis_attributes.js +++ b/src/traces/carpet/axis_attributes.js @@ -289,7 +289,7 @@ module.exports = { dflt: 3, min: 0, role: 'style', - editType: 'ticks', + editType: 'calc', description: [ 'Hide SI prefix for 10^n if |n| is below this number' ].join(' ') From 132272960707db5e2984b0f76c85e7a7a4ea13aa Mon Sep 17 00:00:00 2001 From: Ignacio Martinez Vazquez Date: Fri, 4 Sep 2020 09:55:55 -0300 Subject: [PATCH 08/15] axes_test: fix SyntaxError --- test/jasmine/tests/axes_test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/jasmine/tests/axes_test.js b/test/jasmine/tests/axes_test.js index 382dd1ce924..cb069396584 100644 --- a/test/jasmine/tests/axes_test.js +++ b/test/jasmine/tests/axes_test.js @@ -2722,7 +2722,7 @@ describe('Test axes', function() { describe('calcTicks and tickText', function() { function mockCalc(ax) { - ax = {minexponent: 3, ...ax}; + ax = Object.assign({minexponent: 3}, ax); ax.tickfont = {}; Axes.setConvert(ax, {separators: '.,', _extraFormat: { year: '%Y', From 16d1a1679b2a0d8ca07718f4afcb7edee99cc0c0 Mon Sep 17 00:00:00 2001 From: imartinezvazquez Date: Mon, 7 Sep 2020 10:17:30 -0300 Subject: [PATCH 09/15] mockCalc: ensure ax is modified in-place --- test/jasmine/tests/axes_test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/jasmine/tests/axes_test.js b/test/jasmine/tests/axes_test.js index cb069396584..ff06717dc28 100644 --- a/test/jasmine/tests/axes_test.js +++ b/test/jasmine/tests/axes_test.js @@ -2722,7 +2722,8 @@ describe('Test axes', function() { describe('calcTicks and tickText', function() { function mockCalc(ax) { - ax = Object.assign({minexponent: 3}, ax); + if (ax.minexponent === undefined) + ax.minexponent = 3; ax.tickfont = {}; Axes.setConvert(ax, {separators: '.,', _extraFormat: { year: '%Y', From ba408aa8f54ff1216957cbad87712f886585b006 Mon Sep 17 00:00:00 2001 From: imartinezvazquez Date: Mon, 7 Sep 2020 10:27:36 -0300 Subject: [PATCH 10/15] axes_test: fix SyntaxError --- test/jasmine/tests/axes_test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/jasmine/tests/axes_test.js b/test/jasmine/tests/axes_test.js index ff06717dc28..ee3ddaec706 100644 --- a/test/jasmine/tests/axes_test.js +++ b/test/jasmine/tests/axes_test.js @@ -2722,8 +2722,9 @@ describe('Test axes', function() { describe('calcTicks and tickText', function() { function mockCalc(ax) { - if (ax.minexponent === undefined) + if(ax.minexponent === undefined) { ax.minexponent = 3; + } ax.tickfont = {}; Axes.setConvert(ax, {separators: '.,', _extraFormat: { year: '%Y', From dc565d90f77df28a6457caeaf6fa69e6e72177f1 Mon Sep 17 00:00:00 2001 From: imartinezvazquez Date: Mon, 7 Sep 2020 13:45:42 -0300 Subject: [PATCH 11/15] autoTickRound: use default minexponent if undefined --- src/plots/cartesian/axes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plots/cartesian/axes.js b/src/plots/cartesian/axes.js index 275e7b0379c..6176147f8c1 100644 --- a/src/plots/cartesian/axes.js +++ b/src/plots/cartesian/axes.js @@ -1042,7 +1042,8 @@ function autoTickRound(ax) { var maxend = Math.max(Math.abs(rng[0]), Math.abs(rng[1])); var rangeexp = Math.floor(Math.log(maxend) / Math.LN10 + 0.01); - if(Math.abs(rangeexp) > ax.minexponent) { + var minexponent = ax.minexponent === undefined ? 3 : ax.minexponent; + if(Math.abs(rangeexp) > minexponent) { if(isSIFormat(ax.exponentformat) && !beyondSI(rangeexp)) { ax._tickexponent = 3 * Math.round((rangeexp - 1) / 3); } else ax._tickexponent = rangeexp; From d90b39b3c7ef377bb57a9e06b7316ed524cdf807 Mon Sep 17 00:00:00 2001 From: Ignacio Martinez Vazquez Date: Sun, 13 Sep 2020 09:04:13 -0300 Subject: [PATCH 12/15] axes_test: remove redundant setting of minexponent --- test/jasmine/tests/axes_test.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/jasmine/tests/axes_test.js b/test/jasmine/tests/axes_test.js index ee3ddaec706..a3682c8054c 100644 --- a/test/jasmine/tests/axes_test.js +++ b/test/jasmine/tests/axes_test.js @@ -2722,9 +2722,6 @@ describe('Test axes', function() { describe('calcTicks and tickText', function() { function mockCalc(ax) { - if(ax.minexponent === undefined) { - ax.minexponent = 3; - } ax.tickfont = {}; Axes.setConvert(ax, {separators: '.,', _extraFormat: { year: '%Y', From 2da1972c80574d838f530e8f92fb6d34a1270e9c Mon Sep 17 00:00:00 2001 From: Ignacio Martinez Vazquez Date: Sat, 26 Sep 2020 09:23:12 -0300 Subject: [PATCH 13/15] mockColorBarAxis: pass minexponent attribute --- src/components/colorbar/draw.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/colorbar/draw.js b/src/components/colorbar/draw.js index a952f78340d..1cb4a8e68a4 100644 --- a/src/components/colorbar/draw.js +++ b/src/components/colorbar/draw.js @@ -683,6 +683,7 @@ function mockColorBarAxis(gd, opts, zrange) { tickangle: opts.tickangle, tickformat: opts.tickformat, exponentformat: opts.exponentformat, + minexponent: opts.minexponent, separatethousands: opts.separatethousands, showexponent: opts.showexponent, showtickprefix: opts.showtickprefix, From f504f6ceff869153977a235a2b81201e733ba163 Mon Sep 17 00:00:00 2001 From: Ignacio Martinez Vazquez Date: Sat, 26 Sep 2020 09:24:59 -0300 Subject: [PATCH 14/15] Layout attribute docs: expand description for `minexponent` --- src/plots/cartesian/layout_attributes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plots/cartesian/layout_attributes.js b/src/plots/cartesian/layout_attributes.js index cf7b4ee72f6..3887234565b 100644 --- a/src/plots/cartesian/layout_attributes.js +++ b/src/plots/cartesian/layout_attributes.js @@ -687,7 +687,8 @@ module.exports = { role: 'style', editType: 'ticks', description: [ - 'Hide SI prefix for 10^n if |n| is below this number' + 'Hide SI prefix for 10^n if |n| is below this number.' + 'This only has an effect when `tickformat` is *SI* or *B*.' ].join(' ') }, separatethousands: { From 99b2769b19e5ad8508dc67346c42f454571548aa Mon Sep 17 00:00:00 2001 From: Ignacio Martinez Vazquez Date: Sat, 26 Sep 2020 09:33:14 -0300 Subject: [PATCH 15/15] Fix syntax error --- src/plots/cartesian/layout_attributes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plots/cartesian/layout_attributes.js b/src/plots/cartesian/layout_attributes.js index 3887234565b..d62b424256a 100644 --- a/src/plots/cartesian/layout_attributes.js +++ b/src/plots/cartesian/layout_attributes.js @@ -687,7 +687,7 @@ module.exports = { role: 'style', editType: 'ticks', description: [ - 'Hide SI prefix for 10^n if |n| is below this number.' + 'Hide SI prefix for 10^n if |n| is below this number.', 'This only has an effect when `tickformat` is *SI* or *B*.' ].join(' ') },