From 27ef0339fb606fc27d40836862c9ecf085933755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C5=BEe=20Fortun?= Date: Thu, 25 Jan 2024 17:37:32 +0100 Subject: [PATCH] Add minor chart theme style changes --- lib/js/src/compose/types/chart/chart.ts | 18 +++++++++++++++++- lib/js/src/compose/types/chart/funnel.ts | 5 +++++ lib/js/src/compose/types/chart/gauge.ts | 2 ++ lib/js/src/compose/types/chart/radar.ts | 5 +++++ .../types/display-elements/chart/basic.ts | 18 +++++++++++++++++- .../types/display-elements/chart/funnel.ts | 5 +++++ 6 files changed, 51 insertions(+), 2 deletions(-) diff --git a/lib/js/src/compose/types/chart/chart.ts b/lib/js/src/compose/types/chart/chart.ts index 374590018..5aa7ec99d 100644 --- a/lib/js/src/compose/types/chart/chart.ts +++ b/lib/js/src/compose/types/chart/chart.ts @@ -88,6 +88,12 @@ export default class Chart extends BaseChart { hideOverlap: true, rotate: dimension.rotateLabel, }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + }, } const tempYAxis = { @@ -104,9 +110,14 @@ export default class Chart extends BaseChart { rotate: yAxis.rotateLabel, }, axisLine: { - show: true, + show: false, onZero: false, }, + splitLine: { + lineStyle: { + color: [themeVariables['secondary']], + }, + }, nameTextStyle: { align: labelPosition === 'center' ? 'center' : position, }, @@ -302,6 +313,11 @@ export default class Chart extends BaseChart { textStyle: { color: themeVariables.black, }, + pageTextStyle: { + color: themeVariables.black, + }, + pageIconColor: themeVariables.black, + pageIconInactiveColor: themeVariables.light, }, ...options, } diff --git a/lib/js/src/compose/types/chart/funnel.ts b/lib/js/src/compose/types/chart/funnel.ts index d61b84f76..99d34278b 100644 --- a/lib/js/src/compose/types/chart/funnel.ts +++ b/lib/js/src/compose/types/chart/funnel.ts @@ -128,6 +128,11 @@ export default class FunnelChart extends BaseChart { textStyle: { color: themeVariables.black, }, + pageTextStyle: { + color: themeVariables.black, + }, + pageIconColor: themeVariables.black, + pageIconInactiveColor: themeVariables.light, }, series: datasets.map(({ data }: any) => { return { diff --git a/lib/js/src/compose/types/chart/gauge.ts b/lib/js/src/compose/types/chart/gauge.ts index 806fa1539..0315780b1 100644 --- a/lib/js/src/compose/types/chart/gauge.ts +++ b/lib/js/src/compose/types/chart/gauge.ts @@ -146,11 +146,13 @@ export default class GaugeChart extends BaseChart { fontSize: 14, show: tooltip.fixed, offsetCenter: [0, '30%'], + color: themeVariables.black, }, detail: { fontSize: 13, offsetCenter: [0, '55%'], valueAnimation: true, + color: themeVariables.black, }, data: [ { diff --git a/lib/js/src/compose/types/chart/radar.ts b/lib/js/src/compose/types/chart/radar.ts index 3022e2a86..9562aba3d 100644 --- a/lib/js/src/compose/types/chart/radar.ts +++ b/lib/js/src/compose/types/chart/radar.ts @@ -71,6 +71,11 @@ export default class RadarChart extends BaseChart { textStyle: { color: themeVariables.black, }, + pageTextStyle: { + color: themeVariables.black, + }, + pageIconColor: themeVariables.black, + pageIconInactiveColor: themeVariables.light, }, tooltip: { show: true, diff --git a/lib/js/src/reporter/types/display-elements/chart/basic.ts b/lib/js/src/reporter/types/display-elements/chart/basic.ts index 9a0614622..de7f2ac86 100644 --- a/lib/js/src/reporter/types/display-elements/chart/basic.ts +++ b/lib/js/src/reporter/types/display-elements/chart/basic.ts @@ -102,6 +102,12 @@ export class BasicChartOptions extends ChartOptions { hideOverlap: true, rotate: xLabelRotation, }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + }, }, ] @@ -139,9 +145,14 @@ export class BasicChartOptions extends ChartOptions { rotate: yLabelRotation, }, axisLine: { - show: true, + show: false, onZero: false, }, + splitLine: { + lineStyle: { + color: [themeVariables['secondary']], + }, + }, nameTextStyle: { align: labelPosition === 'center' ? 'center' : position, padding: labelPosition !== 'center' ? (position === 'left' ? [0, 0, 2, -20] : [0, -20, 2, 0]) : undefined, @@ -204,6 +215,11 @@ export class BasicChartOptions extends ChartOptions { textStyle: { color: themeVariables.black, }, + pageTextStyle: { + color: themeVariables.black, + }, + pageIconColor: themeVariables.black, + pageIconInactiveColor: themeVariables.light, }, ...options, } diff --git a/lib/js/src/reporter/types/display-elements/chart/funnel.ts b/lib/js/src/reporter/types/display-elements/chart/funnel.ts index 4841b70af..794a1b1ee 100644 --- a/lib/js/src/reporter/types/display-elements/chart/funnel.ts +++ b/lib/js/src/reporter/types/display-elements/chart/funnel.ts @@ -56,6 +56,11 @@ export class FunnelChartOptions extends ChartOptions { textStyle: { color: themeVariables.black, }, + pageTextStyle: { + color: themeVariables.black, + }, + pageIconColor: themeVariables.black, + pageIconInactiveColor: themeVariables.light, }, series: [ {