import React, { useEffect, useRef } from 'react'; import Echarts from '@/utils/echarts'; const EchartTemp = ()=>{ const echartintance = useRef(); const options = { xAxis: { type: "category", data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], splitLine: { color: ["#475569"], }, axisLine: { show: false, color:'#475569' }, axisTick: { length: 6, show: false, lineStyle: { type: "dashed", }, }, }, yAxis: { type: "value", }, series: [ { data: [150, 230, 224, 218, 135, 147, 260], type: 'bar', color: "#475569", }, ], } useEffect(()=>{ const echartinstance = Echarts.init(echartintance.current, "default"); echartinstance.setOption(options); },[]) return (
) } function HomeView() { return
; } export default HomeView;