Skip to content

Commit e57744b

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

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
@@ -9,7 +9,21 @@ import { SummaryData } from '../components/Widgets/Summary';
99

1010
function getVisualizationSpec(description: string, data: any, layers: any[]): TopLevelSpec {
1111
return {
12-
config: { view: { stroke: null } },
12+
config: {
13+
view: { stroke: null },
14+
legend: {
15+
labelColor: '#343741',
16+
titleColor: '#1a1c21',
17+
labelFontSize: 14,
18+
titleFontWeight: 600,
19+
titleLineHeight: 21,
20+
titleFontSize: 14,
21+
titlePadding: 10,
22+
rowPadding: 6,
23+
labelFont:
24+
'"Inter UI", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
25+
},
26+
},
1327
$schema: 'https://vega.github.io/schema/vega-lite/v5.json',
1428
description: description,
1529
data: {
@@ -137,7 +151,7 @@ export function getTopRulesVisualizationSpec(visualizationData: any[]) {
137151
color: {
138152
field: 'ruleName',
139153
type: 'nominal',
140-
header: { title: '' },
154+
title: 'Rule name',
141155
scale: {
142156
range: euiPaletteColorBlind(),
143157
},

0 commit comments

Comments
 (0)