Skip to content

Commit 2d2596b

Browse files
committed
Improvement - Default config - Harmonize colors
1 parent 620bc1b commit 2d2596b

File tree

1 file changed

+26
-27
lines changed

1 file changed

+26
-27
lines changed

src/useConfig.js

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export function useConfig() {
66
const COLOR_GREY_DARK = '#4A4A4A'
77
const COLOR_WHITE = '#FFFFFF'
88
const COLOR_WHITE_ALMOST = '#fafafa'
9-
const COLOR_BLUE = '#5f8bee'
10-
const COLOR_RED = '#dc3912'
9+
const COLOR_BLUE = '#1f77b4'
10+
const COLOR_RED = '#d62728'
1111
const COLOR_GREEN = '#2ca02c'
1212
const COLOR_VUE = '#42d392'
1313
const COLOR_YELLOW = '#FFD055'
@@ -174,7 +174,7 @@ export function useConfig() {
174174
buttonTitles,
175175
print: {
176176
allowTaint: false,
177-
backgroundColor: '#FFFFFF',
177+
backgroundColor: COLOR_WHITE,
178178
useCORS: false,
179179
onclone: null,
180180
scale: 2,
@@ -227,11 +227,11 @@ export function useConfig() {
227227
const MINIMAP = {
228228
show: false,
229229
smooth: false,
230-
selectedColor: '#1f77b4',
230+
selectedColor: COLOR_BLUE,
231231
selectedColorOpacity: 0.2,
232-
lineColor: '#2D353C',
232+
lineColor: COLOR_BLACK,
233233
selectionRadius: 2,
234-
indicatorColor: '#2D353C',
234+
indicatorColor: COLOR_BLACK,
235235
verticalHandles: false,
236236
}
237237

@@ -262,7 +262,6 @@ export function useConfig() {
262262
labels: true,
263263
fullscreen: true,
264264
annotator: true
265-
// IDEA : add a distributed toggle ?
266265
}),
267266
style: {
268267
fontFamily: 'inherit',
@@ -560,7 +559,7 @@ export function useConfig() {
560559
dot: {
561560
hideAboveMaxSerieLength: 62,
562561
useSerieColor: true,
563-
fill: '#FFFFFF',
562+
fill: COLOR_WHITE,
564563
strokeWidth: 0.5
565564
},
566565
labels: {
@@ -585,7 +584,7 @@ export function useConfig() {
585584
useGradient: true,
586585
dot: {
587586
useSerieColor: true,
588-
fill: '#FFFFFF',
587+
fill: COLOR_WHITE,
589588
strokeWidth: 0.5
590589
},
591590
labels: {
@@ -1201,7 +1200,7 @@ export function useConfig() {
12011200
indicatorArc: {
12021201
show: false,
12031202
radius: 123,
1204-
fill: '#E1E5E8',
1203+
fill: COLOR_GREY_LIGHT,
12051204
},
12061205
pointer: {
12071206
show: true,
@@ -2514,7 +2513,7 @@ export function useConfig() {
25142513
},
25152514
userOptionsPrint: {
25162515
allowTaint: false,
2517-
backgroundColor: '#FFFFFF',
2516+
backgroundColor: COLOR_WHITE,
25182517
useCORS: false,
25192518
onclone: null,
25202519
scale: 2,
@@ -4615,7 +4614,7 @@ export function useConfig() {
46154614
color: COLOR_BLACK,
46164615
outline: `1px solid ${COLOR_WHITE}`,
46174616
selected: {
4618-
backgroundColor: "#1f77b4",
4617+
backgroundColor: COLOR_BLUE,
46194618
color: COLOR_WHITE
46204619
}
46214620
},
@@ -4649,18 +4648,18 @@ export function useConfig() {
46494648
backgroundColor: COLOR_WHITE,
46504649
color: COLOR_BLACK,
46514650
border: '1px solid #CCCCCC',
4652-
accentColor: '#1f77b4'
4651+
accentColor: COLOR_BLUE
46534652
},
46544653
dropdowns: {
46554654
backgroundColor: COLOR_GREY_LIGHT,
46564655
color: COLOR_BLACK,
46574656
icons: {
46584657
selected: {
4659-
color: '#008000',
4658+
color: COLOR_GREEN,
46604659
unicode: '✔'
46614660
},
46624661
unselected: {
4663-
color: '#ff0000',
4662+
color: COLOR_RED,
46644663
unicode: '✖'
46654664
}
46664665
}
@@ -4676,14 +4675,14 @@ export function useConfig() {
46764675
opacityDisabled: 0.5
46774676
},
46784677
navigationIndicator: {
4679-
backgroundColor: '#1f77b4'
4678+
backgroundColor: COLOR_BLUE
46804679
}
46814680
},
46824681
exportMenu: {
46834682
backgroundColor: COLOR_GREY_LIGHT,
46844683
color: COLOR_BLACK,
46854684
buttons: {
4686-
backgroundColor: '#FAFAFA',
4685+
backgroundColor: COLOR_WHITE_ALMOST,
46874686
color: COLOR_BLACK
46884687
}
46894688
},
@@ -4698,7 +4697,7 @@ export function useConfig() {
46984697
color: COLOR_BLACK,
46994698
buttons: {
47004699
selected: {
4701-
backgroundColor: '#1f77b4',
4700+
backgroundColor: COLOR_BLUE,
47024701
color: COLOR_WHITE
47034702
},
47044703
unselected: {
@@ -4714,16 +4713,16 @@ export function useConfig() {
47144713
strokeWidth: 2
47154714
},
47164715
bar: {
4717-
fill: '#1f77b4',
4716+
fill: COLOR_BLUE,
47184717
stroke: COLOR_WHITE
47194718
},
47204719
line: {
47214720
smooth: true,
47224721
useArea: false,
4723-
stroke: '#1f77b4',
4722+
stroke: COLOR_BLUE,
47244723
strokeWidth: 4,
47254724
plot: {
4726-
fill: '#1f77b4',
4725+
fill: COLOR_BLUE,
47274726
stroke: COLOR_WHITE, // DEPRECATED
47284727
strokeWidth: 1,
47294728
radius: {
@@ -4764,7 +4763,7 @@ export function useConfig() {
47644763
page: 'Page',
47654764
paginatorLabel: 'Rows per page',
47664765
sizeWarning: 'Displaying too many rows at a time can lead to slower performance',
4767-
sum: 'Somme',
4766+
sum: 'Sum',
47684767
to: 'To',
47694768
total: 'Total',
47704769
totalRows: 'Total rows'
@@ -4944,17 +4943,17 @@ export function useConfig() {
49444943
},
49454944
target: {
49464945
onTop: true,
4947-
color: '#1A1A1A',
4946+
color: COLOR_BLACK,
49484947
rounded: true,
49494948
heightRatio: 0.8,
4950-
stroke: '#FFFFFF',
4949+
stroke: COLOR_WHITE,
49514950
strokeWidth: 1,
49524951
width: 6,
49534952
},
49544953
valueBar: {
49554954
color: '#3A3A3A',
49564955
heightRatio: 0.33,
4957-
stroke: '#FFFFFF',
4956+
stroke: COLOR_WHITE,
49584957
strokeWidth: 1,
49594958
label: {
49604959
show: true,
@@ -5040,7 +5039,7 @@ export function useConfig() {
50405039
},
50415040
bars: {
50425041
stroke: COLOR_WHITE,
5043-
defaultColor: '#1f77b4',
5042+
defaultColor: COLOR_BLUE,
50445043
strokeWidth: 1,
50455044
gapRatio: 0.2,
50465045
borderRadius: 3,
@@ -5350,7 +5349,7 @@ export function useConfig() {
53505349
x: 0,
53515350
y: 0
53525351
},
5353-
waterColor: '#1f77b4',
5352+
waterColor: COLOR_BLUE,
53545353
},
53555354
territory: {
53565355
stroke: '#666666',

0 commit comments

Comments
 (0)