1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <script setup lang="ts">
- import * as echarts from 'echarts'
- const chartRef = ref()
- onMounted(() => {
- echarts.init(chartRef.value).setOption({
- color: ['#80FFA5','#37A2FF', '#00DDFF', '#FF0087', '#FFBF00'],
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- label: {
- backgroundColor: '#6a7985'
- }
- }
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [
- {
- type: 'category',
- boundaryGap: false,
- data: ['2021年9月', '2021年10月', '2021年11月', '2021年12月','2022年1月', '2022年2月', '2022年3月', '2022年4月','2022年5月', '2022年6月', '2022年7月', '2022年8月']
- }
- ],
- yAxis: [
- {
- type: 'value',
- splitLine: {
- show: false
- },
- }
- ],
- series: [
- {
- name: '应用度(%)',
- type: 'line',
- stack: 'Total',
- smooth: true,
- lineStyle: {
- width: 0
- },
- showSymbol: false,
- areaStyle: {
- opacity: 0.8,
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'rgb(9,180,177,1)'
- },
- {
- offset: 1,
- color: 'rgba(9,180,177,0.1)'
- }
- ])
- },
- emphasis: {
- focus: 'series'
- },
- data: [1.3, 3.02, 3, 2,5, 1.6, 2.7, 3,7, 3, 5, 3]
- },
- ]
- })
- })
- </script>
- <template>
- <div ref="chartRef" class="w-full h-full " />
- </template>
|