feat: Adds Sunburst chart migration logic (#25343)

This commit is contained in:
Michael S. Molina
2023-09-22 09:44:40 -03:00
committed by GitHub
parent 9bd97ef4f2
commit 0c083bdc1a
4 changed files with 16 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ import {
} from '@superset-ui/core';
import { EChartsCoreOption } from 'echarts';
import { CallbackDataParams } from 'echarts/types/src/util/types';
import { OpacityEnum } from '../constants';
import { NULL_STRING, OpacityEnum } from '../constants';
import { defaultGrid } from '../defaults';
import { Refs } from '../types';
import { formatSeriesName, getColtypesMapping } from '../utils/series';
@@ -138,7 +138,10 @@ export function formatTooltip({
color: ${theme.colors.grayscale.base}"
>`,
`<div style="font-weight: ${theme.typography.weights.bold}">
${node.name}
${(node.name || NULL_STRING)
.toString()
.replaceAll('<', '&lt;')
.replaceAll('>', '&gt;')}
</div>`,
`<div">
${absolutePercentage} of total