From 22e3b88649f089e04f0174bcb7bb54d6c717d0a6 Mon Sep 17 00:00:00 2001
From: JohnYan <84345999@qq.com>
Date: Tue, 29 Dec 2020 23:51:40 +0800
Subject: [PATCH] v3.9.8.1
---
README.md | 9 +++++++++
.../css/comon0.css => custom/css/common0.css} | 14 +++++++-------
static/{echart => custom}/images/bg.jpg | Bin
static/{echart => custom}/images/head_bg.png | Bin
static/{echart/picture => custom/images}/jt.png | Bin
static/{echart/picture => custom/images}/lbx.png | Bin
static/{echart => custom}/images/line.png | Bin
.../{echart/picture => custom/images}/loading.gif | Bin
static/{echart/picture => custom/images}/map.png | Bin
static/{echart => custom}/js/index.html | 0
static/echart/echartedit/editor_min.js | 3 ++-
templates/echart/base.html | 3 ++-
templates/echart/common.html | 2 +-
templates/echart/div_editor.html | 11 ++++++++++-
templates/echart/option_editor.html | 6 ++++++
15 files changed, 37 insertions(+), 11 deletions(-)
rename static/{echart/css/comon0.css => custom/css/common0.css} (88%)
rename static/{echart => custom}/images/bg.jpg (100%)
rename static/{echart => custom}/images/head_bg.png (100%)
rename static/{echart/picture => custom/images}/jt.png (100%)
rename static/{echart/picture => custom/images}/lbx.png (100%)
rename static/{echart => custom}/images/line.png (100%)
rename static/{echart/picture => custom/images}/loading.gif (100%)
rename static/{echart/picture => custom/images}/map.png (100%)
rename static/{echart => custom}/js/index.html (100%)
diff --git a/README.md b/README.md
index 2b62c0c..fd276d4 100644
--- a/README.md
+++ b/README.md
@@ -116,9 +116,18 @@ url: 登录成功后跳转链接
#### 如果你是python开发者,可以在django项目中当作apps使用
+最简单的方法(推荐!!!!)
+请直接下载gitee/github的项目后
+pip install smartchart
+启动方式 python manage.py runserver
+帐号: admin/amdin
+
+
+如果你动手能力强
```shell script
pip install smartchart
简单配置一下, 你可以参考此demo
+资源文件你需要下载gitee/github上的(注意template的setting)
1. 在你的setting.py的INSTALL_APPS中加入'smart_chart.echart'
2. MIDDLEWARE 中注释掉XFrameOptionsMiddleware
3. setting.py中设定为中国时区, 支持中文基础平台建设!
diff --git a/static/echart/css/comon0.css b/static/custom/css/common0.css
similarity index 88%
rename from static/echart/css/comon0.css
rename to static/custom/css/common0.css
index e03fa20..f990558 100644
--- a/static/echart/css/comon0.css
+++ b/static/custom/css/common0.css
@@ -6,7 +6,7 @@
box-sizing: border-box}
*,body{padding:0px; margin:0px;color: #222;font-family: "微软雅黑";}
@font-face{font-family:electronicFont;src:url(../font/DS-DIGIT.TTF)}
-body{ background:#000d4a url(../images/bg.jpg) center top; background-size:cover;color:#666;font-size: .1rem;}
+body{ background:#000d4a url(../images/bg.jpg) center top; background-size:cover;color:#666;font-size: 1rem;}
li{ list-style-type:none;}
table{}
i{ margin:0px; padding:0px; text-indent:0px;}
@@ -35,8 +35,8 @@ a:hover{ color:#06c; text-decoration: none!important}
.copyright{ background:rgba(19,31,64,.32); border: 1px solid rgba(255,255,255,.05); line-height:.5rem; text-align: center; padding-right: 15px; bottom: 0; color:rgba(255,255,255,.7); font-size: .16rem; }
-.head{ height:1.05rem; background: url(../images/head_bg.png) no-repeat center center; background-size: 100% 100%; position: relative; z-index: 100;}
-.head h1{ color:#fff; text-align: center; font-size: .4rem; line-height:.8rem;}
+.head{ height:5.5rem; background: url(../images/head_bg.png) no-repeat center center; background-size: 100% 100%; position: relative; z-index: 100;}
+.head h1{ color:#fff; text-align: center; font-size: 3.5rem; line-height:.8rem;}
.head h1 img{ width:1.5rem; display: inline-block; vertical-align: middle; margin-right: .2rem}
.weather{ position:absolute; right:.3rem; top:0; line-height: .75rem;}
.weather img{ width:.37rem; display: inline-block; vertical-align: middle;}
@@ -48,16 +48,16 @@ a:hover{ color:#06c; text-decoration: none!important}
.mainbox>ul>li{ width: 30%}
.mainbox>ul>li:nth-child(2){ width: 40%;padding: 0}
-.boxall{ border: 1px solid rgba(25,186,139,.17); padding:0 .2rem .4rem .15rem; background: rgba(255,255,255,.04) url(../images/line.png); background-size: 100% auto; position: relative; margin-bottom: .15rem; z-index: 10;}
+.boxall{ border: 1px solid rgba(25,186,139,.17); padding:0.8rem .2rem .4rem .15rem; background: rgba(255,255,255,.04) url(../images/line.png); background-size: 100% auto; position: relative; margin-bottom: .15rem; z-index: 10;}
.boxall:before,
-.boxall:after{ position:absolute; width: .1rem; height: .1rem; content: ""; border-top: 2px solid #02a6b5; top: 0;}
+.boxall:after{ position:absolute; width: 1rem; height: 1rem; content: ""; border-top: 2px solid #02a6b5; top: 0;}
.boxall:before,.boxfoot:before{border-left: 2px solid #02a6b5;left: 0;}
.boxall:after,.boxfoot:after{border-right: 2px solid #02a6b5; right: 0;}
-.alltitle{ font-size:.2rem; color:#fff; text-align: center; line-height: .5rem;}
+.alltitle{ font-size:1.6rem; color:#fff; text-align: center; line-height: .5rem;}
.boxfoot{ position:absolute; bottom: 0; width: 100%; left: 0;}
.boxfoot:before,
-.boxfoot:after{ position:absolute; width: .1rem; height: .1rem; content: "";border-bottom: 2px solid #02a6b5; bottom: 0;}
+.boxfoot:after{ position:absolute; width: 1rem; height: 1rem; content: "";border-bottom: 2px solid #02a6b5; bottom: 0;}
.bar{background:rgba(101,132,226,.1); padding: .15rem;}
.barbox li,.barbox2 li{ width:50%; text-align: center; position: relative; z-index: 100;}
diff --git a/static/echart/images/bg.jpg b/static/custom/images/bg.jpg
similarity index 100%
rename from static/echart/images/bg.jpg
rename to static/custom/images/bg.jpg
diff --git a/static/echart/images/head_bg.png b/static/custom/images/head_bg.png
similarity index 100%
rename from static/echart/images/head_bg.png
rename to static/custom/images/head_bg.png
diff --git a/static/echart/picture/jt.png b/static/custom/images/jt.png
similarity index 100%
rename from static/echart/picture/jt.png
rename to static/custom/images/jt.png
diff --git a/static/echart/picture/lbx.png b/static/custom/images/lbx.png
similarity index 100%
rename from static/echart/picture/lbx.png
rename to static/custom/images/lbx.png
diff --git a/static/echart/images/line.png b/static/custom/images/line.png
similarity index 100%
rename from static/echart/images/line.png
rename to static/custom/images/line.png
diff --git a/static/echart/picture/loading.gif b/static/custom/images/loading.gif
similarity index 100%
rename from static/echart/picture/loading.gif
rename to static/custom/images/loading.gif
diff --git a/static/echart/picture/map.png b/static/custom/images/map.png
similarity index 100%
rename from static/echart/picture/map.png
rename to static/custom/images/map.png
diff --git a/static/echart/js/index.html b/static/custom/js/index.html
similarity index 100%
rename from static/echart/js/index.html
rename to static/custom/js/index.html
diff --git a/static/echart/echartedit/editor_min.js b/static/echart/echartedit/editor_min.js
index 9461c9e..090b75b 100644
--- a/static/echart/echartedit/editor_min.js
+++ b/static/echart/echartedit/editor_min.js
@@ -3,12 +3,13 @@ var smarthead = 'let dataset = __dataset__; //传入dataset\n'+
"//dataset=[['category','C1','C2'],['L1',10,20],['L2',15,25],['L3',8,15]];\n"+
'dataset = ds_transform(dataset) //可选, 当需要行列互转时\n'+
"//legend_label = ['C1','C2'] //legend_label的顺序可以指定, 已知系列名\n"+
-'let legend_label = ds_getRowName(dataset) //可选, 自动获取legend\n'+
+'let legend_label = ds_rowname(dataset) //可选, 自动获取legend\n'+
'let xlabel = dataset[0].slice(1) //x轴的标签列\n'+
'dataset = ds_createMap(dataset) //转化成KV格式\n\n';
var smartbottom="\ncharts.push(myChart__name__);"
var logstr='';
var helpText = '';
+var vapp = {};
function print(item){logstr+=item+";"};
function GetQueryString(name) {
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
diff --git a/templates/echart/base.html b/templates/echart/base.html
index 54c854d..8ade7c0 100644
--- a/templates/echart/base.html
+++ b/templates/echart/base.html
@@ -24,11 +24,12 @@ font-size:10px;
{% block style %}
{% endblock %}
+{% if dv %}{% endif %}
{% block stylesheet %}{% endblock %}{{devhead|safe}}
{% block body %}{% endblock %}