mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 12:03:05 +08:00
fix(图表): 修复明细表分页导致字体渲染模糊
This commit is contained in:
parent
b89e847bc4
commit
3150fbfdf9
@ -197,6 +197,7 @@ const renderChart = (viewInfo: Chart, resetPageInfo: boolean) => {
|
|||||||
viewInfo.render,
|
viewInfo.render,
|
||||||
viewInfo.type
|
viewInfo.type
|
||||||
) as S2ChartView<any>
|
) as S2ChartView<any>
|
||||||
|
timer = setTimeout(() => {
|
||||||
myChart = chartView.drawChart({
|
myChart = chartView.drawChart({
|
||||||
container: containerId,
|
container: containerId,
|
||||||
chart: toRaw(actualChart),
|
chart: toRaw(actualChart),
|
||||||
@ -208,6 +209,7 @@ const renderChart = (viewInfo: Chart, resetPageInfo: boolean) => {
|
|||||||
myChart?.render()
|
myChart?.render()
|
||||||
dvMainStore.setViewInstanceInfo(viewInfo.id, myChart)
|
dvMainStore.setViewInstanceInfo(viewInfo.id, myChart)
|
||||||
initScroll()
|
initScroll()
|
||||||
|
}, 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
const setupPage = (chart: ChartObj, resetPageInfo?: boolean) => {
|
const setupPage = (chart: ChartObj, resetPageInfo?: boolean) => {
|
||||||
@ -573,8 +575,24 @@ const resize = (width, height) => {
|
|||||||
clearTimeout(timer)
|
clearTimeout(timer)
|
||||||
}
|
}
|
||||||
timer = setTimeout(() => {
|
timer = setTimeout(() => {
|
||||||
|
if (!myChart?.facet) {
|
||||||
|
const chartView = chartViewManager.getChartView(
|
||||||
|
actualChart.render,
|
||||||
|
actualChart.type
|
||||||
|
) as S2ChartView<any>
|
||||||
|
myChart = chartView.drawChart({
|
||||||
|
container: containerId,
|
||||||
|
chart: toRaw(actualChart),
|
||||||
|
chartObj: myChart,
|
||||||
|
pageInfo: state.pageInfo,
|
||||||
|
action,
|
||||||
|
resizeAction
|
||||||
|
})
|
||||||
|
dvMainStore.setViewInstanceInfo(actualChart.id, myChart)
|
||||||
|
} else {
|
||||||
|
myChart?.facet?.timer?.stop()
|
||||||
myChart?.changeSheetSize(width, height)
|
myChart?.changeSheetSize(width, height)
|
||||||
myChart?.facet.timer?.stop()
|
}
|
||||||
myChart?.render()
|
myChart?.render()
|
||||||
initScroll()
|
initScroll()
|
||||||
}, 500)
|
}, 500)
|
||||||
@ -597,7 +615,7 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
preSize[0] = size.inlineSize
|
preSize[0] = size.inlineSize
|
||||||
preSize[1] = size.blockSize
|
preSize[1] = size.blockSize
|
||||||
resize(size.inlineSize, size.blockSize)
|
resize(size.inlineSize, Math.ceil(size.blockSize))
|
||||||
})
|
})
|
||||||
|
|
||||||
resizeObserver.observe(document.getElementById(containerId))
|
resizeObserver.observe(document.getElementById(containerId))
|
||||||
|
Loading…
Reference in New Issue
Block a user