Skip to content

Commit

Permalink
[FEATURE] Update chart legend font size and padding (opensearch-proje…
Browse files Browse the repository at this point in the history
…ct#196)

* [FEATURE] Charts | Set legend font size to match the font size on the page. opensearch-project#166

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* [FEATURE] Charts | Set legend font size to match the font size on the page. opensearch-project#166

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* [FEATURE] Charts | Change charts time-unit to bigger timespan #164

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>
  • Loading branch information
jovancvetkovic3006 authored Dec 8, 2022
1 parent a915f85 commit eee1258
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions public/pages/Overview/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,21 @@ export type DateOpts = {

function getVisualizationSpec(description: string, data: any, layers: any[]): TopLevelSpec {
return {
config: { view: { stroke: null } },
config: {
view: { stroke: null },
legend: {
labelColor: '#343741',
titleColor: '#1a1c21',
labelFontSize: 14,
titleFontWeight: 600,
titleLineHeight: 21,
titleFontSize: 14,
titlePadding: 10,
rowPadding: 6,
labelFont:
'"Inter UI", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
},
},
$schema: 'https://vega.github.io/schema/vega-lite/v5.json',
description: description,
data: {
Expand Down Expand Up @@ -201,7 +215,7 @@ export function getTopRulesVisualizationSpec(visualizationData: any[]) {
color: {
field: 'ruleName',
type: 'nominal',
header: { title: '' },
title: 'Rule name',
scale: {
range: euiPaletteColorBlind(),
},
Expand Down

0 comments on commit eee1258

Please sign in to comment.