<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
#chart-panel {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
width: 1000px;
height: 750px;
}
</style>
<script src="./lib/5.5.0/echarts.min.js"></script>
</head>
<body>
<div id="chart-panel"></div>
<!-- 为ECharts准备一个具备大小(宽高)的Dom -->
<script type="text/javascript">
//初始化图表对象。
var myChart = echarts.init(document.getElementById('chart-panel'));
//图表配置。
var testData = [100, 60, 130, 170, 140, 100];
var path = 'path://M214,1079l8-6h16l8,6-8,6H222Z';
var colorList = [
new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
offset: 0,
color: '#fe3636',
},
{
offset: .3,
color: '#fe3636'
},
{
offset: .3,
color: '#ff4546'
},
{
offset: .5,
color: '#ff4546'
},
{
offset: .7,
color: '#ff4546'
},
{
offset: .7,
color: '#ff8584'
},
{
offset: 1,
color: '#ff8584'
}
]),
new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
offset: 0,
color: '#ffb200',
},
{
offset: .3,
color: '#ffb200'
},
{
offset: .3,
color: '#fec200'
},
{
offset: .5,
color: '#fec200'
},
{
offset: .7,
color: '#fec200'
},
{
offset: .7,
color: '#ffdb17'
},
{
offset: 1,
color: '#ffdb17'
}
]),
new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
offset: 0,
color: '#df7100',
},
{
offset: .3,
color: '#df7100'
},
{
offset: .3,
color: '#fd8c00'
},
{
offset: .5,
color: '#fd8c00'
},
{
offset: .7,
color: '#fd8c00'
},
{
offset: .7,
color: '#ff9a00'
},
{
offset: 1,
color: '#ff9a00'
}
]),
new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
offset: 0,
color: '#b0b513',
},
{
offset: .3,
color: '#b0b513'
},
{
offset: .3,
color: '#bec81a'
},
{
offset: .5,
color: '#bec81a'
},
{
offset: .7,
color: '#bec81a'
},
{
offset: .7,
color: '#dcdc3c'
},
{
offset: 1,
color: '#dcdc3c'
}
]),
new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
offset: 0,
color: '#0078e6',
},
{
offset: .3,
color: '#0078e6'
},
{
offset: .3,
color: '#1593f7'
},
{
offset: .5,
color: '#1593f7'
},
{
offset: .7,
color: '#1593f7'
},
{
offset: .7,
color: '#4daeff'
},
{
offset: 1,
color: '#4daeff'
}
]),
new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
offset: 0,
color: '#8906aa',
},
{
offset: .3,
color: '#8906aa'
},
{
offset: .3,
color: '#a11cb6'
},
{
offset: .5,
color: '#a11cb6'
},
{
offset: .7,
color: '#a11cb6'
},
{
offset: .7,
color: '#b030cb'
},
{
offset: 1,
color: '#b030cb'
}
]),
];
let option = {
toolbox: {
show: true,
feature: {
saveAsImage: {},
},
},
backgroundColor: '#dedede',
title: {
text: 'BUSINESS TEMPLATE',
textStyle: {
fontSize: '20',
fontFamily: 'FZYaoti',
fontWeight: '600',
color: '#f84e4f',
},
},
tooltip: {
trigger: 'item',
},
grid: {
left: 100,
bottom: 100
},
xAxis: {
axisLabel: {
textStyle: {
color: 'rgba(65, 49,28, .9)',
fontSize: 30,
fontFamily: 'FZYaoti',
fontWeight: 100,
},
margin: 20,
},
splitLine: {
show: false
},
axisLine: {
lineStyle: {
color: 'rgba(255, 255,255, .8)',
width: 4,
}
},
axisTick: {
show: false
},
data: ['A', 'B', 'C', 'D', 'E', 'F',]
},
yAxis: {
axisLine: {
show: false
},
axisLabel: {
textStyle: {
color: '#42321c',
fontSize: 20,
fontFamily: 'FZYaoti',
},
margin: 20,
},
splitLine: {
show: true,
lineStyle: {
color: 'rgba(255, 255,255, .8)',
width: 2,
}
},
axisTick: {
show: false
},
},
series: [
{
type: "pictorialBar",
symbol: path,
symbolSize: [45.5, 25],
symbolOffset: [0, 12],
z: 1,
itemStyle: {
opacity: 1,
color: function (params) {
return colorList[params.dataIndex]
},
shadowColor: 'rgba(115, 106, 28, .7)',
shadowBlur: 3,
图表制作解说(目标1000个图表)
- 粉丝: 1222
- 资源: 394
最新资源
- keras-image-recognition keras 图像识别
- 基于python的企业物流管理系统(django)源代码(完整前后端+mysql+说明文档+LW).zip
- Linux驱动开发环境:跨编译与虚拟化解决方案
- Hutool是一个功能丰富且易用的Java工具库,通过诸多实用工具类的使用,旨在帮助开发者快速、便捷地完成各类开发任务 这些封装的工具涵盖了字符串、数字、集合、编码、日期、文件、IO、加密、数据库J
- 网络安全检测工具WebRobot
- Linux 内核及驱动程序开发基础知识概览与解析
- 数字图像处理思维导图与简答题-题库4.zip
- 超级好的表白代码圣诞树源代码(包含网页版和Python版)100%好用.zip
- 深度学习数据集+时序数据+挪威气象局峡湾海浪监测浮标数据
- Linux驱动开发入门课程:基础知识与模块操作
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈