|
@@ -2,7 +2,7 @@
|
|
|
import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
|
import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
|
|
import { useI18n } from 'vue-i18n'
|
|
import { useI18n } from 'vue-i18n'
|
|
|
import { echarts } from '../../lib/speaker/echarts/install'
|
|
import { echarts } from '../../lib/speaker/echarts/install'
|
|
|
-import type { EChartsOption } from 'echarts/core'
|
|
|
|
|
|
|
+import type { EChartsCoreOption } from 'echarts/core'
|
|
|
import type { CalcResult, SpeakerParams } from '../../lib/speaker/types'
|
|
import type { CalcResult, SpeakerParams } from '../../lib/speaker/types'
|
|
|
import { buildChartEmptyOption, buildDiagramOption } from '../../lib/speaker/echarts'
|
|
import { buildChartEmptyOption, buildDiagramOption } from '../../lib/speaker/echarts'
|
|
|
import { useChartPalette } from '../../theme/useChartPalette'
|
|
import { useChartPalette } from '../../theme/useChartPalette'
|
|
@@ -32,7 +32,7 @@ const render = (): void => {
|
|
|
vertical: t('diagram.vertical')
|
|
vertical: t('diagram.vertical')
|
|
|
}
|
|
}
|
|
|
const pal = palette.value
|
|
const pal = palette.value
|
|
|
- const option: EChartsOption = props.result
|
|
|
|
|
|
|
+ const option: EChartsCoreOption = props.result
|
|
|
? buildDiagramOption(props.params, labels, pal)
|
|
? buildDiagramOption(props.params, labels, pal)
|
|
|
: buildChartEmptyOption(labels.empty, pal)
|
|
: buildChartEmptyOption(labels.empty, pal)
|
|
|
chart.setOption(option, true)
|
|
chart.setOption(option, true)
|