Skip to content

Commit eee1258

Browse files
[FEATURE] Update chart legend font size and padding (opensearch-project#196)
* [FEATURE] Charts | Set legend font size to match the font size on the page. opensearch-project#166 Signed-off-by: Jovan Cvetkovic <[email protected]> * [FEATURE] Charts | Set legend font size to match the font size on the page. opensearch-project#166 Signed-off-by: Jovan Cvetkovic <[email protected]> * [FEATURE] Charts | Change charts time-unit to bigger timespan opensearch-project#164 Signed-off-by: Jovan Cvetkovic <[email protected]> Signed-off-by: Jovan Cvetkovic <[email protected]>
1 parent a915f85 commit eee1258

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

public/pages/Overview/utils/helpers.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,21 @@ export type DateOpts = {
1818

1919
function getVisualizationSpec(description: string, data: any, layers: any[]): TopLevelSpec {
2020
return {
21-
config: { view: { stroke: null } },
21+
config: {
22+
view: { stroke: null },
23+
legend: {
24+
labelColor: '#343741',
25+
titleColor: '#1a1c21',
26+
labelFontSize: 14,
27+
titleFontWeight: 600,
28+
titleLineHeight: 21,
29+
titleFontSize: 14,
30+
titlePadding: 10,
31+
rowPadding: 6,
32+
labelFont:
33+
'"Inter UI", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
34+
},
35+
},
2236
$schema: 'https://vega.github.io/schema/vega-lite/v5.json',
2337
description: description,
2438
data: {
@@ -201,7 +215,7 @@ export function getTopRulesVisualizationSpec(visualizationData: any[]) {
201215
color: {
202216
field: 'ruleName',
203217
type: 'nominal',
204-
header: { title: '' },
218+
title: 'Rule name',
205219
scale: {
206220
range: euiPaletteColorBlind(),
207221
},

0 commit comments

Comments
 (0)