From 118fe822b149a7f6b3d647b5f4a6e7c68bed6b81 Mon Sep 17 00:00:00 2001 From: Daniel Chang Date: Mon, 22 Jul 2024 15:10:38 -0400 Subject: [PATCH 1/2] tweak categorical color palette --- packages/client/hmi-client/src/services/charts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/hmi-client/src/services/charts.ts b/packages/client/hmi-client/src/services/charts.ts index 0102dd3032..ead2e9d293 100644 --- a/packages/client/hmi-client/src/services/charts.ts +++ b/packages/client/hmi-client/src/services/charts.ts @@ -2,7 +2,7 @@ import { isEmpty } from 'lodash'; const VEGALITE_SCHEMA = 'https://vega.github.io/schema/vega-lite/v5.json'; -export const CATEGORICAL_SCHEME = ['#5F9E3E', '#4375B0', '#8F69B9', '#D67DBF', '#E18547', '#D2C446', '#84594D']; +export const CATEGORICAL_SCHEME = ['#1B8073', '#6495E8', '#8F69B9', '#D67DBF', '#E18547', '#D2C446', '#84594D']; export interface ForecastChartOptions { legend: boolean; From b8d6c34ce256c2663868ef10158e5f2d75a29920 Mon Sep 17 00:00:00 2001 From: Daniel Chang Date: Mon, 22 Jul 2024 15:44:39 -0400 Subject: [PATCH 2/2] y-axis formatting --- packages/client/hmi-client/src/services/charts.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/client/hmi-client/src/services/charts.ts b/packages/client/hmi-client/src/services/charts.ts index ead2e9d293..7ddd6a0052 100644 --- a/packages/client/hmi-client/src/services/charts.ts +++ b/packages/client/hmi-client/src/services/charts.ts @@ -62,7 +62,7 @@ export const createForecastChart = ( } : null; - const xaxis = { + const xaxis: any = { domainColor: axisColor, tickColor: { value: axisColor }, labelColor: { value: labelColor }, @@ -73,6 +73,7 @@ export const createForecastChart = ( }; const yaxis = structuredClone(xaxis); yaxis.title = options.yAxisTitle; + yaxis.format = '.3s'; const translationMap = options.translationMap; let labelExpr = '';