[Visualize] Fixes metric label font size (#132100)

This commit is contained in:
Stratoula Kalafateli 2022-05-12 14:52:32 +03:00 committed by GitHub
parent 6df1b28a82
commit b70b89994f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 0 deletions

View file

@ -59,6 +59,25 @@ Object {
"type": "expression",
},
],
"labelFont": Array [
Object {
"chain": Array [
Object {
"arguments": Object {
"align": Array [
"center",
],
"size": Array [
"14",
],
},
"function": "font",
"type": "function",
},
],
"type": "expression",
},
],
"percentageMode": Array [
true,
],
@ -133,6 +152,25 @@ Object {
"type": "expression",
},
],
"labelFont": Array [
Object {
"chain": Array [
Object {
"arguments": Object {
"align": Array [
"center",
],
"size": Array [
"14",
],
},
"function": "font",
"type": "function",
},
],
"type": "expression",
},
],
"showLabels": Array [
false,
],

View file

@ -83,6 +83,8 @@ export const toExpressionAst: VisToExpressionAst<VisParams> = (vis, params) => {
)
);
metricVis.addArgument('labelFont', buildExpression(`font size="14" align="center"`));
if (colorsRange && colorsRange.length > 1) {
const stopsWithColors = getStopsWithColorsFromRanges(colorsRange, colorSchema, invertColors);
const palette = buildExpressionFunction('palette', {