mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-07 12:00:46 +00:00
fix(web): fix line chart using interval field as xAxis & fix pie chart tooltip (#1697)
This commit is contained in:
@@ -102,6 +102,10 @@ export const AutoChart = (props: AutoChartProps) => {
|
||||
spec.data = sortData({ data: spec.data, xField: dataAnalyzerOutput.dataProps?.find(field => field.recommendation === 'date'), chartType: chartTypeInput });
|
||||
}
|
||||
}
|
||||
if (chartTypeInput === 'pie_chart' && spec?.encode?.color) {
|
||||
// 补充饼图的 tooltip title 展示
|
||||
spec.tooltip = { title: { field: spec.encode.color } }
|
||||
}
|
||||
return (
|
||||
<Chart
|
||||
key={chartTypeInput}
|
||||
|
Reference in New Issue
Block a user