├── .gitattributes ├── wallpaper.jpg ├── src └── main.ts ├── tsconfig.json ├── gulpfile.js ├── echarts ├── main.js └── echarts-liquidfill.min.js ├── registry.json ├── package.json ├── LICENSE ├── readme.md ├── index.html └── changelog.md /.gitattributes: -------------------------------------------------------------------------------- 1 | *.html linguist-language=JavaScript -------------------------------------------------------------------------------- /wallpaper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyecharts/jupyter-echarts/HEAD/wallpaper.jpg -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | var version = '1.4.0'; 2 | 3 | export function load_ipython_extension() { 4 | console.log("jupyter-echarts " + version + " (echarts 4.0.4) has been loaded"); 5 | } 6 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "src/main.ts" 4 | ], 5 | "compilerOptions": { 6 | "noImplicitAny": true, 7 | "target": "es5", 8 | "module": "amd" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | 3 | // all gulp tasks are located in the ./build/tasks directory 4 | // gulp configuration is in files in ./build directory 5 | require('require-dir')('build/tasks'); 6 | 7 | const TASKS = [ 8 | "configuration", 9 | "main" 10 | ]; 11 | 12 | gulp.task("default", TASKS); 13 | -------------------------------------------------------------------------------- /echarts/main.js: -------------------------------------------------------------------------------- 1 | define(["require", "exports"], function (require, exports) { 2 | "use strict"; 3 | Object.defineProperty(exports, "__esModule", { value: true }); 4 | var version = '1.4.0'; 5 | function load_ipython_extension() { 6 | console.log("jupyter-echarts " + version + " (echarts 4.0.4) has been loaded"); 7 | } 8 | exports.load_ipython_extension = load_ipython_extension; 9 | }); 10 | -------------------------------------------------------------------------------- /registry.json: -------------------------------------------------------------------------------- 1 | { 2 | "FILE_MAP": { 3 | "echarts": "echarts.min", 4 | "echartsgl": "echarts-gl.min", 5 | "liquidfill": "echarts-liquidfill.min", 6 | "wordcloud": "echarts-wordcloud.min" 7 | }, 8 | "PINYIN_MAP": {}, 9 | "JUPYTER_URL": "/nbextensions/echarts", 10 | "JUPYTER_ENTRY": "echarts/main", 11 | "JS_FOLDER": "echarts", 12 | "GITHUB_URL": "https://pyecharts.github.io/jupyter-echarts/echarts" 13 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jupyter-echarts", 3 | "version": "1.4.3", 4 | "description": "Bring echarts libraries to jupyter notebooks", 5 | "main": "main.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "C. W.", 10 | "license": "MIT", 11 | "dependencies": { 12 | "echarts": "4.2.1", 13 | "echarts-gl": "1.1.1", 14 | "echarts-liquidfill": "2.0.4", 15 | "echarts-wordcloud": "1.1.3", 16 | "gulp": "^3.8.0", 17 | "requirejs": "^2.3.4" 18 | }, 19 | "devDependencies": { 20 | "echarts-mapmaker": "^1.0.10", 21 | "gulp-minify": "^1.0.0", 22 | "gulp-rename": "^1.2.2", 23 | "gulp-typescript": "^3.2.1", 24 | "pug": "^2.0.0-rc.4", 25 | "require-dir": "^0.3.2", 26 | "typescript": "^2.4.2" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 jaska 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Jupyter-Echarts 2 | 3 | It integrates echarts to jupyter notebook as nbextensions and echarts libraries will be served from http://localhost:8888/nbextensions/echarts/. 4 | 5 | 6 | No action is required from pyecharts users. It is auto-installed in [pyecharts](https://github.com/pyecharts/pyecharts) v0.3.2+ and was embedded in [pyecharts](https://github.com/pyecharts/pyecharts) v0.1.9.5+. 7 | 8 | ## Content 9 | 10 | 1. echarts 11 | 1. echarts-gl 12 | 1. echarts-liquidfill 13 | 1. echarts-wordcloud 14 | 15 | ## Installation to jupyter 16 | 17 | ```shell 18 | jupyter nbextension install echarts 19 | jupyter nbextension enable echarts/main 20 | ``` 21 | 22 | ## Alternative usage 23 | 24 | For github hosted files, please use `https://pyecharts.github.io/jupyter-echarts/` prefix, put the folder name `echarts` and place the actual javascript file name. For example, the url for a github hosted `echarts.min.js` is https://pyecharts.github.io/jupyter-echarts/echarts/echarts.min.js. 25 | 26 | ### Example 27 | 28 | ``` 29 | 30 |
31 | 32 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 47 | 48 | 49 | ``` 50 | 51 |  52 | 53 | ## Development 54 | 55 | Please get all depdencies 56 | 57 | ```shell 58 | npm install -g gulp 59 | npm install 60 | ``` 61 | 62 | Then build 63 | 64 | ```shell 65 | gulp 66 | ``` 67 | 68 | You will then obtain all echarts libraries in echarts folder. 69 | 70 | 71 | ## License 72 | 73 | This bundling code is MIT license 74 | The echarts libraries are under BSD-3 license of Baidu Inc. 75 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
46 |