<script lang="ts" setup>
|
import type { EChartsOption } from 'echarts';
|
|
import type { EchartsUIType } from '@vben/plugins/echarts';
|
|
import { ref, watch } from 'vue';
|
|
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
|
|
defineOptions({ name: 'StabilityTrendChart' });
|
|
const props = defineProps<{ option: EChartsOption }>();
|
const chartRef = ref<EchartsUIType>();
|
const { renderEcharts } = useEcharts(chartRef);
|
|
watch(
|
() => props.option,
|
(option) => renderEcharts(option),
|
{ deep: true, immediate: true },
|
);
|
</script>
|
|
<template>
|
<EchartsUI ref="chartRef" height="520px" width="100%" />
|
</template>
|