Skip to content

Commit 0ac9fa8

Browse files
committed
keep hide overlap of x axis labels
1 parent 08a3a16 commit 0ac9fa8

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

apps/web/src/components/v2Editor/customBlocks/visualizationV2/VisualizationView.tsx

+13-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ function BrieferResult(props: {
272272
xAxis: props.result.xAxis.map((axis) => ({
273273
...axis,
274274
axisLabel: {
275-
hideOverlap: axis.type !== 'category',
275+
hideOverlap: true,
276276
interval: axis.type === 'category' ? 0 : 'auto',
277277
},
278278
splitLine: {
@@ -342,6 +342,18 @@ function Echarts(props: EchartsProps) {
342342
// set animation to be as fast as possible, since finished event does not get fired when no animation
343343
animationDelay: 0,
344344
animationDuration: 1,
345+
xAxis: (props.option.xAxis
346+
? Array.isArray(props.option.xAxis)
347+
? props.option.xAxis
348+
: [props.option.xAxis]
349+
: []
350+
).map((axis) => ({
351+
...axis,
352+
axisLabel: {
353+
...axis.axisLabel,
354+
hideOverlap: false,
355+
},
356+
})),
345357
})
346358

347359
const handleFinished = () => {

0 commit comments

Comments
 (0)