提交
This commit is contained in:
@@ -11,10 +11,10 @@ const chartRef = ref<HTMLDivElement>()
|
||||
const props = defineProps(['options'])
|
||||
let chart: echarts.ECharts | any = null
|
||||
const resizeHandler = () => {
|
||||
chart.getZr().painter.getViewportRoot().style.display = "none";
|
||||
chart.getZr().painter.getViewportRoot().style.display = 'none'
|
||||
requestAnimationFrame(() => {
|
||||
chart.resize()
|
||||
chart.getZr().painter.getViewportRoot().style.display = "";
|
||||
chart.getZr().painter.getViewportRoot().style.display = ''
|
||||
})
|
||||
}
|
||||
const initChart = () => {
|
||||
@@ -28,7 +28,7 @@ const initChart = () => {
|
||||
color: '#000',
|
||||
fontSize: 18
|
||||
},
|
||||
...props.options.title
|
||||
...(props.options.title || null)
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
@@ -116,7 +116,7 @@ const initChart = () => {
|
||||
opacity: 0.5
|
||||
}
|
||||
},
|
||||
...(props.options.yAxis || null),
|
||||
...(props.options.yAxis || null)
|
||||
}
|
||||
],
|
||||
dataZoom: [
|
||||
@@ -125,13 +125,15 @@ const initChart = () => {
|
||||
height: 13,
|
||||
start: 0,
|
||||
bottom: '20px',
|
||||
end: 100
|
||||
end: 100,
|
||||
...(props.options.dataZoom || null)
|
||||
},
|
||||
{
|
||||
start: 0,
|
||||
height: 13,
|
||||
bottom: '20px',
|
||||
end: 100
|
||||
end: 100,
|
||||
...(props.options.dataZoom|| null)
|
||||
}
|
||||
],
|
||||
color: [
|
||||
|
||||
Reference in New Issue
Block a user