From 16f789a78d1f30730cda129c24949218c46e42f1 Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Thu, 1 Aug 2019 09:51:48 +0200 Subject: [PATCH] fix(theme): restore original point radius values (#276) --- src/chart_types/xy_chart/store/utils.test.ts | 10 +++++----- src/utils/themes/dark_theme.ts | 12 +++++++----- src/utils/themes/light_theme.ts | 16 +++++++++------- src/utils/themes/theme.test.ts | 2 ++ 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/src/chart_types/xy_chart/store/utils.test.ts b/src/chart_types/xy_chart/store/utils.test.ts index b023f69c92..d603890654 100644 --- a/src/chart_types/xy_chart/store/utils.test.ts +++ b/src/chart_types/xy_chart/store/utils.test.ts @@ -779,8 +779,8 @@ describe('Chart State utils', () => { visible: true, fill: 'green', // the override strokeWidth opacity: 1, - radius: 4, - strokeWidth: 0, + radius: 1, + strokeWidth: 0.5, }); }); test('can compute area geometries with custom style', () => { @@ -868,11 +868,11 @@ describe('Chart State utils', () => { opacity: 1, }); expect(geometries.geometries.areas[0].seriesPointStyle).toEqual({ - visible: true, + visible: false, fill: 'point-fill-custom-color', // the override strokeWidth opacity: 1, - radius: 4, - strokeWidth: 0, + radius: 1, + strokeWidth: 0.5, }); }); test('can compute bars geometries counts', () => { diff --git a/src/utils/themes/dark_theme.ts b/src/utils/themes/dark_theme.ts index d825c04186..a88486918e 100644 --- a/src/utils/themes/dark_theme.ts +++ b/src/utils/themes/dark_theme.ts @@ -19,7 +19,8 @@ export const DARK_THEME: Theme = { }, point: { visible: true, - strokeWidth: 0, + strokeWidth: 0.5, + fill: 'white', radius: 1, opacity: 1, }, @@ -27,16 +28,17 @@ export const DARK_THEME: Theme = { areaSeriesStyle: { area: { visible: true, - opacity: 1, + opacity: 0.8, }, line: { visible: true, - strokeWidth: 1, + strokeWidth: 1.5, opacity: 1, }, point: { - visible: true, - strokeWidth: 0, + visible: false, + fill: 'white', + strokeWidth: 0.5, radius: 1, opacity: 1, }, diff --git a/src/utils/themes/light_theme.ts b/src/utils/themes/light_theme.ts index 9c4257486d..2f07bf1526 100644 --- a/src/utils/themes/light_theme.ts +++ b/src/utils/themes/light_theme.ts @@ -19,25 +19,27 @@ export const LIGHT_THEME: Theme = { }, point: { visible: true, - strokeWidth: 0, - radius: 4, + strokeWidth: 0.5, + fill: 'white', + radius: 1, opacity: 1, }, }, areaSeriesStyle: { area: { visible: true, - opacity: 1, + opacity: 0.8, }, line: { visible: true, - strokeWidth: 1, + strokeWidth: 1.5, opacity: 1, }, point: { - visible: true, - strokeWidth: 0, - radius: 4, + visible: false, + fill: 'white', + strokeWidth: 0.5, + radius: 1, opacity: 1, }, }, diff --git a/src/utils/themes/theme.test.ts b/src/utils/themes/theme.test.ts index db6ac18279..6dc00b5b13 100644 --- a/src/utils/themes/theme.test.ts +++ b/src/utils/themes/theme.test.ts @@ -155,6 +155,7 @@ describe('Theme', () => { opacity: 1, }, point: { + fill: 'white', radius: 314571, stroke: 'elastic_charts', strokeWidth: 314571, @@ -189,6 +190,7 @@ describe('Theme', () => { opacity: 1, }, point: { + fill: 'white', visible: true, radius: 314571, stroke: 'elastic_charts',