fine tune readme

This commit is contained in:
JohnYan 2020-12-31 11:09:36 +08:00
parent 2e129e2833
commit 8d4a8df5db
2 changed files with 67 additions and 98 deletions

165
README.md
View File

@ -1,3 +1,4 @@
[Wiki](https://gitee.com/smartchart/django_smartchart/wikis/pages) \|
[Community](https://www.smartchart.cn/) \|
[Sponsors](https://www.smartchart.cn/) \|
@ -15,6 +16,7 @@
</p>
<p align="center">
<img src="https://img.shields.io/badge/Release-V3.9.8-green.svg" alt="Downloads">
<a target="_blank" href="https://www.python.org/downloads/release/python-390/">
<img src="https://img.shields.io/badge/Python-3.6+-green.svg" />
</a>
@ -23,7 +25,15 @@
<a target="_blank" href='https://github.com/JohnYan2017/Echarts-Django'>
<img src="https://img.shields.io/github/stars/JohnYan2017/Echarts-Django.svg?style=social" alt="github star"/>
</a>
</p>
<p align="center">
<a href="https://qm.qq.com/cgi-bin/qm/qr?k=eC34KwVvEtMvfh8Zyn1RSfYlzZvuvm7i&jump_from=webapi"><img src="https://img.shields.io/badge/QQ群-476715246-orange"/></a>
<a target="_blank" href="https://www.smartchart.cn">
<img src="https://img.shields.io/badge/Author-John%20Yan-ff69b4.svg" alt="Downloads">
</a>
<a target="_blank" href="https://www.smartchart.cn">
<img src="https://img.shields.io/badge/Copyright%20-@smartchart.cn-%23ff3f59.svg" alt="Downloads">
</a>
</p>
-------------------------------------------------------------------------------
@ -32,10 +42,10 @@
-------------------------------------------------------------------------------
## 简介
- SmartChart基于Echarts的微代码开发平台,适用于任何WEB项目,比拖拽开发更方便
- 简单, 敏捷, 高效,通用化, 高度可定制化, 让你的项目瞬间档次提升
- 完全真正打通前后端, 图形数据联动, 筛选开发毫无压力
### 简介
- Django-SmartChart基于Smartchart/Echarts/Django的微代码开发平台,适用于任何WEB项目
- 简单, 敏捷, 高效,通用化, 高度可定制化, 让你的项目瞬间档次提升, 比拖拽开发更方便
- 完全真正打通前后端, 图形数据联动, 筛选开发毫无压力, 支持几乎常见的所有数据库
- 积木式的开发模式, 开箱即用, 安装简单, 依赖少, 适应各种平台
- 我们让简单和通用化不再是个矛盾体, 请加入我们共建生态, Like it Star it
@ -43,51 +53,64 @@
![smartchart](http://smartchart.cn/media/editor/WX20201128-075135@2x_20201128075202927382.png)
![smartchartvoice](http://smartchart.cn/media/editor/smartvoice_20201224085323156045.png)
### 安装使用说明:
### 样列
- [SmartChart大屏样列-智慧城市_大数据大屏](https://www.smartchart.cn/echart/?type=智慧城市_大数据大屏 "大屏样列-智慧城市_大数据大屏")
- [SmartChart集成DataV](https://www.smartchart.cn/echart/?type=Smartchart_DataV "集成DATAV")
- [Smartchart图形数据联动](https://www.smartchart.cn/echart/?type=评论分析 "图形数据联动")
- [Smartchart无关重要的视屏](https://www.ixigua.com/6910413586208653837?id=6910161770221044237 "smartchart")
### 快速开始
#### 安装Python环境
- 环境准备: 官方[最新Python下载链接](https://www.python.org/downloads/release/python-390/ "最新Python下载链接")
如果下载太慢, 可以到[淘宝镜象下载](https://npm.taobao.org/mirrors/python/3.9.0/ "淘宝镜象下载")
也可以直接下载[WINDOWS64位安装版](https://npm.taobao.org/mirrors/python/3.9.0/python-3.9.0-amd64.exe "WINDOWS64位安装版")
[MAC电脑安装版](http://npm.taobao.org/mirrors/python/3.9.0/python-3.9.0rc2-macosx10.9.pkg "MAC电脑安装版")
- [Window平台安装视屏介绍](https://www.ixigua.com/6901867671193649668/ "Window平台安装视屏介绍")
#### 如果你是非Python语言的开发者
- [Window平台安装视屏介绍](https://www.ixigua.com/6910413586208653837?id=6901867671193649668 "Window平台安装视屏介绍")
#### 安装SmartChart
```shell script
你可以把smartchart当作服务来嵌入你的页面使用
1. 安装Python环境(参考上面的环境准备)
2. 命令行安装:
pip3 install smartchart
pip3 install smartchart -U (升级)
安装慢建意使用
如果安装过程慢,建意使用
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple smartchart
如果你是第一次安装SmartChart(注意,非第一次不要执行,会覆盖原有DB)
pip3 install smartdb (初始化DB)
```
# 初始化方法
Window系统中以下命令的 smartchart xxx 使用 smartchart.py xxx 代替
注意: 如果你是Windows系统且安装过pycharm, 你可能需要随意新建一个xx.py的文件,
右键选择打开方式, 改成永久使用python来关联打开
3. 初始化DB, 命令行输入
smartchart makemigrations
smartchart migrate
4. 建立管理员帐号, 如果已有可忽略
smartchart createsuperuser
5. 本地命令行启动:
#### 快速启动
Window系统中以下命令的 smartchart xxx 使用 smartchart.py xxx 代替
注意: 如果你是Windows系统且安装过pycharm, 你可能需要随意新建一个xx.py的文件,
右键选择打开方式, 改成永久使用python来关联打开
```shell script
本地命令行启动:
smartchart
如果你需要远程访问,启动方式:
smartchart runserver 0.0.0.0:8000 --insecure
```
**访问首页http://127.0.0.1:8000, 点击首页右上方的云图标初始化数据**
**开发前建意新建一个非超级管理员帐号(重要),避免改到内置的数据集和图形**
**并观看视屏说明!!!**
- [SQL与图形联动视屏教程](https://www.ixigua.com/6902584882958959116/ "SQL与图形联动视屏教程")
- [基础操作视屏教程](https://www.ixigua.com/6882218819964797447/ "基础操作视屏教程")
**开发前请 观看视屏说明!!! 重要!! 重要!!**
- [Smartchart数据库与数据集SQL](https://www.ixigua.com/6910413586208653837?id=6902584882958959116 "SQL")
- [Smartchart页面快速布局](https://www.ixigua.com/6910413586208653837?id=6907784122065191438 "布局")
- [Smartchart数据库与图形的对话](https://www.ixigua.com/6910413586208653837?id=6910373199603565063 "布局")
- [SmartChart大屏模板转化](https://www.ixigua.com/6910825442245083660/ "模板")
### 数据库支持说明
- 原生支持的有mysql,sqlite,API,EXCEL数据
- SQL Server 需安装 pip install pymssql
- ORACLE 需安装 pip install cx_Oracle
- GP,Postgrep 需安装 pip install psycopg2
- Impala 需安装 pip install impyla
- ....
### 系统对接方式
```python
# 如果需要你可以采用单点登录的方式与smartchart进行对接嵌入
# 各种语言的对接源码可以在对应的xxxInterface中找到,欢迎PULL
'/echart/smart_login?id=xxx&stamp=xxx&token=xxx&url=/'
'''
参数说明:
@ -99,12 +122,11 @@ token: 采用sha1加密, token=SHA1(链接秘钥+stamp+id)
url: 登录成功后跳转链接
'''
# 提示:为了数据安全,对外生产环境使用,务必设定你的环境变量SMART_KEY
```
**提示:为了数据安全,对外生产环境使用,务必设定你的环境变量SMART_KEY**
#### 如果你是python开发者,可以在django项目中当作apps使用
### 在django项目中当作apps使用
最简单的方法(推荐!!!!)
```shell script
请直接下载gitee/github的项目后
@ -140,20 +162,22 @@ pip install smartchart
8. 启动服务
python manage.py runserver
```
**访问首页http://127.0.0.1:8000, 点击首页右上方的云图标初始化数据**
##### 图形样列参考
- [SmartChart图形样列](https://www.smartchart.cn/echart/show/ "图形样列")
- [SmartChart仪表盘样列](https://www.smartchart.cn/index/ "项目样列")
#### 安装及使用问题,微信群有时效性,加以下微信号拉你入群
### 联系我们与帮助
**安装及使用问题,微信群有时效性,可加以下微信号拉你入群**
<img src="https://www.smartchart.cn/media/editor/QQ20201201-140615@2x_20201201140657981573.png" alt="smartchart" height="150" />
QQ群: 476715246 备注: smartchart
你也可以加入QQ群进行普通问题讨论
**QQ群: 476715246 暗号: smartchart**
-------------------------------------------------------------------------------
### 开发指引:
### 开发指引与声明:
**此项目为前端代码开源可商用(需保留作者信息)**
```shell script
对应的项目目录说明:
@ -165,8 +189,6 @@ static/editor -- 编辑器界面js
static/index -- Portal对应js, css
static/custom -- 你可以在此新建人个文件夹存放自定义css, js, image ..
CharResource -- 存放echarts转化后的smartchart
git clone 项目
pip install smartchart
启动方式 python manage.py runserver
@ -182,74 +204,21 @@ pip install smartchart
#### Change Log
```shell script
2020/12/14 静态资源本地化
TBD 初始友好化及VUE支持进行中
v3.9.8.2 支持所有常见数据库,支持VUE,DATAV
```
-------------------------------------------------------------------------------
### 更多使用说明:
<font size=5 color=red><b>SmartChart</b> designed for you</font>
SmartChart是为你而生的一个产品, 你只需要使用通用开发技术就可以使用,无需学习特定的技能, 因为她的通用性, 所以让你的知识不会因为改变而淘汰
**SmartChart designed for you / SmartChart是为你而生的一个产品,**
你只需要使用通用开发技术就可以使用,无需学习特定的技能, 因为她的通用性, 所以让你的知识不会因为改变而淘汰
因为她的灵活性, 你可以充分发挥你的智慧让她变得非常的Smart
抛弃繁琐的操作, 加速你的开发效率, 和BI产品相比, 如同Linux与Window的区别
她是一个数据集装箱, 让你非常方便的把数据组装起来后, 可使用统一的接口对外服务,支持系统间嵌入,实时,快速定制化开发. 你也可以理解为数据中台, 用可视化提供统一数据服务. 这是一个面向开发人员的平台, 实现数据的最后一公里
- 开始使用smart chart, 您不需要任何专业知识, 无需coding, 选择模块组装即可!
- 但如果要使用好smart chart, 建意了解下javascript, H5, Echarts这些前端知识, 可以让你的应用更加得心应手,创作更炫的效果
- 如果你需要更进一步订制你的数据, 你需要了解下SQL的使用,本项目高级应用语言都是通用的技能, 象js, h5,sql 学习成本低
#### 入门视屏说明(以下文字说明是之前版本,现已迭代多次,建意看视屏了解)
- [视屏教程一](https://www.ixigua.com/6902584882958959116/ "视屏教程一")
- [视屏教程二](https://www.ixigua.com/6887009904889070094/ "视屏教程二")
#### Smart Chart 基础
主要分为 数据连接池, 数据集, 图形格式, 页面模板, 主题, 组装盒(Dashboard)
- (数据集+图形格式) => 图形(report)
- (图形report+report+...) + 页面模板 + 主题 => Dashboard
#### 数据集
数据集可以理解为一个个的cube, 通过sql生成, 支持定时, 点频, 实时刷新的机制, 我们建意你用专业的工具开发sql 查询, 如navicate,datagrip,hue
数据集的高级用法, 参考如下链接 [数据集图形对应关系](https://www.smartchart.cn/blog/article/2019/7/9/10.html "数据集图形对应关系")
**对于一般用户来说, 无需了解如何生成数据集, 但建意了解以下数据集的常识**
数据集统一向图形传递数据的参数名为dataset, dataset是一个二维表结构, 如下
```python
dataset = [
['时间','人口','发展','潜力'],
['2018年', 12 , 10 , 9],
['2017年', 8 , 7 , 3],
......
]
```
#### 图形设定
smartchart内置了非常多的图形, 可以直接拿来使用, 但是要定制自已的样式, 建意稍作修改, 比如加上图形, 更改tips, 标题等等, 具体修改方式, 请参考[smartchart平台样列](https://www.smartchart.cn/echart/editor_min/?chartid=69 "smartchart平台样列")
如果你想进一步了解, 你可以参考 [自定义图形指南](https://www.smartchart.cn/blog/article/2019/8/21/14.html "自定义图形指南")
#### 模版
每一个div对应一个DIV格式, 可以比喻成给图形包一件衣服,我们会把图形绑定到这个容器中,你可以用它来设定容器的样式,如长宽高,边距,边框等等:
```html
<div id="container_{name}" style="height:100%;"></div>
```
**估计以让说明你有点不知如何下手, 建议先看最下方的视屏**
- [SmartChart入门](https://www.smartchart.cn/blog/article/2019/12/14/33.html "SmartChart入门")
- [组装Dashboard](https://www.smartchart.cn/blog/article/2019/6/7/7.html "组装Dashboard")
- [你的第一个模板](https://www.smartchart.cn/blog/article/2019/6/8/8.html "你的第一SMART CHART 模板")
- [数据集使用指南](https://www.smartchart.cn/blog/article/2019/7/9/10.html "数据集使用指南")
- [自定义图形指南](https://www.smartchart.cn/blog/article/2019/8/21/14.html "自定义图形指南")
- [模板开发指南](https://www.smartchart.cn/blog/article/2019/11/24/30.html "模板开发指南")
- [dashboard权限管理](https://www.smartchart.cn/blog/article/2019/9/13/17.html "dashboard权限管理")
- [图形简单联动指南](https://www.smartchart.cn/blog/article/2019/10/26/25.html "图形联动指南")
- [筛选器设计指南](https://www.smartchart.cn/blog/article/2019/10/21/24.html "筛选器设计指南")
- [联动钻取设计指南](https://www.smartchart.cn/blog/article/2019/10/27/26.html "钻取设计指南")
- [共享数据集指南](https://www.smartchart.cn/blog/article/2019/10/30/27.html "公用数据集指南")
- [动态播放效果](https://www.smartchart.cn/blog/article/2020/8/21/46.html "动态播放效果")
- [可视化设计工具](https://www.smartchart.cn/blog/article/2019/9/22/18.html "可视化设计工具")
- [图形在线调试](https://www.smartchart.cn/echart/editor/ "图形在线调试")
- [视屏教程一](https://www.ixigua.com/6887009904889070094/ "视屏教程一")
- [视屏教程二](https://www.ixigua.com/6882218819964797447/ "视屏教程二")
- [SmartChart入门文档入口, 以视屏为准](https://www.smartchart.cn/blog/article/2019/12/14/33.html "SmartChart入门")

Binary file not shown.