Skip to content

Commit ebf0739

Browse files
authored
Merge pull request #1 from upsight/feature/UP-3841
Feature/up 3841
2 parents 515e6d9 + fbea342 commit ebf0739

6 files changed

Lines changed: 11 additions & 5 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "plotly.js",
3-
"version": "1.22.0",
3+
"version": "1.22.0-upsight1",
44
"description": "The open source javascript graphing library that powers plotly",
55
"license": "MIT",
66
"main": "./lib/index.js",

src/assets/geo_assets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ var saneTopojson = require('sane-topojson');
1212

1313

1414
// package version injected by `npm run preprocess`
15-
exports.version = '1.22.0';
15+
exports.version = '1.22.0-upsight1';
1616

1717
exports.topojson = saneTopojson;

src/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
var Plotly = require('./plotly');
1616

1717
// package version injected by `npm run preprocess`
18-
exports.version = '1.22.0';
18+
exports.version = '1.22.0-upsight1';
1919

2020
// inject promise polyfill
2121
require('es6-promise').polyfill();

src/traces/scatter/attributes.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,11 @@ module.exports = {
209209
'marker color, or marker line color, whichever is available.'
210210
].join(' ')
211211
},
212+
forceNoXPadding: {
213+
valType: 'boolean',
214+
dflt: false,
215+
description: 'Removes padding on the x axis regardless of other settings.'
216+
},
212217
marker: extendFlat({}, {
213218
symbol: {
214219
valType: 'enumerated',

src/traces/scatter/calc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ module.exports = function calc(gd, trace) {
8686
}
8787

8888
// if no error bars, markers or text, or fill to y=0 remove x padding
89-
else if(!trace.error_y.visible && (
89+
else if(trace.forceNoXPadding || (!trace.error_y.visible && (
9090
['tonexty', 'tozeroy'].indexOf(trace.fill) !== -1 ||
91-
(!subTypes.hasMarkers(trace) && !subTypes.hasText(trace))
91+
(!subTypes.hasMarkers(trace) && !subTypes.hasText(trace)))
9292
)) {
9393
xOptions.padded = false;
9494
xOptions.ppad = 0;

src/traces/scatter/defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
3939
coerce('text');
4040
coerce('mode', defaultMode);
4141
coerce('ids');
42+
coerce('forceNoXPadding');
4243

4344
if(subTypes.hasLines(traceOut)) {
4445
handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);

0 commit comments

Comments
 (0)