├── .gitignore
├── LICENCE
├── README-EN.md
├── README.md
├── db.sqlite3
├── deploy
├── nginx.conf
├── restart.sh
├── smartchart.service
├── start.sh
├── stop.sh
├── uwsgi.ini
└── uwsgi_params
├── log
└── .keep
├── manage.py
├── requirements.txt
├── smartcharts
├── __init__.py
├── asgi.py
├── settings.py
├── urls.py
└── wsgi.py
├── static
└── custom
│ ├── css
│ └── common0.css
│ ├── font
│ └── DS-DIGIT.TTF
│ ├── images
│ ├── bg.jpg
│ ├── head_bg.png
│ ├── jt.png
│ ├── lbx.png
│ ├── line.png
│ ├── loading.gif
│ └── map.png
│ └── js
│ └── index.html
└── templates
└── diy
└── common.html
/.gitignore:
--------------------------------------------------------------------------------
1 | # Project exclude paths
2 | /venv/
3 | /.idea/
4 | .gitignore
--------------------------------------------------------------------------------
/LICENCE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [SmartChart.cn of JohnYan]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
--------------------------------------------------------------------------------
/README-EN.md:
--------------------------------------------------------------------------------
1 | [Wiki](https://gitee.com/smartchart/smartchart/wikis/pages) \|
2 | [Community](https://www.smartchart.cn/) \|
3 | [Sponsors](https://www.smartchart.cn/) \|
4 | [GitHub](https://github.com/JohnYan2017/Echarts-Django) \|
5 | [Gitee](https://gitee.com/smartchart/smartchart)
6 |
7 |
8 |
9 |
10 |
11 | A platform that Connect Data to Echarts.
12 |
13 |
14 | https://www.smartchart.cn
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | -------------------------------------------------------------------------------
39 |
40 |
41 |
42 | ### Introduction
43 |
44 | - Smartchart is a microcode development platform for data visualization, large screen, mobile report and web applications
45 |
46 | - Simple, agile, efficient, universal and highly customizable, so that your project can be upgraded instantly
47 |
48 | - Fully open up the front and back ends, support graphic data linkage, filtering and drilling, and support almost all common databases
49 |
50 | - The building block development mode supports drag and drop layout, out of the box, simple installation, less dependence, and is suitable for various platforms
51 |
52 | - Support Django app plug-in application and jupyter data analysis application
53 |
54 | - Memory acceleration technology makes your data one step faster and greatly reduces the pressure on the database
55 |
56 | - No repeated learning cost, highly customizable, attention is highly customizable!!
57 |
58 |
59 |
60 |
61 | 
62 | 
63 |
64 | ### Sample
65 | - [smartchart big screen sample - smart city big data big screen](https://www.smartchart.cn/echart/?type=智慧城市_大数据大屏 "大屏样列-智慧城市_大数据大屏")
66 | - [smartchart integrated datav](https://www.smartchart.cn/echart/?type=Smartchart_DataV "集成DATAV")
67 | - [smartchart graphics data linkage](https://www.smartchart.cn/echart/?type=评论分析 "图形数据联动")
68 |
69 |
70 |
71 | ### Quick start
72 |
73 | #### Install Python environment
74 |
75 | - Environment preparation: Official [latest Python download link](https://www.python.org/downloads/release/python-390/ "Latest Python download link")
76 |
77 | If the download is too slow, you can go to [Taobao mirror image download](https://npm.taobao.org/mirrors/python/3.9.0/ "Taobao mirror image download")
78 |
79 | You can also download [windows 64 bit installation version](https://npm.taobao.org/mirrors/python/3.9.0/python-3.9.0-amd64.exe "Windows 64 bit installation version")
80 |
81 | [Mac computer installation version](http://npm.taobao.org/mirrors/python/3.9.0/python-3.9.0rc2-macosx10.9.pkg "Mac computer installation version")
82 |
83 | - [window platform installation video introduction](https://www.ixigua.com/6910413586208653837?id=6901867671193649668 "Window platform installation video introduction")
84 |
85 | **Note: when Windows installs python, you need to select "add to path"**
86 |
87 |
88 |
89 | #### Installing smartchart
90 |
91 | ```shell script
92 |
93 | pip3 install smartchart
94 |
95 |
96 |
97 | If the installation process is slow, it is recommended to use it
98 |
99 | pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple smartchart -U
100 |
101 |
102 |
103 | Upgrade method:
104 |
105 | PIP3 install smartchart - U (upgrade)
106 |
107 | ```
108 |
109 |
110 |
111 | [smartchart getting started document entry](https://gitee.com/smartchart/smartchart/wikis/ "Getting started with smartchart")
112 |
113 |
114 |
115 |
116 | ### Application scenario 1:
117 |
118 | If you are not familiar with Django / python, you only need a visual development platform, which can be started quickly and used independently
119 |
120 | ```shell script
121 |
122 | Local command line startup:
123 |
124 | smartchart
125 |
126 | Or smartcharts (automatically open web pages)
127 |
128 | If you are a server deployment, remote access, server startup method:
129 |
130 | smartchart runserver 0.0.0.0:8000 --insecure --noreload
131 |
132 | ```
133 |
134 | **Administrator account password: admin / Admin, please change the password in time**
135 |
136 |
137 |
138 | [smartchart getting started document entry](https://gitee.com/smartchart/smartchart/wikis/ "Getting started with smartchart")
139 |
140 |
141 |
142 |
143 | -------------------------------------------------------------------------------
144 |
145 |
146 |
147 | ### Application scenario 2:
148 |
149 | If you are a data analysis enthusiast and are using jupyter, pandas and other analysis tools, you can use them as visualization tools
150 |
151 | **It supports Python drawing tools such as pyecarts and Matplotlib to be used in Jupiter, which is more convenient and cool**
152 |
153 | **There are only two commands, get and set, which can simplify the data analysis work, solidify the analyzed data and generate a cool dashboard**
154 |
155 | [getting started with smartchart in jupyter](https://gitee.com/smartchart/smartchart/wikis/6.Jupyter%E5%BA%94%E7%94%A8/%E5%9C%A8Jupyter%E4%B8%AD%E4%BD%BF%E7%94%A8%E6%8C%87%E5%BC%95 "Getting started using smartchart in Jupiter")
156 |
157 |
158 |
159 |
160 | -------------------------------------------------------------------------------
161 |
162 | ### Application scenario 3:
163 |
164 | You can also use smartchart to make reports and embed reports in your application system
165 |
166 | [embedded smartchart report getting started document](https://gitee.com/smartchart/smartchart/wikis/7.%E6%8A%A5%E8%A1%A8%E5%B5%8C%E5%85%A5/%E7%AE%80%E5%8D%95%E5%B5%8C%E5%85%A5 "Embedded smartchart report getting started document")
167 |
168 |
169 |
170 | -------------------------------------------------------------------------------
171 |
172 | ### Application scenario 4:
173 |
174 | If you are a developer of Django application, congratulations. It can be a seamless part of your project
175 |
176 | The functions of data visualization, dashboard and low code API development platform are instantaneous
177 |
178 | [getting started with smartchart in Django](https://gitee.com/smartchart/smartchart/wikis/8.Django%E5%BA%94%E7%94%A8/%E5%B5%8C%E5%85%A5Django%)
179 | -Django novices recommend downloading this project
180 | ```shell script
181 | Please download the gitee / GitHub project directly
182 | pip install smartchart
183 | Startup method: Python manage py runserver
184 | Account number: admin / Admin
185 | ```
186 | ------------------------------------------------
187 | ### Database support description
188 | Smartchart can theoretically support any data source ,Mysql, SQLite, API and Excel data are supported by default. You can use Python connector to extend any data source
189 | - SQL server requires PIP install pymssql
190 | - Oracle needs to install PIP install Cx_ Oracle
191 | - GP, postgrep needs to install PIP install psychopg2
192 | - PIP install impyla is required for impala
193 | - DB2 requires PIP install IBM_ db
194 | - Python requires PIP install pandas, openpyxl
195 | - ....
196 |
197 |
198 | ### Contact us for help
199 | You can also join QQ group to discuss common problems
200 | **QQ group: 476715246 Code: smartchart**
201 | -------------------------------------------------------------------------------
202 | #### Change Log
203 | ```shell script
204 | 2020 / 12 / 14 static resource localization
205 | v3. 9.8.2 support all common databases, Vue and datav
206 | v3. 9.8.7 support Jupiter, one click sharing and application of dashboard template
207 | v3. 9.8.9 account binding function online
208 | v3. 9.8.10 user defined graphics management online
209 | v3. 9.8.17 support the latest echarts5 0, optimize loading speed
210 | v3. 9.8.20 user defined graphics management function upgrade
211 | v3. 9.8.23 echarts upgrades to 5.0.1, which supports multiple queries corresponding to one dataset and resource localization
212 | v3. 9.9.0 print function optimization, new pivot function, personal static resource path display, DB2 support
213 | v3. 9.9.1 development interface beautification
214 | v3. 9.9.5 optimize the development interface, fix regularly refresh the bug, add and delete batch datasets
215 | v3. 9.9.7 add Python connector, data pool, customize main template and optimize development interface
216 | v3. 9.9.10 you can write CSS in div settings, add built-in dynamic tables, optimize layout support, and add config files
217 | v3. 9.9.12 optimize background data processing performance and jupyter experience
218 | v3. 9.9.16 add template editing function, add embedded report token mode, optimize editing interface and connection pool selection
219 | v3. 9.9.18 fix Vue bug, add elementui support and optimize datav development experience
220 | v3. 9.9.24 add editing function in the template development interface, automatically create data set, add data set test function, and upgrade echarts to 5.2
221 | v3. 9.9.25 add the prompt of unsaved changes, select and execute the dataset, and optimize the repeated submission of the saved template
222 | v3. 9.9.28 admin adaptation UI, resource file optimization
223 | v3. 9.9.33 add file upload function, add basesimple template and optimize development menu
224 | v4. 0
225 | -Cancel the bootstrap layout, adopt a new 24 grid or 12 grid layout, smaller file references and more convenient functions
226 | -Add drag and drop layout without losing the free development mode, which can be mixed
227 | -Add HTML component to distinguish it from dataset component
228 | -A more user-friendly home page and a new UI experience automatically identify users and developers
229 | -Optimize the development menu and enhance the user development experience
230 | -The front-end development interface and background data set synchronization are completed
231 | v5. 0
232 | -Newly developed UI experience and optimized drag and drop
233 | -Remove the bootstrap completely and reduce the installation package
234 | -All 40 graphic themes are open
235 | -New custom theme development function and new color palette
236 | -Add embedded and pop-up window development switch
237 | -Interface of linkage drilling
238 | -Graphic editor optimization adds one click Import of common graphics
239 | -Add template T3 compatible 3.0 Report
240 | -Add data set development to set graphic linkage
241 | -Add data set development to set cache and timing
242 | -Adding data set development can be converted into shared data set with one click
243 | v5. one
244 | -Add offline initialization dB and add dataset external service API configuration
245 | -Optimize static resources and add VIP template function
246 | -Add one key to scroll tables and pictures, rotate graphics, and add one key to achieve border effect
247 | -The enhanced experience removes the default loading of map JS, and all unusual JS are changed to dynamic loading
248 | ```
249 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | [Wiki](https://gitee.com/smartchart/smartchart/wikis/pages) \|
3 | [Community](https://www.smartchart.cn/) \|
4 | [Sponsors](https://www.smartchart.cn/) \|
5 | [GitHub](https://github.com/JohnYan2017/SmartCharts) \|
6 | [Gitee](https://gitee.com/smartchart/smartchart)
7 |
8 |
9 |
10 |
11 |
12 | A Future Platform That Connect Data to Insight
13 |
14 |
15 | https://www.smartchart.cn
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | -------------------------------------------------------------------------------
40 |
41 | [**English Documentation**](README-EN.md)
42 |
43 | -------------------------------------------------------------------------------
44 |
45 | ### 简介
46 | - 数据可视化,大屏,移动报表,数据中台,WEB应用的微代码开发平台
47 | - 简单, 敏捷, 高效, 通用化, 高度可定制化, 让你的项目瞬间档次提升
48 | - 完全真正打通前后端, 支持图形数据联动,筛选,钻取, 支持几乎常见的所有数据库
49 | - 积木式拖拽开发模式, 开箱即用, 安装简单, 依赖少, 适应各种平台
50 | - 支持中国式报表类EXCEL开发, 支持3D场景大屏
51 | - 内存加速技术, 让你的数据快人一步, 大幅减少数据库压力
52 | - 真所见即所得的拖拽开发模式, 且无需在画布上设计
53 | - 支持个性化的数据新增导入填报更新,文件上传等需求,开发企业管理型业务系统
54 | - 数据集即服务, 采用低代码快速实现数据服务API开发
55 | - 支持仪表盘备份恢复快照等, 满足企业级的版本控制开发上线流程要求
56 | - 支持用户/组功能权限控制,支持行级别/字段级别数据权限控制
57 | - 支持Django插件方式应用,可无限扩展,打造你专属的个性化应用
58 | - 支持在Jupyter notebook中的数据开发方式应用
59 | - 支持集成DeepSeek,chatGPT,文心一言,通义,百练智能体等大模型AI生成
60 | - 支持开发个性化的数据新增导入填报更新,文件上传等需求
61 | - 没有重复学习成本, 高度可定制化, 注意是高度可定制化!!
62 |
63 | 具体功能预览可观看视屏了解,
64 | - [6.0介绍视频](https://www.bilibili.com/video/BV1Md4y1h7iq)
65 | - [进阶开发视频](https://www.bilibili.com/video/BV15S421o7kx)
66 | - [7.0CRUD视频](https://www.bilibili.com/video/BV17rAweeETt)
67 | - [7.0CRUD数据视频](https://www.toutiao.com/video/7500047932272624163/)
68 | - [7.0AI智能体视频](https://www.toutiao.com/video/7500035210919281163/)
69 |
70 |
71 | 
72 | 
73 | 
74 |
75 |
76 | ### 快速开始
77 | - 请务必先阅读 [SmartChart入门文档入口](https://help.smartchart.cn/ "SmartChart入门")
78 | - 请务必先阅读 [SmartChart入门文档入口](https://help.smartchart.cn/ "SmartChart入门")
79 | - 请务必先阅读 [SmartChart入门文档入口](https://help.smartchart.cn/ "SmartChart入门")
80 |
81 |
82 | ### 与传统BI的区别
83 | - 传统BI面向非技术人员(但实际大部分场景下是技术人员在用, 错配较大), 更注重于开发的过程无代码化,所以最终实现的可视化效果较差, 可定制化程度低, 访问速度慢,对硬件要求高, 应用场景局限性比较大
84 | - smartchart是真正意义上面向技术人员的可视化产品, 更注重于最终效果, 采用的是低代码技术, 对技术人员更友好, 可定制化高, 可视化效果更好, 访问速度快, 更灵活,对硬件要求低, 应用范围广
85 | - 如果你的数据/报表开发人员主要是在技术部门, 那么smartchart是最优选择, 如果是业务部门用于自助分析, 建意采购传统BI或者我们的数据问答产品
86 |
87 | ### 与大屏设计器的区别
88 | - 大屏设计器只关注内置的一些边框, 图形效果等前端效果, 不注重于数据的开发, 华而不实
89 | - smartchart是真正意义上的全场景解决方案, 从数据开发, 可视化, 到版本上线管理, 嵌入等工程化场景全覆盖
90 |
91 | ### 与数据中台的区别
92 | - smartchart是数据中台的一部分,适合任意数据平台产品, 如果你已有数据中台, 可以用之来补充数据服务, 数据应用能力
93 | - 如果你的数据管理平台是基于django开发, 那么smartchart可能是你唯一的最佳选择
94 | - 如果你没有数据中台, 那么也可以在后期引入我们的数据中台, 可以保障与smartchart无缝衔接
95 |
96 | ### 与低代码系统开发平台区别
97 | - 传统的低代码系统面向非技术人员,以流程为驱动
98 | - smartchart基于开发者真实需求,开放度更高,基于数据运营的要求,以数据驱动
99 |
100 | ### 与AI Agent区别
101 | - 常见的Agent要么是一个python库,要么是封装得不够录活的全图形界面
102 | - smartchart基于自身强大的数据连接与可视化能力,可以实现低代码的AI agent应用
103 |
104 |
105 | ### 联系我们与帮助
106 | 你也可以加入QQ群进行普通问题讨论
107 | **QQ群: 476715246 暗号: smartchart**
108 |
109 | ### 合作微信
110 | 加微信请备注公司名手机号码
111 |
112 |
113 |
114 | -------------------------------------------------------------------------------
115 |
116 | #### Change Log
117 | ```shell script
118 | 2020/12/14 静态资源本地化
119 | v3.9.8.2 支持所有常见数据库,支持VUE,DATAV
120 | v3.9.8.7 支持Jupyter,支持一键分享和应用dashboard模板
121 | v3.9.8.9 帐号绑定功能上线
122 | v3.9.8.10 用户自定义图形管理上线
123 | v3.9.8.17 支持最新的Echarts5.0, 优化加载速度
124 | v3.9.8.20 用户自定义图形管理功能升级
125 | v3.9.8.23 Echarts升级5.0.1, 支持一个数据集对应多查询, 资源本地化
126 | v3.9.9.0 print函数优化,新增数据透视函数,个人静态资源路径显示, db2支持
127 | v3.9.9.1 开发界面美化
128 | v3.9.9.5 开发界面优化,fix定时刷新BUG,新增批量数据集删除
129 | v3.9.9.7 增加python连接器,数据池,自定义主模板,优化开发界面
130 | v3.9.9.10 DIV设定中可以写css,新增内置动态表格,优化布局支持,增加config文件
131 | v3.9.9.12 优化后台数据处理性能,Jupyter使用体验
132 | v3.9.9.16 新增模板编辑功能,增加嵌入报表TOKEN方式,优化编辑界面,优化连接池选择
133 | v3.9.9.18 修复vue bug, 增加elementUI支持, 优化DataV开发体验
134 | v3.9.9.24 模板开发界面增加编辑功能,自动建立数据集,新增数据集测试功能,Echarts升级到5.2
135 | v3.9.9.25 增加变更未保存提示,数据集选择执行,优化保存模板重复提交的问题
136 | v3.9.9.28 Admin适配UI, 资源文件优化
137 | v3.9.9.33 增加文件上传功能,增加basesimple模板,优化开发菜单
138 | v4.0
139 | - 取消boostrap布局,采用全新的24格或12格网格布局,更小的文件引用,更方便的功能
140 | - 增加拖拽布局方式,同时不损失自由开发模式, 可混合使用
141 | - 增加HTML组件区别与数据集组件
142 | - 更为用户友好的首页,全新的UI体验, 自动识别用户与开发者身份
143 | - 优化了开发菜单, 增强用户开发体验
144 | - 数据集开发界面完成数据源,后台同步, 前端同步修改
145 | v5.0
146 | - 全新开发UI体验, 优化拖拽
147 | - 完全移除boostrap, 减少安装包
148 | - 全部40个图形主题开放
149 | - 新增自定义主题开发功能,新增调色器
150 | - 新增嵌入和弹出窗口开发切换
151 | - 联动钻取界面化
152 | - 图形编辑器优化增加常用图形一键导入
153 | - 增加模板t3兼容3.0报表
154 | - 增加数据集开发可设定图形联动
155 | - 增加数据集开发可设定缓存及定时
156 | - 增加数据集开发可一键转化为共享数据集
157 | v5.1
158 | - 新增离线初始化DB, 新增数据集对外服务api配置
159 | - 静态资源优化, 增加VIP模板功能
160 | - 增加一键实现滚动表格及图片轮播图形, 增加一键实现边框效果
161 | - 增强体验去除默认加载地图js, 所有非常用js改为动态加载
162 | v5.1.10 增加rem与px互转功能,优化模板开发体验
163 | v5.2
164 | - 优化通用数据集开发
165 | - 自由模式开发序号问题解决
166 | - 增加频幕日志打印
167 | - 增加样式可视化开发
168 | - 增加仪表盘版本控制,备份恢复
169 | - 增加仪表盘服务器之间同步
170 | - 增加资源文件上传功能
171 | - 增加对clickhouse,达梦等数据库支持
172 | - 增加JDBC连接器
173 | - Echarts升级到5.3
174 | - 首页增加主题选择
175 | - 仪表盘V,R,E增加图标防呆
176 | v5.3
177 | - 合并仪表盘上传下载到同一界面,并优化体验
178 | - 增加LineUp图形的支持
179 | - 优化模板自由开发体验, 现在拖拽后能自动同步
180 | - 增加开发过程快速备份仪表盘
181 | - 增加安全模式,在图表异常时可使用此模式进入
182 | v5.4
183 | - 增加图形管理
184 | - 增加可外部调用定时刷新数据集
185 | - 增强版本控制功能
186 | - 优化自动保存拖拽
187 | - 增加数据填报功能
188 | - 优化数据服务及嵌入认证方式
189 | v5.5
190 | - 调整模板中样式引用的顺序
191 | - 增加数据集编辑器可调整区域大小
192 | - 增加数据集编辑器查询时长显示
193 | - 增加数据集编辑器显示表格功能
194 | - 增加数据集增加历史查询结果显示与删除
195 | - 优化初始化数据集的数据源问题
196 | - 优化了一些图形端函数
197 | - 隐藏系统数据集/仪表
198 | - 增加pivot图形模板
199 | v5.6
200 | - 新增数据集懒加载功能
201 | - 新增报表嵌入传入参数id加密方案
202 | - 新增ds_setParam,ds_mapToList函数
203 | - 数据集权限与图形权限绑定
204 | - 连接池升级
205 | - 项目名显示逻辑修改
206 | - 优化加载速度
207 | - 修复filter_param位置
208 | - 修复图形最后一行注释后不显示
209 | - 修复basevue未自动引入拖拽
210 | - 修复数据集表格预览模式不超出宽度
211 | - 修复django模式下上传自定义数据源问题
212 | - 取消高级中的初始参数设定
213 | - 移除滑动条样式
214 | v5.7
215 | 优化模板中自由开发体验
216 | - 在模板中进行图形新增不再自带栅格布局
217 | - 新增插入栅格菜单
218 | - 插入拖拽或栅格现在有两种智能模式
219 | - 修改编辑器快捷键
220 | - 增加功能清空上传的文件
221 | - 增加样式列表
222 | - 增加组件列表
223 | - 增加工具菜单
224 | - 增加UI组件列表
225 | - 增加快速资源引入
226 | - 合并数据集编辑功能
227 | - 合并容器功能
228 | - 现在炫酷背景边框字体的应用更顺畅
229 | 极大的优化了图形编辑器体验
230 | - 帮助及图形商店的浏览状态将会保持
231 | - 基础图形位置现在放在了合适的地方
232 | - 增加自定义图形管理
233 | - 图形编辑器增加echarts样列
234 | - 增加ds_sort函数
235 | 大幅改善竖屏报表开发拖拽体验
236 | - 竖向可屏幕外拖拽
237 | - 带padding的容器问题
238 | 其它功能性增强
239 | - 优化非激活数据集
240 | - api服务增加了限流控制
241 | - 加入一个内置数据分页查询下载模板一键应用
242 | - 修复DIV编辑器插入不换行
243 | - 增加mongodb连接器
244 | - 增加ES连接器
245 | - 增加数据集查询数量限定设定
246 | - 现在定时刷新会保持当前的查询参数
247 | - 增加资源可上传到通用静态目录
248 | - 登录界面动画柔和化
249 | - 仪表盘备份增加interval
250 | - 修复_id问题
251 | v6.0
252 | - 新增复杂报表开发
253 | - 新增3D场景开发
254 | - 新增上线数据集零代码使用
255 | - 新增界面化高级设定
256 | - 新增背景切换
257 | - 新增移动端适配支持
258 | - 开发界面新增了隐藏容器
259 | - 通用数据集/懒加载数据集使用更顺畅
260 | - 新增apiconfig配制界面化
261 | - 开发工具栏更清晰顺畅
262 | - 数据集开发新增表及字段联想
263 | - 新增Prometheus/influxdb连接
264 | - 数据集序号自动化
265 | - 全面优化了数据集数据预览
266 | - 全面优化了拖拽体验
267 | - 全面优化了开发界面
268 | - 移除了body设定
269 | v6.1
270 | - 增加ds_loadpivot透视表组件
271 | - 增加smtmail连接
272 | - 增加仪表盘数据集模式
273 | - 增强仪表盘开发页编辑框拖拽体验
274 | - 数据集开发增加表,字段联想功能
275 | - 升级并轻量化elementui
276 | - 优化图形配置提示
277 | - 优化数据集预览表格
278 | - 优化图标
279 | v6.2
280 | - 新增数据集预览时下载功能
281 | - 新增复杂报表填充方向及格式功能
282 | - 新增仪表盘缩略图设定
283 | - 优化sql执行日志
284 | - 优化sql commit
285 | - 修复登录后仪表盘url无参数
286 | v6.4
287 | - 修复数据集模式下, 序号不连续可能导致的问题
288 | - 修复定时刷新在联动时的问题
289 | - 修复数据集恢复图形问题
290 | - 修复在模板中序号不连续时编辑的bug
291 | - 修复复制数据集的图形问题
292 | - 优化通数据集开发体验
293 | - 优化刷新resize
294 | - 取消图形中需写chartpush
295 | - 优化拖拽性能
296 | - 增加集成chatGPT, 文心一言等大模型AI生成
297 | v6.5
298 | - 拖拽布局增加网格辅助定位
299 | - 数据集开发增加横向区域调整
300 | - 编辑器增加编辑器菜单并移除编辑器主题选择
301 | - API连接器增加timeout设定
302 | - 移除不必要的处理,优化查询性能
303 | - 修复图形ES6代码压缩后异常
304 | - 增加数据源图标显示
305 | - 增强ds_df的功能,可将ds数据转为df
306 | v6.5.5
307 | - 数据集开发增加库清单点击下钻到表清单
308 | - 数据集开发新增获取执行语句
309 | - 优化图形调试print的显示逻辑
310 | - 优化图形数据处理参考显示
311 | - 增加ds_filter函数
312 | - 免费版现在支持首页报表清单
313 | v6.6.8
314 | - 大模型增强
315 | v6.6.9
316 | - 大模型与企业知识库集成
317 | - 向量化数据库客户端
318 | v6.8
319 | - 升级echarts到5.5
320 | - 增加简易滚动表格,增强ds_pivot及更多处理函数
321 | - 增加飞书表格, 企微消息连接器
322 | - 向量客户端优化
323 | - 优化数据开发相关问题
324 | v7.0
325 | - 强大的CRUD模板化开发功能
326 | - 全面优化首页体验
327 | - 增加资源管理功能
328 | - 增加报表拖拽分组
329 | - 增加报表导入导出功能
330 | - 增强AI大模型支持,智能体开发
331 | - 增加对阿里百炼智能体支持
332 | - 增加二维生成,打印等多种函数功能
333 | - 数据服务增强,支接数据更新,接收等
334 | - excel数据导入导出无代码化
335 | ```
336 |
337 |
338 |
--------------------------------------------------------------------------------
/db.sqlite3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohnYan2017/SmartCharts/e7756cac37633d8532bec64785b8d26f9dafde65/db.sqlite3
--------------------------------------------------------------------------------
/deploy/nginx.conf:
--------------------------------------------------------------------------------
1 | # 启动进程,通常设置成和cpu的数量相等,我这里就启动2个
2 | worker_processes 2;
3 |
4 | events {
5 | worker_connections 1024;
6 | }
7 |
8 | http {
9 | log_format main '$remote_addr - $remote_user [$time_local] "$request" '
10 | '$status $body_bytes_sent "$http_referer" '
11 | '"$http_user_agent" "$http_x_forwarded_for"';
12 |
13 | access_log /data/smartchart/smartcharts/log/Nginx_access_main.log main;
14 |
15 | sendfile on;
16 | tcp_nodelay on;
17 | keepalive_timeout 65;
18 | types_hash_max_size 2048;
19 |
20 | include mime.types;
21 | default_type application/octet-stream;
22 |
23 |
24 | server {
25 | #这里是访问时用到的端口
26 | listen 80;
27 | server_name 0.0.0.0;
28 |
29 |
30 | charset UTF-8;
31 | #这块存日志文件
32 | access_log /data/smartchart/smartcharts/log/Nginx_access.log;
33 | error_log /data/smartchart/smartcharts/log/Nginx_error.log;
34 |
35 | client_max_body_size 75M;
36 | location /static/ {
37 | alias /data/smartchart/smartcharts/static/;
38 | }
39 | location /media/ {
40 | alias /data/smartchart/smartcharts/media/;
41 | }
42 | location / {
43 | include uwsgi_params;
44 | #同uwsgi内容
45 | uwsgi_pass 127.0.0.1:8000;
46 | }
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/deploy/restart.sh:
--------------------------------------------------------------------------------
1 | source /data/smartchart/smartcharts/venv
2 | uwsgi --reload /data/smartchart/smartcharts/uwsgi.pid
--------------------------------------------------------------------------------
/deploy/smartchart.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Smartchart
3 | After=syslog.target
4 | [Install]
5 | WantedBy=multi-user.target
6 | [Service]
7 | WorkingDirectory=/data/smartchart/smartcharts
8 | ExecStart=uwsgi --ini /data/smartchart/smartcharts/deploy/uwsgi.ini
9 | User=smartchart
10 | Restart=always
11 | StandardError=syslog
--------------------------------------------------------------------------------
/deploy/start.sh:
--------------------------------------------------------------------------------
1 | source /data/smartchart/smartcharts/venv
2 | uwsgi --ini uwsgi.ini
--------------------------------------------------------------------------------
/deploy/stop.sh:
--------------------------------------------------------------------------------
1 | source /data/smartchart/smartcharts/venv
2 | uwsgi --stop /data/smartchart/smartcharts/uwsgi.pid
--------------------------------------------------------------------------------
/deploy/uwsgi.ini:
--------------------------------------------------------------------------------
1 | [uwsgi]
2 | #使用ngnix使用socket, 只使用uwsgi使用http
3 | socket = 127.0.0.1:8000
4 | #http = 0.0.0.0:8000
5 | chdir = /data/smartchart/smartcharts
6 | virtualenv = /data/smartchart/smartcharts/venv
7 | wsgi-file = /data/smartchart/smartcharts/smartcharts/wsgi.py
8 | processes = 4
9 | threads = 2
10 | master = True
11 | pidfile = /data/smartchart/smartcharts/uwsgi.pid
12 | daemonize = /data/smartchart/smartcharts/log/uwsgi.log
13 | disable-logging = true
14 | static-map=/static/=/data/smartchart/smartcharts/static
15 |
--------------------------------------------------------------------------------
/deploy/uwsgi_params:
--------------------------------------------------------------------------------
1 | uwsgi_param QUERY_STRING $query_string;
2 | uwsgi_param REQUEST_METHOD $request_method;
3 | uwsgi_param CONTENT_TYPE $content_type;
4 | uwsgi_param CONTENT_LENGTH $content_length;
5 |
6 | uwsgi_param REQUEST_URI $request_uri;
7 | uwsgi_param PATH_INFO $document_uri;
8 | uwsgi_param DOCUMENT_ROOT $document_root;
9 | uwsgi_param SERVER_PROTOCOL $server_protocol;
10 | uwsgi_param REQUEST_SCHEME $scheme;
11 | uwsgi_param HTTPS $https if_not_empty;
12 |
13 | uwsgi_param REMOTE_ADDR $remote_addr;
14 | uwsgi_param REMOTE_PORT $remote_port;
15 | uwsgi_param SERVER_PORT $server_port;
16 | uwsgi_param SERVER_NAME $server_name;
--------------------------------------------------------------------------------
/log/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohnYan2017/SmartCharts/e7756cac37633d8532bec64785b8d26f9dafde65/log/.keep
--------------------------------------------------------------------------------
/manage.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """Django's command-line utility for administrative tasks."""
3 | import os
4 | import sys
5 |
6 |
7 | def main():
8 | try:
9 | from smart_chart.echart import get_version
10 | except Exception as e:
11 | print('you need pip install smartchart')
12 | return
13 | SMARTCHART = f'''======powered by smartchart version: {get_version()}====='''
14 | """Run administrative tasks."""
15 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'smartcharts.settings')
16 | try:
17 | from django.core.management import execute_from_command_line
18 | except ImportError as exc:
19 | raise ImportError(
20 | "Couldn't import Django. Are you sure it's installed and "
21 | "available on your PYTHONPATH environment variable? Did you "
22 | "forget to activate a virtual environment?"
23 | ) from exc
24 | print(SMARTCHART)
25 | execute_from_command_line(sys.argv)
26 |
27 |
28 | if __name__ == '__main__':
29 | main()
30 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | smartchart
--------------------------------------------------------------------------------
/smartcharts/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohnYan2017/SmartCharts/e7756cac37633d8532bec64785b8d26f9dafde65/smartcharts/__init__.py
--------------------------------------------------------------------------------
/smartcharts/asgi.py:
--------------------------------------------------------------------------------
1 | """
2 | ASGI config for smartcharts project.
3 |
4 | It exposes the ASGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.asgi import get_asgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'smartcharts.settings')
15 |
16 | application = get_asgi_application()
17 |
--------------------------------------------------------------------------------
/smartcharts/settings.py:
--------------------------------------------------------------------------------
1 | """
2 | Django settings for smartcharts project.
3 |
4 | Generated by 'django-admin startproject' using Django 3.1.3.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.1/topics/settings/
8 |
9 | For the full list of settings and their values, see
10 | https://docs.djangoproject.com/en/3.1/ref/settings/
11 | """
12 |
13 | from pathlib import Path
14 | import os
15 |
16 |
17 | # Build paths inside the project like this: BASE_DIR / 'subdir'.
18 | BASE_DIR = Path(__file__).resolve().parent.parent
19 |
20 | # Quick-start development settings - unsuitable for production
21 | # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
22 |
23 | # SECURITY WARNING: keep the secret key used in production secret!
24 | SECRET_KEY = '#$lc1_v_)tof%192ew9fww#o+1#d1qu84d@c11y*sgjqkkl*&b'
25 |
26 | # SECURITY WARNING: don't run with debug turned on in production!
27 | DEBUG = True
28 |
29 | ALLOWED_HOSTS = ['*']
30 |
31 | # SmartChart setting
32 | # SMART_KEY=
33 | UPLOAD_PATH = BASE_DIR
34 |
35 | # Application definition
36 |
37 | INSTALLED_APPS = [
38 | 'smart_chart.smartui',
39 | 'django.contrib.admin',
40 | 'django.contrib.auth',
41 | 'django.contrib.contenttypes',
42 | 'django.contrib.sessions',
43 | 'django.contrib.messages',
44 | 'django.contrib.staticfiles',
45 | 'smart_chart.echart'
46 | ]
47 |
48 | MIDDLEWARE = [
49 | 'django.middleware.security.SecurityMiddleware',
50 | 'django.contrib.sessions.middleware.SessionMiddleware',
51 | 'django.middleware.common.CommonMiddleware',
52 | 'django.middleware.csrf.CsrfViewMiddleware',
53 | 'django.contrib.auth.middleware.AuthenticationMiddleware',
54 | 'django.contrib.messages.middleware.MessageMiddleware',
55 | # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
56 | ]
57 |
58 | ROOT_URLCONF = 'smartcharts.urls'
59 |
60 | # 请参考此处的template设定
61 | TEMPLATES = [
62 | {
63 | 'BACKEND': 'django.template.backends.django.DjangoTemplates',
64 | 'DIRS': [os.path.join(BASE_DIR, 'templates')],
65 | 'APP_DIRS': True,
66 | 'OPTIONS': {
67 | 'context_processors': [
68 | 'django.template.context_processors.debug',
69 | 'django.template.context_processors.request',
70 | 'django.contrib.auth.context_processors.auth',
71 | 'django.contrib.messages.context_processors.messages',
72 | ],
73 | },
74 | },
75 | ]
76 |
77 | WSGI_APPLICATION = 'smartcharts.wsgi.application'
78 |
79 | # Database
80 | # https://docs.djangoproject.com/en/3.1/ref/settings/#databases
81 |
82 | DATABASES = {
83 | 'default': {
84 | 'ENGINE': 'django.db.backends.sqlite3',
85 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
86 | },
87 | }
88 |
89 | # 如果需要使用mysql数据库, 注释上面的sqlite, 启用下面的配置
90 | # import pymysql
91 | # pymysql.install_as_MySQLdb()
92 | # DATABASES = {
93 | # 'default': {
94 | # 'ENGINE': 'django.db.backends.mysql', # mysql数据库引擎
95 | # 'NAME': 'xx', # 数据库名
96 | # 'USER': 'xxx', # 用户名
97 | # 'PASSWORD': 'xxxxxx', # 密码
98 | # 'HOST': 'localhost', # mysql服务所在的主机ip
99 | # 'PORT': '3306', # mysql服务端口
100 | # },
101 | # }
102 |
103 | # Password validation
104 | # https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
105 |
106 | AUTH_PASSWORD_VALIDATORS = [
107 | {
108 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
109 | },
110 | {
111 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
112 | },
113 | {
114 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
115 | },
116 | {
117 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
118 | },
119 | ]
120 |
121 | # Internationalization
122 | # https://docs.djangoproject.com/en/3.1/topics/i18n/
123 |
124 | LANGUAGE_CODE = 'zh-hans'
125 | TIME_ZONE = 'Asia/Shanghai'
126 | USE_I18N = True
127 | USE_L10N = True
128 | USE_TZ = False
129 |
130 | # Static files (CSS, JavaScript, Images)
131 | # https://docs.djangoproject.com/en/3.1/howto/static-files/
132 | # 开启STATIC_ROOT后执行: python manage.py collectstatic
133 | # 执行完后注释掉
134 | # STATIC_ROOT = os.path.join(BASE_DIR, "static")
135 | STATIC_URL = '/static/'
136 | STATICFILES_DIRS = [
137 | os.path.join(BASE_DIR, 'static'),
138 | ]
139 |
140 | DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
141 | SECURE_CROSS_ORIGIN_OPENER_POLICY = None
--------------------------------------------------------------------------------
/smartcharts/urls.py:
--------------------------------------------------------------------------------
1 | """smartcharts URL Configuration
2 |
3 | The `urlpatterns` list routes URLs to views. For more information please see:
4 | https://docs.djangoproject.com/en/3.1/topics/http/urls/
5 | Examples:
6 | Function views
7 | 1. Add an import: from my_app import views
8 | 2. Add a URL to urlpatterns: path('', views.home, name='home')
9 | Class-based views
10 | 1. Add an import: from other_app.views import Home
11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
12 | Including another URLconf
13 | 1. Import the include() function: from django.urls import include, path
14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
15 | """
16 | from django.contrib import admin
17 | from django.urls import path
18 | from django.conf.urls import include
19 | from django.views.generic import RedirectView
20 |
21 | urlpatterns = [
22 | path('admin/', admin.site.urls),
23 | path('echart/', include('smart_chart.echart.urls')),
24 | path('', RedirectView.as_view(url='echart/index/')), # 基于你的项目定义报表首页路由
25 | ]
26 |
--------------------------------------------------------------------------------
/smartcharts/wsgi.py:
--------------------------------------------------------------------------------
1 | """
2 | WSGI config for smartcharts project.
3 |
4 | It exposes the WSGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.wsgi import get_wsgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'smartcharts.settings')
15 |
16 | application = get_wsgi_application()
17 |
--------------------------------------------------------------------------------
/static/custom/css/common0.css:
--------------------------------------------------------------------------------
1 | @charset "utf-8";
2 | /* CSS Document */
3 | *{
4 | -webkit-box-sizing: border-box;
5 | -moz-box-sizing: border-box;
6 | box-sizing: border-box}
7 | *,body{padding:0px; margin:0px;color: #222;font-family: "微软雅黑";}
8 | @font-face{font-family:electronicFont;src:url(../font/DS-DIGIT.TTF)}
9 | body{ background:#000d4a url(../images/bg.jpg) center top; background-size:cover;color:#666;font-size: 1rem;}
10 | li{ list-style-type:none;}
11 | table{}
12 | i{ margin:0px; padding:0px; text-indent:0px;}
13 | img{ border:none; max-width: 100%;}
14 | a{ text-decoration:none; color:#399bff;}
15 | a.active,a:focus{ outline:none!important; text-decoration:none;}
16 | ol,ul,p,h1,h2,h3,h4,h5,h6{ padding:0; margin:0}
17 | a:hover{ color:#06c; text-decoration: none!important}
18 |
19 |
20 | .clearfix:after, .clearfix:before {
21 | display: table;
22 | content: " "
23 | }
24 | .clearfix:after {
25 | clear: both
26 | }
27 | .pulll_left{float:left;}
28 | .pulll_right{float:right;}
29 | .canvas{position: absolute; width:100%; left: 0; top: 0; height: 99%; z-index: 1;}
30 |
31 | .allnav{height: calc(100% - 30px);}
32 | .loading{position:fixed; left:0; top:0; font-size:18px; z-index:100000000;width:100%; height:100%; background:#1a1a1c; text-align:center;}
33 | .loadbox{position:absolute; width:160px;height:150px; color: #aaa; left:50%; top:50%; margin-top:-100px; margin-left:-75px;}
34 | .loadbox img{ margin:10px auto; display:block; width:40px;}
35 |
36 | .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; }
37 |
38 | .head{ height:5.5rem; background: url(../images/head_bg.png) no-repeat center center; background-size: 100% 100%; position: relative; z-index: 100;}
39 | .head h1{ color:#fff; text-align: center; font-size: 3.5rem; line-height:.8rem;}
40 | .head h1 img{ width:1.5rem; display: inline-block; vertical-align: middle; margin-right: .2rem}
41 | .weather{ position:absolute; right:.3rem; top:0; line-height: .75rem;}
42 | .weather img{ width:.37rem; display: inline-block; vertical-align: middle;}
43 | .weather span{color:rgba(255,255,255,.7); font-size: .18rem; padding-right: .1rem;}
44 | .mainbox{ padding:.1rem .1rem 0rem .1rem;}
45 | .mainbox>ul{}
46 | .mainbox>ul>li{ float: left; padding: 0 .1rem}
47 |
48 | .mainbox>ul>li{ width: 30%}
49 | .mainbox>ul>li:nth-child(2){ width: 40%;padding: 0}
50 |
51 | .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;}
52 | .boxall:before,
53 | .boxall:after{ position:absolute; width: 1rem; height: 1rem; content: ""; border-top: 2px solid #02a6b5; top: 0;}
54 | .boxall:before,.boxfoot:before{border-left: 2px solid #02a6b5;left: 0;}
55 | .boxall:after,.boxfoot:after{border-right: 2px solid #02a6b5; right: 0;}
56 | .alltitle{ font-size:1.6rem; color:#fff; text-align: center; line-height: .5rem;}
57 |
58 | .boxfoot{ position:absolute; bottom: 0; width: 100%; left: 0;}
59 | .boxfoot:before,
60 | .boxfoot:after{ position:absolute; width: 1rem; height: 1rem; content: "";border-bottom: 2px solid #02a6b5; bottom: 0;}
61 |
62 | .bar{background:rgba(101,132,226,.1); padding: .15rem;}
63 | .barbox li,.barbox2 li{ width:50%; text-align: center; position: relative; z-index: 100;}
64 | .barbox:before,
65 | .barbox:after{ position:absolute; width: .3rem; height: .1rem; content: ""; }
66 | .barbox:before{border-left: 2px solid #02a6b5;left: 0;border-top: 2px solid #02a6b5; }
67 | .barbox:after{border-right: 2px solid #02a6b5; right: 0; bottom: 0;border-bottom: 2px solid #02a6b5; }
68 |
69 | .barbox li:first-child:before{ position:absolute; content: ""; height:50%; width: 1px; background: rgba(255,255,255,.2); right: 0; top: 25%;}
70 |
71 | .barbox{ border: 1px solid rgba(25,186,139,.17); position: relative;}
72 | .barbox li{ font-size: .7rem; color: #ffeb7b; padding: .05rem 0; font-family:electronicFont; font-weight: bold;}
73 | .barbox2 li{ font-size: .19rem; color:rgba(255,255,255,.7); padding-top: .1rem;}
74 |
75 | .map{ position:relative; height: 7.2rem; z-index: 9;}
76 | .map4{ width: 200%; height:7rem; position: relative; left: -50%; top: 4%; margin-top: .2rem; z-index: 5;}
77 | .map1,.map2,.map3{ position:absolute; opacity: .5}
78 | .map1{ width:6.43rem; z-index: 2;top:.45rem; left: .7rem; animation: myfirst2 15s infinite linear;}
79 | .map2{ width:5.66rem; top:.85rem; left:1.2rem; z-index: 3; opacity: 0.2; animation: myfirst 10s infinite linear;}
80 | .map3{ width:5.18rem; top:1.07rem; left: 1.4rem; z-index: 1;}
81 |
82 | .tabs { text-align: center; padding: .1rem 0 0 0;}
83 | .tabs a {
84 | position: relative;
85 | display: inline-block;
86 | margin-left: 1px;
87 | padding:.05rem .2rem;
88 | color: #898989;
89 | transition: all .3s ease-out 0s;
90 | font-size: 14px;
91 | }
92 | .tabs li{ display:inline-block;}
93 | .tabs a:after {
94 | position: absolute;
95 | width: 1px;
96 | height: 10px;
97 | background-color: rgba(255,255,255,.1);
98 | content: '';
99 | margin-left:0; right:-1px; margin-top: 7px;
100 | }
101 | .tabs li a.active {border: 1px solid rgba(25,186,139,.17); background: rgba(255,255,255,.05); color:#fff;}
102 |
103 | .tit02{ text-align:center; margin: .1rem 0; position: relative}
104 | .tit02 span{border: 1px solid rgba(25,186,139,.17); letter-spacing: 2px; padding: .01rem .2rem; background: rgba(255,255,255,.05); font-size: .18rem; color: #49bcf7;}
105 | .tit02:before,.tit02:after{ position:absolute; width:26%; height: 1px;background: rgba(25,186,139,.2); content: ""; top: .12rem;}
106 | .tit02:after{ right:0;}
107 | .tit02:before{ left:0;}
108 |
109 | .wrap{ height:2.54rem; overflow: hidden;}
110 | .wrap li{ line-height:.42rem; height:.42rem; font-size: .18rem; text-indent: .24rem; margin-bottom: .1rem; }
111 | .wrap li p{border: 1px solid rgba(25,186,139,.17);color: rgba(255,255,255,.6); }
112 | .sy{ float:left; width: 33%; height:95%; margin-top: .25rem;}
113 |
114 |
115 | .adduser{ height:1.5rem; overflow: hidden;}
116 | .adduser li{height:.5rem;}
117 | .adduser img{ width: .40rem; border-radius: .5rem; margin-right: .1rem; display: inline-block; vertical-align: middle;}
118 | .adduser span{ line-height:.5rem; font-size: .18rem;color: rgba(255,255,255,.6); }
119 |
120 | .sycm ul{ margin-left:-.5rem;margin-right:-.5rem; padding: .16rem 0;}
121 | .sycm li{ float: left; width: 33.33%; text-align: center; position: relative}
122 | .sycm li:before{ position:absolute; content: ""; height:30%; width: 1px; background: rgba(255,255,255,.1); right: 0; top: 15%;}
123 | .sycm li:last-child:before{ width: 0;}
124 |
125 | .sycm li h2{ font-size:.3rem; color: #c5ccff;}
126 | .sycm li span{ font-size:.18rem; color: #fff; opacity: .5;}
127 |
128 | @keyframes myfirst2
129 | {
130 | from {transform: rotate(0deg);}
131 | to {transform: rotate(359deg);}
132 | }
133 |
134 | @keyframes myfirst
135 | {
136 | from {transform: rotate(0deg);}
137 | to {transform: rotate(-359deg);}
138 | }
139 |
140 |
141 | /*Plugin CSS*/
142 | .str_wrap {
143 | overflow:hidden;
144 | width:100%;
145 | position:relative;
146 | -moz-user-select: none;
147 | -khtml-user-select: none;
148 | user-select: none;
149 | white-space:nowrap;
150 | }
151 |
152 |
153 | .str_move {
154 | white-space:nowrap;
155 | position:absolute;
156 | top:0;
157 | left:0;
158 | cursor:move;
159 | }
160 | .str_move_clone {
161 | display:inline-block;
162 | vertical-align:top;
163 | position:absolute;
164 | left:100%;
165 | top:0;
166 | }
167 | .str_vertical .str_move_clone {
168 | left:0;
169 | top:100%;
170 | }
171 | .str_down .str_move_clone {
172 | left:0;
173 | bottom:100%;
174 | }
175 | .str_vertical .str_move,
176 | .str_down .str_move {
177 | white-space:normal;
178 | width:100%;
179 | }
180 | .str_static .str_move,
181 | .no_drag .str_move,
182 | .noStop .str_move{
183 | cursor:inherit;
184 | }
185 | .str_wrap img {
186 | max-width:none !important;
187 | }
188 |
--------------------------------------------------------------------------------
/static/custom/font/DS-DIGIT.TTF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohnYan2017/SmartCharts/e7756cac37633d8532bec64785b8d26f9dafde65/static/custom/font/DS-DIGIT.TTF
--------------------------------------------------------------------------------
/static/custom/images/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohnYan2017/SmartCharts/e7756cac37633d8532bec64785b8d26f9dafde65/static/custom/images/bg.jpg
--------------------------------------------------------------------------------
/static/custom/images/head_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohnYan2017/SmartCharts/e7756cac37633d8532bec64785b8d26f9dafde65/static/custom/images/head_bg.png
--------------------------------------------------------------------------------
/static/custom/images/jt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohnYan2017/SmartCharts/e7756cac37633d8532bec64785b8d26f9dafde65/static/custom/images/jt.png
--------------------------------------------------------------------------------
/static/custom/images/lbx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohnYan2017/SmartCharts/e7756cac37633d8532bec64785b8d26f9dafde65/static/custom/images/lbx.png
--------------------------------------------------------------------------------
/static/custom/images/line.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohnYan2017/SmartCharts/e7756cac37633d8532bec64785b8d26f9dafde65/static/custom/images/line.png
--------------------------------------------------------------------------------
/static/custom/images/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohnYan2017/SmartCharts/e7756cac37633d8532bec64785b8d26f9dafde65/static/custom/images/loading.gif
--------------------------------------------------------------------------------
/static/custom/images/map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohnYan2017/SmartCharts/e7756cac37633d8532bec64785b8d26f9dafde65/static/custom/images/map.png
--------------------------------------------------------------------------------
/static/custom/js/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | www.smartchart.cn
4 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
356 |
--------------------------------------------------------------------------------
/templates/diy/common.html:
--------------------------------------------------------------------------------
1 | {% extends "echart/base.html" %}{% block head %}
2 |
4 |
5 |
15 | {% endblock %}{% block body %}
16 |
17 |
18 | {% for div in div_list %}{{div}}{% endfor %}
19 |
20 |
21 |
22 |
23 | {% endblock %}{% block javascript %}
24 |
25 |
33 | {% endblock %}{% block footer %}{% endblock %}
--------------------------------------------------------------------------------