v3.9.8.1
@ -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中设定为中国时区, 支持中文基础平台建设!
|
||||
|
@ -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;}
|
Before Width: | Height: | Size: 252 KiB After Width: | Height: | Size: 252 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 701 B After Width: | Height: | Size: 701 B |
Before Width: | Height: | Size: 302 KiB After Width: | Height: | Size: 302 KiB |
@ -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');
|
||||
|
@ -24,11 +24,12 @@ font-size:10px;
|
||||
{% block style %}
|
||||
{% endblock %}</style></head>
|
||||
<link rel="icon" type="image.png" href="/static/images/favicon.ico"><link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
|
||||
{% if dv %}<script src="https://cdn.jsdelivr.net/npm/vue"></script><script src="https://unpkg.com/@jiaminghi/data-view/dist/datav.min.vue.js"></script>{% endif %}
|
||||
{% block stylesheet %}{% endblock %}{{devhead|safe}}
|
||||
{% block body %}{% endblock %}
|
||||
</html><script src="/static/js/jquery-2.2.3.min.js"></script><script type="text/javascript" src="/static/echart/dist/echarts.min.js"></script><script type="text/javascript" src="/static/echart/dist/extension/echarts-wordcloud.min.js"></script><script src="/static/echart/dist/china.js"></script><script src="/static/js/fun.js"></script><script src="/static/echart/theme/{{theme}}"></script><script type="text/javascript" src="/static/bootstrap/js/bootstrap.min.js"></script>
|
||||
{{footer|safe}}{% block javascript %}{% endblock %}
|
||||
<script>var app = {};var charts = [];{{echart_main|safe}}window.onresize = function(){for(var i = 0; i < charts.length; i++){charts[i].resize();}};
|
||||
<script>{% if dv %}var vapp = new Vue({el: '#vue_app', data: {d0:0,d1:0,d2:0,d3:0,d4:0,d5:0,d6:0,d7:0,d8:0,d9:0,d10:0,d11:0,d12:0,d13:0,d14:0,d15:0,d16:0}});{% endif %}var app = {};var charts = [];{{echart_main|safe}}window.onresize = function(){for(var i = 0; i < charts.length; i++){charts[i].resize();}};
|
||||
$(function(){
|
||||
$("#fullScreen").on("click",function(){
|
||||
var isFull=!!(document.webkitIsFullScreen || document.mozFullScreen ||
|
||||
|
@ -6,7 +6,7 @@
|
||||
<body {{body|safe}}>
|
||||
|
||||
<div class="container_fluid">
|
||||
<div class="row_fluid">
|
||||
<div class="row_fluid" id="vue_app">
|
||||
{% for div in div_list %}
|
||||
{{div|safe}}
|
||||
{% endfor %}
|
||||
|
@ -34,7 +34,8 @@
|
||||
<option value="dawn">dawn</option>
|
||||
<option value="sqlserver">sqlserver</option>
|
||||
<option value="twilight">twilight</option>
|
||||
</select><span id="printlog" style="color:red"></span>
|
||||
</select><a class="glyphicon glyphicon-import" href="#" id="load_sample"
|
||||
style="color: rgb(255, 140, 60);">DV</a><span id="printlog" style="color:red"></span>
|
||||
<a class="glyphicon glyphicon-question-sign" title="帮助"
|
||||
style="color: rgb(155, 205, 60);float:right" onclick="load_help('help_div')"></a>
|
||||
<a class="glyphicon glyphicon-magnet" title="复制数据集"
|
||||
@ -98,6 +99,14 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
$("#load_sample").click(function () {
|
||||
$.ajax({
|
||||
type: "get", url: 'https://www.smartchart.cn/smartdata/api/?i=datavsample',
|
||||
success: function (data) {
|
||||
editor1.setValue(data);
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -74,6 +74,12 @@
|
||||
"client":"http://xxxxx",
|
||||
//图形背景色,深色:#0B1837 #101E44 #0f375f 淡色:#f2f2f2
|
||||
"chartcolor":"white"
|
||||
//加载自定义CSS
|
||||
"css":["/static/custom/xx","xxxx"],
|
||||
//加载自定义CSS
|
||||
"js":["/static/custom/xx","xxxx"],
|
||||
//开启datav和vue模式
|
||||
"dv":1
|
||||
}</pre>
|
||||
更多<a href="https://www.smartchart.cn/blog/article/2019/11/6/28.html" target="_blank">设定说明</a>
|
||||
</div>
|
||||
|