Skip to content

Commit ec6a9de

Browse files
committed
bar textpad const
1 parent 9b5f089 commit ec6a9de

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/traces/bar/attributes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var hovertemplateAttrs = require('../../plots/template_attributes').hovertemplat
1313
var texttemplateAttrs = require('../../plots/template_attributes').texttemplateAttrs;
1414
var colorScaleAttrs = require('../../components/colorscale/attributes');
1515
var fontAttrs = require('../../plots/font_attributes');
16-
var constants = require('./constants.js');
16+
var constants = require('./constants');
1717

1818
var extendFlat = require('../../lib/extend').extendFlat;
1919

src/traces/bar/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
'use strict';
1111

1212
module.exports = {
13+
TEXTPAD: 3, // padding in pixels around text
1314
eventDataKeys: []
1415
};

src/traces/bar/plot.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ var tickText = require('../../plots/cartesian/axes').tickText;
2121

2222
var style = require('./style');
2323
var helpers = require('./helpers');
24+
var constants = require('./constants');
2425
var attributes = require('./attributes');
2526

2627
var attributeText = attributes.text;
2728
var attributeTextPosition = attributes.textposition;
2829

2930
var appendArrayPointValue = require('../../components/fx/helpers').appendArrayPointValue;
3031

31-
// padding in pixels around text
32-
var TEXTPAD = 3;
32+
var TEXTPAD = constants.TEXTPAD;
3333

3434
function dirSign(a, b) {
3535
return (a < b) ? 1 : -1;

0 commit comments

Comments
 (0)