Skip to content

Commit 7b19b74

Browse files
committed
finance: improve dflt colors
1 parent 1f574f2 commit 7b19b74

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/traces/candlestick/attributes.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ module.exports = {
3737
close: OHLCattrs.close,
3838

3939
increasing: Lib.extendDeep({}, directionAttrs, {
40-
color: { dflt: 'green' }
40+
color: { dflt: OHLCattrs.increasing.color.dflt }
4141
}),
4242

4343
decreasing: Lib.extendDeep({}, directionAttrs, {
44-
color: { dflt: 'red' }
44+
color: { dflt: OHLCattrs.decreasing.color.dflt }
4545
}),
4646

4747
text: OHLCattrs.text,

src/traces/ohlc/attributes.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
var Lib = require('../../lib');
1313
var scatterAttrs = require('../scatter/attributes');
1414

15+
var INCREASING_COLOR = '#3D9970';
16+
var DECREASING_COLOR = '#FF4136';
17+
1518
var lineAttrs = scatterAttrs.line;
1619

1720
var directionAttrs = {
@@ -64,13 +67,12 @@ module.exports = {
6467
description: 'Sets the close values.'
6568
},
6669

67-
// TODO find better colors
6870
increasing: Lib.extendDeep({}, directionAttrs, {
69-
color: { dflt: 'green' }
71+
color: { dflt: INCREASING_COLOR }
7072
}),
7173

7274
decreasing: Lib.extendDeep({}, directionAttrs, {
73-
color: { dflt: 'red' }
75+
color: { dflt: DECREASING_COLOR }
7476
}),
7577

7678
text: {

0 commit comments

Comments
 (0)