diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/map/map.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/map/map.ts index d86e817423..fbac7000eb 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/map/map.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/map/map.ts @@ -295,7 +295,9 @@ export class Map extends L7PlotChartView { color: legend.color }, 'l7plot-legend__category-marker': { - ...LEGEND_SHAPE_STYLE_MAP[legend.icon] + ...LEGEND_SHAPE_STYLE_MAP[legend.icon], + width: '8px', + height: '8px' } } } diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/quadrant.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/quadrant.ts index bd20834404..23e94cc72f 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/quadrant.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/quadrant.ts @@ -401,6 +401,7 @@ export class Quadrant extends G2PlotChartView { } return chart } + protected configColor(chart: Chart, options: ScatterOptions): ScatterOptions { const { xAxis, yAxis, yAxisExt } = chart if (!(xAxis?.length && yAxis?.length && yAxisExt?.length)) { @@ -408,6 +409,7 @@ export class Quadrant extends G2PlotChartView { } return this.configSingleDimensionColor(chart, options) } + public setupSeriesColor(chart: ChartObj, data?: any[]): ChartBasicStyle['seriesColor'] { const { xAxis, yAxis, yAxisExt } = chart if (!(xAxis?.length && yAxis?.length && yAxisExt?.length)) { @@ -416,6 +418,21 @@ export class Quadrant extends G2PlotChartView { const tmp = data?.[0]?.data return setUpSingleDimensionSeriesColor(chart, tmp) } + + protected configLegend(chart: Chart, options: ScatterOptions): ScatterOptions { + const optionTmp = super.configLegend(chart, options) + if (!optionTmp.legend) { + return optionTmp + } + optionTmp.legend.marker.style = style => { + return { + r: 4, + fill: style.fill + } + } + return optionTmp + } + protected setupOptions(chart: Chart, options: ScatterOptions) { return flow( this.configTheme, diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/radar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/radar.ts index a2e01f71d4..31a38c0ef7 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/radar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/radar.ts @@ -220,6 +220,20 @@ export class Radar extends G2PlotChartView { } } + protected configLegend(chart: Chart, options: RadarOptions): RadarOptions { + const optionTmp = super.configLegend(chart, options) + if (!optionTmp.legend) { + return optionTmp + } + optionTmp.legend.marker.style = style => { + return { + r: 4, + fill: style.stroke + } + } + return optionTmp + } + protected setupOptions(chart: Chart, options: RadarOptions): RadarOptions { return flow( this.configTheme, diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/scatter.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/scatter.ts index 8c39c1110a..eb307fa3d9 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/scatter.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/scatter.ts @@ -248,6 +248,20 @@ export class Scatter extends G2PlotChartView { } } + protected configLegend(chart: Chart, options: ScatterOptions): ScatterOptions { + const optionTmp = super.configLegend(chart, options) + if (!optionTmp.legend) { + return optionTmp + } + optionTmp.legend.marker.style = style => { + return { + r: 4, + fill: style.fill + } + } + return optionTmp + } + protected setupOptions(chart: Chart, options: ScatterOptions) { return flow( this.configTheme,