Skip to content

Commit b3d0a9c

Browse files
committed
fix:(Chart) change scatter default size value
1 parent 8ca97e9 commit b3d0a9c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

frontend/src/app/components/ChartGraph/BasicOutlineMapChart/BasicOutlineMapChart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class BasicOutlineMapChart extends Chart {
268268
const [showLabel] = getStyles(styleConfigs, ['label'], ['showLabel']);
269269
const [cycleRatio] = getStyles(styleConfigs, ['map'], ['cycleRatio']);
270270
const { min, max } = getDataColumnMaxAndMin2(chartDataSet, sizeConfigs[0]);
271-
const defaultSizeValue = max - min;
271+
const defaultSizeValue = (max - min) / 2;
272272
const defaultColorValue = 1;
273273

274274
return [

frontend/src/app/components/ChartGraph/BasicScatterChart/BasicScatterChart.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,11 @@ class BasicScatterChart extends Chart {
255255
const seriesName = groupConfigs
256256
?.map(gc => getColumnRenderName(gc))
257257
.join('-');
258-
const seriesDatas = dataSetRows?.map(row => {
259-
const sizeValue = row.getCell(sizeConfigs?.[0]) || min;
258+
const defaultSizeValue = (max - min) / 2;
259+
const seriesDatas = dataSetRows?.map((row, dcIndex) => {
260+
const sizeValue = sizeConfigs?.length
261+
? row.getCell(sizeConfigs?.[0]) || min
262+
: defaultSizeValue;
260263
return {
261264
...getExtraSeriesRowData(row),
262265
name: groupConfigs?.map(row.getCell, row).join('-'),

0 commit comments

Comments
 (0)