fix(chart): align ECharts components with theme tokens and load the full ECharts ESM bundle

This commit is contained in:
2026-04-04 11:25:19 +00:00
parent ff32470d8a
commit 3505c390d8
8 changed files with 69 additions and 42 deletions

View File

@@ -8,7 +8,7 @@ import { DeesChartEchartsBase } from '../dees-chart-echarts-base.js';
import { demoFunc } from './demo.js';
import { donutStyles } from './styles.js';
import { renderChartDonut } from './template.js';
import { getEchartsSeriesColors } from '../dees-chart-echarts-theme.js';
import { getEchartsSeriesColors, getThemeColors } from '../dees-chart-echarts-theme.js';
export interface IDonutDataItem {
name: string;
@@ -62,6 +62,7 @@ export class DeesChartDonut extends DeesChartEchartsBase {
}
protected buildOption(): Record<string, any> {
const colors = getThemeColors(this.goBright);
const seriesColors = getEchartsSeriesColors(this.goBright);
const data = this.data.map((item, index) => ({
name: item.name,
@@ -108,6 +109,8 @@ export class DeesChartDonut extends DeesChartEchartsBase {
show: true,
formatter: '{b}: {d}%',
fontSize: 11,
color: colors.textSecondary,
textBorderColor: 'transparent',
}
: { show: false },
emphasis: {