From 05b2f5eb83056ae71c6bfb89b24f40a462d3e1c5 Mon Sep 17 00:00:00 2001
From: gongfuxiang <2499232802@qq.com>
Date: Sat, 23 Feb 2019 09:52:13 +0800
Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E6=96=B0=E5=A2=9E=E4=B8=BB?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../admin/view/default/index/init.html | 6 +-
.../admin/view/default/public/footer.html | 3 +
public/static/common/lib/echarts/macarons.js | 198 ++++++++++++++++++
3 files changed, 204 insertions(+), 3 deletions(-)
create mode 100644 public/static/common/lib/echarts/macarons.js
diff --git a/application/admin/view/default/index/init.html b/application/admin/view/default/index/init.html
index f939cdad7..b769b1f47 100755
--- a/application/admin/view/default/index/init.html
+++ b/application/admin/view/default/index/init.html
@@ -156,7 +156,7 @@
$(function()
{
// 近7日订单交易走势
- var order_trading_chart = echarts.init(document.getElementById('echarts-order-trading'));
+ var order_trading_chart = echarts.init(document.getElementById('echarts-order-trading'), 'macarons');
var option = {
tooltip : {
trigger: 'axis',
@@ -204,7 +204,7 @@ $(function()
// 近7日热销商品
- var goods_hot_chart = echarts.init(document.getElementById('echarts-goods-hot'));
+ var goods_hot_chart = echarts.init(document.getElementById('echarts-goods-hot'), 'macarons');
var option = {
title : {
subtext: '只显示前10条商品',
@@ -248,7 +248,7 @@ $(function()
goods_hot_chart.setOption(option);
// 近7日订单支付方式
- var order_pay_type_chart = echarts.init(document.getElementById('echarts-order-pay-type'));
+ var order_pay_type_chart = echarts.init(document.getElementById('echarts-order-pay-type'), 'macarons');
var option = {
tooltip : {
trigger: 'axis'
diff --git a/application/admin/view/default/public/footer.html b/application/admin/view/default/public/footer.html
index 687864df6..c74f6b266 100755
--- a/application/admin/view/default/public/footer.html
+++ b/application/admin/view/default/public/footer.html
@@ -6,7 +6,10 @@
+
+
+
diff --git a/public/static/common/lib/echarts/macarons.js b/public/static/common/lib/echarts/macarons.js
new file mode 100644
index 000000000..398aa3fdd
--- /dev/null
+++ b/public/static/common/lib/echarts/macarons.js
@@ -0,0 +1,198 @@
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['exports', 'echarts'], factory);
+ } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
+ // CommonJS
+ factory(exports, require('echarts'));
+ } else {
+ // Browser globals
+ factory({}, root.echarts);
+ }
+}(this, function (exports, echarts) {
+ var log = function (msg) {
+ if (typeof console !== 'undefined') {
+ console && console.error && console.error(msg);
+ }
+ };
+ if (!echarts) {
+ log('ECharts is not Loaded');
+ return;
+ }
+
+ var colorPalette = [
+ '#2ec7c9','#b6a2de','#5ab1ef','#ffb980','#d87a80',
+ '#8d98b3','#e5cf0d','#97b552','#95706d','#dc69aa',
+ '#07a2a4','#9a7fd1','#588dd5','#f5994e','#c05050',
+ '#59678c','#c9ab00','#7eb00a','#6f5553','#c14089'
+ ];
+
+
+ var theme = {
+ color: colorPalette,
+
+ title: {
+ textStyle: {
+ fontWeight: 'normal',
+ color: '#008acd'
+ }
+ },
+
+ visualMap: {
+ itemWidth: 15,
+ color: ['#5ab1ef','#e0ffff']
+ },
+
+ toolbox: {
+ iconStyle: {
+ normal: {
+ borderColor: colorPalette[0]
+ }
+ }
+ },
+
+ tooltip: {
+ backgroundColor: 'rgba(50,50,50,0.5)',
+ axisPointer : {
+ type : 'line',
+ lineStyle : {
+ color: '#008acd'
+ },
+ crossStyle: {
+ color: '#008acd'
+ },
+ shadowStyle : {
+ color: 'rgba(200,200,200,0.2)'
+ }
+ }
+ },
+
+ dataZoom: {
+ dataBackgroundColor: '#efefff',
+ fillerColor: 'rgba(182,162,222,0.2)',
+ handleColor: '#008acd'
+ },
+
+ grid: {
+ borderColor: '#eee'
+ },
+
+ categoryAxis: {
+ axisLine: {
+ lineStyle: {
+ color: '#008acd'
+ }
+ },
+ splitLine: {
+ lineStyle: {
+ color: ['#eee']
+ }
+ }
+ },
+
+ valueAxis: {
+ axisLine: {
+ lineStyle: {
+ color: '#008acd'
+ }
+ },
+ splitArea : {
+ show : true,
+ areaStyle : {
+ color: ['rgba(250,250,250,0.1)','rgba(200,200,200,0.1)']
+ }
+ },
+ splitLine: {
+ lineStyle: {
+ color: ['#eee']
+ }
+ }
+ },
+
+ timeline : {
+ lineStyle : {
+ color : '#008acd'
+ },
+ controlStyle : {
+ normal : { color : '#008acd'},
+ emphasis : { color : '#008acd'}
+ },
+ symbol : 'emptyCircle',
+ symbolSize : 3
+ },
+
+ line: {
+ smooth : true,
+ symbol: 'emptyCircle',
+ symbolSize: 3
+ },
+
+ candlestick: {
+ itemStyle: {
+ normal: {
+ color: '#d87a80',
+ color0: '#2ec7c9',
+ lineStyle: {
+ color: '#d87a80',
+ color0: '#2ec7c9'
+ }
+ }
+ }
+ },
+
+ scatter: {
+ symbol: 'circle',
+ symbolSize: 4
+ },
+
+ map: {
+ label: {
+ normal: {
+ textStyle: {
+ color: '#d87a80'
+ }
+ }
+ },
+ itemStyle: {
+ normal: {
+ borderColor: '#eee',
+ areaColor: '#ddd'
+ },
+ emphasis: {
+ areaColor: '#fe994e'
+ }
+ }
+ },
+
+ graph: {
+ color: colorPalette
+ },
+
+ gauge : {
+ axisLine: {
+ lineStyle: {
+ color: [[0.2, '#2ec7c9'],[0.8, '#5ab1ef'],[1, '#d87a80']],
+ width: 10
+ }
+ },
+ axisTick: {
+ splitNumber: 10,
+ length :15,
+ lineStyle: {
+ color: 'auto'
+ }
+ },
+ splitLine: {
+ length :22,
+ lineStyle: {
+ color: 'auto'
+ }
+ },
+ pointer : {
+ width : 5
+ }
+ }
+ };
+
+ echarts.registerTheme('macarons', theme);
+}));
\ No newline at end of file
--
GitLab