Skip to content

[FEATURE] Update chart legend font size and padding #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions public/pages/Overview/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,21 @@ import { SummaryData } from '../components/Widgets/Summary';

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 @@ -137,7 +151,7 @@ export function getTopRulesVisualizationSpec(visualizationData: any[]) {
color: {
field: 'ruleName',
type: 'nominal',
header: { title: '' },
title: 'Rule name',
scale: {
range: euiPaletteColorBlind(),
},
Expand Down