提交 d22ced98 编写于 作者: Q qq_38870145

Tue Jan 2 07:25:00 CST 2024 inscode

上级 0279615c
<template> <template>
<div id="barChartId" style="width:100vw;height:300px;margin: 0 auto"></div> <div id="barChartId" style="width:100vw;height:200px;margin: 0 auto"></div>
</template> </template>
<script setup> <script setup>
import * as echarts from 'echarts'; import * as echarts from 'echarts';
...@@ -101,6 +101,9 @@ function renderEchartBar() { ...@@ -101,6 +101,9 @@ function renderEchartBar() {
{ {
data: state.dataSource.map(item => item.score), data: state.dataSource.map(item => item.score),
type: 'bar', type: 'bar',
itemStyle: {
color:'linear-gradient(to top, #2980b9, #6dd5fa, #ffffff)',
},
showBackground: true, showBackground: true,
backgroundStyle: { backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)' color: 'rgba(180, 180, 180, 0.2)'
...@@ -121,6 +124,7 @@ function renderEchartBar() { ...@@ -121,6 +124,7 @@ function renderEchartBar() {
}, },
markLine: { markLine: {
itemStyle: { itemStyle: {
color:'#ffffff',
normal: { normal: {
lineStyle: lineStyle:
{ {
......
<template> <template>
<div id="lineChartId" style="width:100vw;height:300px;margin: 0 auto"></div> <div id="lineChartId" style="width:100vw;height:200px;margin: 0 auto"></div>
</template> </template>
<script setup> <script setup>
import * as echarts from 'echarts'; import * as echarts from 'echarts';
......
<template> <template>
<div id="pieChartId" style="width:800px;height:300px;margin: 0 auto"></div> <div id="pieChartId" style="width:100%;height:300px;margin: 0 auto"></div>
</template> </template>
<script setup> <script setup>
import * as echarts from 'echarts'; import * as echarts from 'echarts';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册