diff --git a/api/package.json b/api/package.json index 5fc15a819..2bc0c8400 100644 --- a/api/package.json +++ b/api/package.json @@ -1,6 +1,6 @@ { "name": "@devtable/api", - "version": "14.3.1", + "version": "14.3.2", "description": "", "main": "index.js", "scripts": { diff --git a/dashboard/package.json b/dashboard/package.json index d6b301265..0336532d8 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@devtable/dashboard", - "version": "14.3.1", + "version": "14.3.2", "license": "Apache-2.0", "publishConfig": { "access": "public", diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/option/index.ts b/dashboard/src/components/plugins/viz-components/pie-chart/option/index.ts index 7c616abc9..1863f21ff 100644 --- a/dashboard/src/components/plugins/viz-components/pie-chart/option/index.ts +++ b/dashboard/src/components/plugins/viz-components/pie-chart/option/index.ts @@ -1,10 +1,11 @@ import { defaultEchartsOptions } from '~/styles/default-echarts-options'; import { IPieChartConf } from '../type'; import { getSeries } from './series'; +import { getTooltip } from './tooltip'; export function getOption(conf: IPieChartConf, data: TPanelData, width: number) { return { - tooltip: defaultEchartsOptions.getTooltip({}), + tooltip: getTooltip(), series: getSeries(conf, data, width), }; } diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/option/tooltip.ts b/dashboard/src/components/plugins/viz-components/pie-chart/option/tooltip.ts new file mode 100644 index 000000000..aad33ba15 --- /dev/null +++ b/dashboard/src/components/plugins/viz-components/pie-chart/option/tooltip.ts @@ -0,0 +1,33 @@ +import { defaultEchartsOptions } from '~/styles/default-echarts-options'; + +function getFormatter() { + return ({ name, value, color }: any) => { + const template = ` +
${name} | +${value} | +
---|