├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ └── proposal.md ├── .gitignore ├── LICENSE ├── README.md ├── README_zh.md ├── core └── datart.d.ts ├── dist ├── datart-3d-map.iife.js ├── datart-amap.iife.js ├── datart-antd-react.iife.js ├── datart-antv-box.iife.js ├── datart-antv-sankey.iife.js ├── datart-antvg2.iife.js ├── datart-babylon.iife.js ├── datart-bmap.iife.js ├── datart-chartjs.iife.js ├── datart-clustering.iife.js ├── datart-jquery.iife.js ├── datart-lottie.iife.js ├── datart-luckysheet.iife.js ├── datart-pivot.iife.js ├── datart-scroll.iife.js ├── datart-sovit-sample.iife.js ├── datart-thingjs-sample.iife.js ├── datart-threejs-bingdundun.iife.js ├── datart-threejs-industry.iife.js ├── datart-threejs-webgl.iife.js ├── datart-time.iife.js ├── datart-uml.iife.js ├── datart-vue-carousel.iife.js ├── datart-vuejs.iife.js └── datart-zrender.iife.js ├── docs └── CONTRIBUTING.md ├── index.d.ts ├── legacy-custom-chart-plugins ├── demo-custom-line-chart.js └── demo-d3js-scatter-chart.js ├── package.json ├── plugins ├── datart-3d-map │ ├── README.md │ ├── config.js │ ├── experiment-3d-map-chart.png │ ├── experiment-3d-map-chart.ts │ ├── gaode-map-logo.svg │ ├── geo-china-city-map.json │ ├── geo-china-map.json │ ├── index.js │ └── sample.json ├── datart-amap │ ├── README.md │ ├── config.js │ ├── experiment-amap-chart.ts │ ├── gaode-map-logo.svg │ ├── geo-china-city-map.json │ ├── geo-china-map.json │ └── index.js ├── datart-antd-react │ ├── README.md │ ├── antd-react-table-plugin-chart.png │ ├── experiment-antd-react-chart.js │ └── index.js ├── datart-antv-box │ ├── README.md │ ├── experiment-antv-box.js │ ├── experiment-antv-box.png │ └── index.js ├── datart-antv-sankey │ ├── README.md │ ├── experiment-antv-sankey.js │ ├── experiment-antv-sankey.png │ └── index.js ├── datart-antvg2 │ ├── README.md │ ├── experiment-antvg2-chart.js │ ├── experiment-antvg2-chart.png │ └── index.js ├── datart-babylon │ ├── README.md │ ├── babylon-js-demo.png │ ├── babylon-js-logo.svg │ ├── experiment-babylon.ts │ └── index.js ├── datart-bmap │ ├── baidu-map-logo.svg │ ├── experiment-bmap-chart.js │ └── index.js ├── datart-chartjs │ ├── README.md │ ├── chartjs-logo.svg │ ├── experiment-chartjs-sample.png │ ├── experiment-chartjs.js │ └── index.js ├── datart-clustering │ ├── README.md │ ├── experiment-cluster-chart.png │ ├── experiment-clustering-chart.js │ ├── icon.svg │ ├── index.js │ └── sample.js ├── datart-jquery │ ├── README.md │ ├── experiment-jquery-chart.js │ ├── icons8-jquery.svg │ ├── index.js │ └── jquery-vertical.svg ├── datart-lottie │ ├── README.md │ ├── data.json │ ├── experiment-lottie-chart.js │ ├── index.js │ ├── lottie-icon.svg │ └── lottie-record.gif ├── datart-luckysheet │ ├── README.md │ ├── config.js │ ├── experiment-luckysheet-demo.png │ ├── experiment-luckysheet.ts │ ├── index.js │ └── luckysheet-logo.svg ├── datart-pivot │ ├── README.md │ ├── experiment-pivot-chart.js │ └── index.js ├── datart-scroll │ ├── README.md │ ├── experiment-scroll-chart.js │ ├── index.js │ ├── scroll-table-chart.png │ └── scroll-table.svg ├── datart-sovit-sample │ ├── README.md │ ├── config.js │ ├── experiment-sovit-sample.ts │ ├── index.js │ └── sovit-logo.svg ├── datart-thingjs-sample │ ├── README.md │ ├── config.js │ ├── experiment-thingjs-sample.ts │ ├── index.js │ └── thingjs-logo.svg ├── datart-threejs-bingdundun │ ├── README.md │ ├── bigndundun.png │ ├── bingdundun.glb │ ├── experiment-threejs-bingdundun.js │ ├── index.js │ └── threejs-icon.svg ├── datart-threejs-industry │ ├── README.md │ ├── callada.gif │ ├── experiment-threejs-industry.js │ ├── index.js │ ├── sample.js │ └── threejs-icon.svg ├── datart-threejs-webgl │ ├── README.md │ ├── callada.gif │ ├── experiment-threejs-webgl.js │ ├── index.js │ └── threejs-icon.svg ├── datart-time │ ├── README.md │ ├── experiment-time-chart.js │ ├── index.js │ ├── time-series-chart.png │ └── time.svg ├── datart-uml │ ├── README.md │ ├── experiment-mermaid-uml-chart.js │ ├── experiment-uml-chart.png │ ├── icon.svg │ └── index.js ├── datart-vue-carousel │ ├── demo-vue-carousel.js │ ├── images │ │ ├── 1.jpeg │ │ ├── 2.jpeg │ │ ├── 3.jpeg │ │ ├── 4.jpeg │ │ └── 5.jpeg │ ├── index.js │ ├── vue-carousel-csv.xlsx │ ├── vue-carousel.gif │ └── vue-carousel.svg ├── datart-vuejs │ ├── README.md │ ├── experiment-vue-dynamic-chart.js │ ├── index.js │ ├── vuejs-chart.png │ └── vuejs.svg └── datart-zrender │ ├── README.md │ ├── experiment-zrender-chart.js │ ├── experiment-zrender-chart.png │ ├── index.js │ └── zrender-logo.png ├── rollup.config.js └── tsconfig.json /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/proposal.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Proposal :clap: 3 | about: Add New Proposal 4 | title: '[Proposal] ' 5 | labels: Proposal, Need Review 6 | assignees: '' 7 | 8 | --- 9 | 10 | <!-- 11 | Note: Please search to see if an issue already exists for the bug you encountered. 12 | --> 13 | 14 | ### Current Behavior: 15 | <!-- A concise description of what you're experiencing. --> 16 | 17 | ### Expected Behavior: 18 | <!-- A concise description of what you expected to happen. --> 19 | 20 | ### Steps To Reproduce: 21 | <!-- 22 | Example: steps to reproduce the behavior: 23 | 1. In this environment... 24 | 2. With this config... 25 | 3. Run '...' 26 | 4. See error... 27 | --> 28 | 29 | ### Solution 30 | 31 | ### Anything else: 32 | <!-- 33 | Links? References? Anything that will give us more context about the issue that you are encountering! 34 | --> -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | package-lock.json 8 | yarn.lock 9 | 10 | # testing 11 | /coverage 12 | 13 | # production 14 | /build 15 | /share 16 | *.zip 17 | # misc 18 | .DS_Store 19 | **/.DS_Store 20 | .datart-cli 21 | .env.local 22 | .env.development.local 23 | .env.test.local 24 | .env.production.local 25 | .vscode 26 | .idea 27 | stats.json 28 | 29 | npm-debug.log* 30 | yarn-debug.log* 31 | yarn-error.log* 32 | 33 | # vscode 34 | .vscode 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # datart-extension-charts 2 | 3 | > An extension repository to host datart plugin charts which is in **experiment state not officially**🤝. 4 | 5 | 🖖 Welcome PRs or Issues, please don't be worry about any questions 👏. 6 | 7 | ## By Consumer 8 | 9 | 1. Copy `plugins` from `dist` folder, eg. `datart-amap.iife.js` file. 10 | 2. Paste to your datart backend server folder of `custom-chart-plugins` 11 | 3. Login datart, and select a your custom plugin chart. 12 | 13 | ## By Developer 14 | 15 | > With this project, you can make yourself plugin chart and bundle with CLI. 16 | 17 | ### 1. Cook plugin chart as IIFE type (Recommended) 18 | 19 | > IIFE also called Immediately Invoked Function Expression[^1], a programming language idiom which produces a lexical scope using function scoping. 20 | 21 | 1. Create a folder prefixed with `datart-`, such as `datart-hello-world`. 22 | 2. Create a plugin chart with **Javascript** or **Typescript** file 23 | 3. Plugin chart should be export an object with datart lifecycles[^2], such as `onMount`、`onUpdated` and etc. 24 | 4. Run `npm run build` and then check `dist` folder with file `datart-hello-world.iife.js`. 25 | __NOTE: Plugin folder should be prefix as `datart-*` which could be automatic load when run `build`__ 26 | 27 | ### 2. Cook plugin chart as an React Component 28 | 29 | **Please take a look plugins folder** 30 | 31 | ## Sample 32 | <div style="display:flex;flex-direction:column;"> 33 | <div style="flex:1"> 34 | <h3>Antv/G2</h3> 35 | <img src="plugins/datart-antvg2/experiment-antvg2-chart.png" alt="Antv/G2"/> 36 | </div> 37 | <div style="flex:1"> 38 | <h3>BabylonJS</h3> 39 | <img src="plugins/datart-babylon/babylon-js-demo.png" alt="BabylonJS"/> 40 | </div> 41 | <div style="flex:1"> 42 | <h3>ChartJS</h3> 43 | <img src="plugins/datart-chartjs/experiment-chartjs-sample.png" alt="ChartJS"/> 44 | </div> 45 | <div style="flex:1"> 46 | <h3>ThreeJS-BingDunDun</h3> 47 | <img src="plugins/datart-threejs-bingdundun/bigndundun.png" alt="ThreeJS-BingDunDun"/> 48 | </div> 49 | <div style="flex:1"> 50 | <h3>ThreeJS-WebGL</h3> 51 | <img src="plugins/datart-threejs-webgl/callada.gif" alt="ThreeJS-BingDunDun"/> 52 | </div> 53 | <div style="flex:1"> 54 | <h3>ECharts-Time</h3> 55 | <img src="plugins/datart-time/time-series-chart.png" alt="ECharts-Time"/> 56 | </div> 57 | <div style="flex:1"> 58 | <h3>Mermaid-UML</h3> 59 | <img src="plugins/datart-uml/experiment-uml-chart.png" alt="Mermaid-UML"/> 60 | </div> 61 | <div style="flex:1"> 62 | <h3>VueJS</h3> 63 | <img src="plugins/datart-vuejs/vuejs-chart.png" alt="VueJS"/> 64 | </div> 65 | <div style="flex:1"> 66 | <h3>ZRender</h3> 67 | <img src="plugins/datart-zrender/experiment-zrender-chart.png" alt="ZRender"/> 68 | </div> 69 | </div> 70 | 71 | 72 | ## More Posts 73 | - [x] Plugin Chart Helper API document: https://running-elephant.github.io/datart-docs/api/ 74 | - [x] How to Make a Plugin Chart: https://running-elephant.github.io/datart-docs/docs/chart_plugin.html 75 | - [x] How to Make Chart Config: https://juejin.cn/post/7040683275446124574 76 | - [x] Vue Carousel Plugin Chart:https://mp.weixin.qq.com/s/a4DVf-5LHVQAknmKKE6DJA 77 | - [x] JQuery Plugin Chart:https://mp.weixin.qq.com/s/9hBNSla86Fzouy0WdXqSQQ 78 | - [x] Hand by hand develop a plugin chart: https://mp.weixin.qq.com/s/nYMAaiT97NPkm71FpW8LSw 79 | 80 | 81 | [^1]: https://en.wikipedia.org/wiki/Immediately_invoked_function_expression 82 | 83 | [^2]: https://running-elephant.github.io/datart-docs/docs/chart_plugin.html -------------------------------------------------------------------------------- /README_zh.md: -------------------------------------------------------------------------------- 1 | # datart-extension-charts 2 | 3 | > 这里是 Datart 插件图表仓库,当前的图表是**实验阶段**,请勿用于生产环境。 4 | 5 | 6 | 🖖 欢迎提 Pull Rquest 以及 Issue,请不要担心问题过于直白或者初级,任何反馈均是贡献 👏. 7 | 8 | ## 如果你是一位使用者 9 | 10 | 1. 从`dist`文件夹中拷贝出你所需要的插件图表,如`datart-amap.iife.js`这个给予高德地图的插件图表 11 | 2. 将拷贝出的插件图表粘贴到你的datart服务端的`custom-chart-plugins`目录下 12 | 3. 登陆 datart 系统,然后选择你所导入的插件图表 13 | 14 | ## 如果你是一位开发者 15 | 16 | > 当前的仓库提供了基于命令行的工具,提升开发效率。 17 | 18 | ### 1. 制作 IIFE 类型的插件图表 (推荐) 19 | 20 | > 立即调用函数表达式(英文:immediately-invoked function expression,缩写:IIFE)[1],是一种利用JavaScript函数生成新作用域的编程方法。 21 | 22 | 1. 创建一个以`datart-`开头的文件夹,如`datart-hello-world`文件夹 23 | 2. 创建一个 **Javascript** or **Typescript** 文件 24 | 3. 导出一个包含 datart 生命周期的函数对象,生命周期[^2]例如`onMount`、`onUpdated`等. 25 | 4. 运行`npm run build` 命令,并且查看`dist`文件夹新生成的`datart-hello-world.iife.js`文件 26 | 27 | __注意:插件图表文件夹的名称必须以`datart-`开头,这样当运行build命令时可自动打包文件__ 28 | 29 | ### 2. 制作 React 类型的插件图表 30 | 31 | **请查看`plugins`文件夹📁下面的图表示例** 32 | 33 | ## Sample 34 | <div style="display:flex;flex-direction:column;"> 35 | <div style="flex:1"> 36 | <h3>Antv/G2</h3> 37 | <img src="plugins/datart-antvg2/experiment-antvg2-chart.png" alt="Antv/G2"/> 38 | </div> 39 | <div style="flex:1"> 40 | <h3>BabylonJS</h3> 41 | <img src="plugins/datart-babylon/babylon-js-demo.png" alt="BabylonJS"/> 42 | </div> 43 | <div style="flex:1"> 44 | <h3>ChartJS</h3> 45 | <img src="plugins/datart-chartjs/experiment-chartjs-sample.png" alt="ChartJS"/> 46 | </div> 47 | <div style="flex:1"> 48 | <h3>ThreeJS-BingDunDun</h3> 49 | <img src="plugins/datart-threejs-bingdundun/bigndundun.png" alt="ThreeJS-BingDunDun"/> 50 | </div> 51 | <div style="flex:1"> 52 | <h3>ThreeJS-WebGL</h3> 53 | <img src="plugins/datart-threejs-webgl/callada.gif" alt="ThreeJS-BingDunDun"/> 54 | </div> 55 | <div style="flex:1"> 56 | <h3>ECharts-Time</h3> 57 | <img src="plugins/datart-time/time-series-chart.png" alt="ECharts-Time"/> 58 | </div> 59 | <div style="flex:1"> 60 | <h3>Mermaid-UML</h3> 61 | <img src="plugins/datart-uml/experiment-uml-chart.png" alt="Mermaid-UML"/> 62 | </div> 63 | <div style="flex:1"> 64 | <h3>VueJS</h3> 65 | <img src="plugins/datart-vuejs/vuejs-chart.png" alt="VueJS"/> 66 | </div> 67 | <div style="flex:1"> 68 | <h3>ZRender</h3> 69 | <img src="plugins/datart-zrender/experiment-zrender-chart.png" alt="ZRender"/> 70 | </div> 71 | </div> 72 | 73 | 74 | ## 更多文章链接 75 | - [x] Plugin Chart Helper API document: https://running-elephant.github.io/datart-docs/api/ 76 | - [x] How to Make a Plugin Chart: https://running-elephant.github.io/datart-docs/docs/chart_plugin.html 77 | - [x] How to Make Chart Config: https://juejin.cn/post/7040683275446124574 78 | - [x] Vue 跑马灯插件示例: https://mp.weixin.qq.com/s/a4DVf-5LHVQAknmKKE6DJA 79 | - [x] JQuery 图表插件:https://mp.weixin.qq.com/s/9hBNSla86Fzouy0WdXqSQQ 80 | - [x] 手把手教你开发出优秀的图表插件作品: https://mp.weixin.qq.com/s/nYMAaiT97NPkm71FpW8LSw 81 | 82 | 83 | [^1]: https://zh.wikipedia.org/wiki/%E7%AB%8B%E5%8D%B3%E8%B0%83%E7%94%A8%E5%87%BD%E6%95%B0%E8%A1%A8%E8%BE%BE%E5%BC%8F 84 | 85 | [^2]: https://running-elephant.github.io/datart-docs/docs/chart_plugin.html -------------------------------------------------------------------------------- /core/datart.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | export interface IChartLifecycle { 20 | /** 21 | * Mount event with params `option` and `context` 22 | * 23 | * @abstract 24 | * @param {*} options 25 | * @param {*} [context] 26 | * @memberof DatartChartBase 27 | */ 28 | onMount(options, context?): void; 29 | 30 | /** 31 | * Update event with params `option` and `context` 32 | * 33 | * @abstract 34 | * @param {*} options 35 | * @param {*} [context] 36 | * @memberof DatartChartBase 37 | */ 38 | onUpdated(options, context?): void; 39 | 40 | /** 41 | * UnMount event with params `option` and `context` 42 | * 43 | * @abstract 44 | * @param {*} options 45 | * @param {*} [context] 46 | * @memberof DatartChartBase 47 | */ 48 | onUnMount(options, context?): void; 49 | 50 | /** 51 | * Resize event with params `option` and `context` 52 | * 53 | * @abstract 54 | * @param {*} options 55 | * @param {*} [context] 56 | * @memberof DatartChartBase 57 | */ 58 | onResize(options, context?): void; 59 | } 60 | 61 | export interface IChart extends IChartLifecycle { 62 | meta: any; 63 | config?: any; 64 | dataset?: any; 65 | dependency: string[]; 66 | isISOContainer: boolean | string; 67 | useIFrame?: boolean; 68 | 69 | set state(state: any); 70 | get state(); 71 | 72 | getDependencies(): string[]; 73 | 74 | init(config: any); 75 | registerMouseEvents(events: Array<any>); 76 | isMatchRequirement(targetConfig?: any): boolean; 77 | } 78 | -------------------------------------------------------------------------------- /dist/datart-antd-react.iife.js: -------------------------------------------------------------------------------- 1 | (function(){"use strict";function e({dHelper:e}){return{config:{datas:[],styles:[{label:"code.title",key:"code",comType:"group",rows:[{label:"code.area",key:"area",comType:"text",options:{}}]},{label:"watermark.title",key:"watermark",comType:"group",rows:[{label:"watermark.area",key:"area",comType:"text",options:{}}]}],settings:[],i18ns:[{lang:"zh-CN",translation:{code:{title:"代码设置",area:"编辑区"},watermark:{title:"水印设置",area:"编辑区"}}},{lang:"en",translation:{code:{title:"Code Setting",area:"Editor Block"},watermark:{title:"Watermark Setting",area:"Editor Block"}}}]},_containerId:null,isISOContainer:"experiment-antd-react-chart",dependency:["https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.production.min.js","https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js","https://cdnjs.cloudflare.com/ajax/libs/antd/4.24.1/antd.min.js","https://cdnjs.cloudflare.com/ajax/libs/antd/4.24.1/antd.min.css"],meta:{id:"experiment-antd-react-chart",name:"[Experiment] Ant Design React",icon:"chart"},_ReactDom:null,_React:null,onMount(e,t){this._containerId=e.containerId;if("React"in t.window&&"ReactDOM"in t.window){this._ReactDOM=t.window.ReactDOM;this._React=t.window.React;const a=this._ReactDOM.createRoot(t.document.getElementById(e.containerId));a.render(this.buildComponent(t.window))}},onUpdated(e,t){e.config.styles},onUnMount(){},onResize(e,t){},buildComponent({antd:e}){const t=this._React.createElement;const a=[{key:"1",name:"Mike",age:32,address:"10 Downing Street"},{key:"2",name:"John",age:42,address:"10 Downing Street"}];const n=[{title:"Name",dataIndex:"name",key:"name"},{title:"Age",dataIndex:"age",key:"age"},{title:"Address",dataIndex:"address",key:"address"}];return t("div",null,[t("h1",null,"Hello World!"),t(e.Table,{dataSource:a,columns:n},null)])}}}return e})(); 2 | -------------------------------------------------------------------------------- /dist/datart-antv-box.iife.js: -------------------------------------------------------------------------------- 1 | (function(){"use strict";const e="@global@";function t({dHelper:t}){const a=[{x:"Oceania",low:1,q1:9,median:16,q3:22,high:24},{x:"East Europe",low:1,q1:5,median:8,q3:12,high:16},{x:"Australia",low:1,q1:8,median:12,q3:19,high:26},{x:"South America",low:2,q1:8,median:12,q3:21,high:28},{x:"North Africa",low:1,q1:8,median:14,q3:18,high:24},{x:"North America",low:3,q1:10,median:17,q3:28,high:30},{x:"West Europe",low:1,q1:7,median:10,q3:17,high:22},{x:"West Africa",low:1,q1:6,median:8,q3:13,high:16}];return{config:{datas:[{label:`${e}.box.dimension`,key:"dimension",type:"group",required:true,limit:[1,1]},{label:`${e}.box.min`,key:"min",type:"aggregate",required:true,limit:[1,1]},{label:`${e}.box.q1`,key:"q1",type:"aggregate",required:true,limit:[1,1]},{label:`${e}.box.median`,key:"median",type:"aggregate",required:true,limit:[1,1]},{label:`${e}.box.q3`,key:"q3",type:"aggregate",required:true,limit:[1,1]},{label:`${e}.box.max`,key:"max",type:"aggregate",required:true,limit:[1,1]}],styles:[{label:"boxStyle.title",key:"boxStyle",comType:"group",rows:[{label:"boxStyle.fill",key:"fill",default:"#1890FF",comType:"fontColor"},{label:"boxStyle.stroke",key:"stroke",default:"#545454",comType:"fontColor"},{label:"boxStyle.fillOpacity",key:"fillOpacity",default:.3,comType:"inputNumber"}]},{label:"theme.title",key:"theme",comType:"group",rows:[{label:"theme.current",key:"current",comType:"select",default:"default",options:{translateItemLabel:false,items:[{label:"默认",value:"default"},{label:"黑暗主题",value:"dark"}]}}]}],i18ns:[{lang:"zh",translation:{box:{dimension:"维度",min:"最小值",q1:"第一分位",median:"中位数",q3:"第三分位",max:"最大位"},theme:{title:"主题设置",current:"当前主题"},boxStyle:{title:"箱线图样式设置",fill:"图形的填充色",stroke:"图形的描边",fillOpacity:"填充透明度"}}},{lang:"en",translation:{theme:{title:"Theme Style",current:"Current"}}}]},isISOContainer:"antv-g2plot",dependency:["https://cdnjs.cloudflare.com/ajax/libs/g2plot/2.4.23/g2plot.min.js"],meta:{id:"experiment-antv-box",name:"[Experiment] AntV Box Chart",icon:"chart",requirements:[{group:1,aggregate:5}]},_chart:null,onMount(e,t){if(void 0===e.containerId||!t.document)return;const{Box:i}=t.window.G2Plot;if(!i)return;this._chart=new i(e.containerId,{autoFit:true,data:a,xField:"x",yField:["low","q1","median","q3","high"],boxStyle:{stroke:"#545454",fill:"#1890FF",fillOpacity:.3},animation:false});this._chart.render()},onUpdated(e,t){if(!this._chart)return;if(!this.isMatchRequirement(e.config))return;const a=this.getOptions(e.dataset,e.config,e.drillOption,e.selectedItems);this._chart.update(a)},onUnMount(){if(!this._chart)return;this._chart.destroy()},onResize(e,t){if(!this._chart)return;if(!t.width||!t.height)return;this._chart.changeSize(t.width,t.height)},getOptions(e,a,i,l){const r=a.styles||[];const o=a.datas||[];const n=o.filter((e=>"dimension"===e.key)).flatMap((e=>e.rows||[])).map((e=>e.colName)).findLast((e=>e));const s=o.filter((e=>"min"===e.key)).flatMap((e=>e.rows||[])).map((e=>`${e.aggregate}(${e.colName})`)).findLast((e=>e));const m=o.filter((e=>"q1"===e.key)).flatMap((e=>e.rows||[])).map((e=>`${e.aggregate}(${e.colName})`)).findLast((e=>e));const c=o.filter((e=>"median"===e.key)).flatMap((e=>e.rows||[])).map((e=>`${e.aggregate}(${e.colName})`)).findLast((e=>e));const d=o.filter((e=>"q3"===e.key)).flatMap((e=>e.rows||[])).map((e=>`${e.aggregate}(${e.colName})`)).findLast((e=>e));const g=o.filter((e=>"max"===e.key)).flatMap((e=>e.rows||[])).map((e=>`${e.aggregate}(${e.colName})`)).findLast((e=>e));const h=t.transformToObjectArray(e.rows,e.columns);const[u,f,y]=t.getStyles(r,["boxStyle"],["fill","stroke","fillOpacity"]);const[p]=t.getStyles(r,["theme"],["current"]);return{data:h,xField:n,yField:[s,m,c,d,g],theme:p,boxStyle:{stroke:f,fill:u,fillOpacity:y},animation:false}}}}return t})(); 2 | -------------------------------------------------------------------------------- /dist/datart-antv-sankey.iife.js: -------------------------------------------------------------------------------- 1 | (function(){"use strict";const e="@global@";function t({dHelper:t}){const a=[{source:"首次打开",target:"首页 UV",value:160},{source:"结果页",target:"首页 UV",value:40},{source:"验证页",target:"首页 UV",value:10},{source:"我的",target:"首页 UV",value:10},{source:"朋友",target:"首页 UV",value:8},{source:"其他来源",target:"首页 UV",value:27},{source:"首页 UV",target:"理财",value:30},{source:"首页 UV",target:"扫一扫",value:40},{source:"首页 UV",target:"服务",value:35},{source:"首页 UV",target:"蚂蚁森林",value:25},{source:"首页 UV",target:"跳失",value:10},{source:"首页 UV",target:"借呗",value:30},{source:"首页 UV",target:"花呗",value:40},{source:"首页 UV",target:"其他流向",value:45}];return{config:{datas:[{label:`${e}.sankey.source`,key:"source",type:"group",required:true,limit:[1,1]},{label:`${e}.sankey.target`,key:"target",type:"group",required:true,limit:[1,1]},{label:`${e}.sankey.metrics`,key:"metrics",type:"aggregate",required:true,limit:[1,1]}],styles:[{label:"geometry.title",key:"geometry",comType:"group",rows:[{label:"geometry.nodeWidthRatio",key:"nodeWidthRatio",default:.008,max:1,min:.001,comType:"inputNumber"},{label:"geometry.nodeWidthPadding",key:"nodeWidthPadding",default:.01,max:1,min:.01,comType:"inputNumber"},{label:"geometry.nodeAlign.title",key:"nodeAlign",comType:"select",default:"justify",options:{translateItemLabel:true,items:[{label:"@global@.geometry.nodeAlign.left",value:"left"},{label:"@global@.geometry.nodeAlign.right",value:"right"},{label:"@global@.geometry.nodeAlign.center",value:"center"},{label:"@global@.geometry.nodeAlign.justify",value:"justify"}]}}]},{label:"theme.title",key:"theme",comType:"group",rows:[{label:"theme.current",key:"current",comType:"select",default:"default",options:{translateItemLabel:false,items:[{label:"默认",value:"default"},{label:"黑暗主题",value:"dark"}]}}]}],i18ns:[{lang:"zh",translation:{sankey:{source:"来源",target:"目标",metrics:"指标"},theme:{title:"主题设置",current:"当前主题"},geometry:{title:"几何样式设置",nodeWidthRatio:"节点的宽度配置",nodeWidthPadding:"节点的之间垂直方向的间距",nodeAlign:{title:"对齐方式",left:"左对齐",right:"右对齐",center:"居中",justify:"两端对齐"}}}},{lang:"en",translation:{sankey:{source:"Source",target:"Target",metrics:"Metric"},theme:{title:"Theme Style",current:"Current"},geometry:{title:"Geometry Style",nodeWidthRatio:"Node Width Ratio",nodeWidthPadding:"Node Width Padding",nodeAlign:{title:"Align Type",left:"left",right:"right",center:"center",justify:"justify"}}}}]},isISOContainer:"antv-g2plot",dependency:["https://cdnjs.cloudflare.com/ajax/libs/g2plot/2.4.23/g2plot.min.js"],meta:{id:"experiment-antv-sankey",name:"[Experiment] AntV Sankey Chart",icon:"chart",requirements:[{group:0,aggregate:3}]},_chart:null,onMount(e,t){if(void 0===e.containerId||!t.document)return;const{Sankey:r}=t.window.G2Plot;if(!r)return;this._chart=new r(e.containerId,{data:a,sourceField:"source",targetField:"target",weightField:"value",nodeWidthRatio:.008,nodePaddingRatio:.03});this._chart.render()},onUpdated(e,t){if(!this._chart)return;const a=this.getOptions(e.dataset,e.config,e.drillOption,e.selectedItems);this._chart.update(a)},onUnMount(){if(!this._chart)return;this._chart.destroy()},onResize(e,t){if(!this._chart)return;if(!t.width||!t.height)return;this._chart.changeSize(t.width,t.height)},getOptions(e,a,r,o){const i=a.styles||[];const l=a.datas||[];const n=l.filter((e=>"metrics"===e.key)).flatMap((e=>e.rows||[])).map((e=>`${e.aggregate}(${e.colName})`)).findLast((e=>e));const s=l.filter((e=>"source"===e.key)).flatMap((e=>e.rows||[])).map((e=>e.colName||"source")).findLast((e=>e));const d=l.filter((e=>"target"===e.key)).flatMap((e=>e.rows||[])).map((e=>e.colName||"target")).findLast((e=>e));const u=t.transformToObjectArray(e.rows,e.columns);const[g,c,m]=t.getStyles(i,["geometry"],["nodeWidthRatio","nodeWidthPadding","nodeAlign"]);const[h]=t.getStyles(i,["theme"],["current"]);return{data:u,sourceField:s,targetField:d,weightField:n,nodeWidthRatio:g,nodePaddingRatio:c,nodeAlign:m,theme:h,nodeDraggable:true,rawFields:["path"],tooltip:{fields:["path","value"],formatter:({path:e,value:t})=>({name:e,value:t})}}}}}return t})(); 2 | -------------------------------------------------------------------------------- /dist/datart-antvg2.iife.js: -------------------------------------------------------------------------------- 1 | (function(){"use strict";function e({dHelper:e}){const n=[{Year:2016,"Number of incidents":"13,488",Deaths:"34,676",Injuries:"39,851"},{Year:2015,"Number of incidents":"14,852",Deaths:"38,464",Injuries:"43,960"},{Year:2014,"Number of incidents":"16,860",Deaths:"43,566",Injuries:"41,061"},{Year:2013,"Number of incidents":"11,996",Deaths:"22,234",Injuries:"37,666"},{Year:2012,"Number of incidents":"8,500",Deaths:"15,436",Injuries:"25,486"},{Year:2011,"Number of incidents":"5,071",Deaths:"8,228",Injuries:"14,652"},{Year:2010,"Number of incidents":"4,822",Deaths:"7,727",Injuries:"15,860"},{Year:2009,"Number of incidents":"4,719",Deaths:"9,271",Injuries:"19,128"},{Year:2008,"Number of incidents":"4,803",Deaths:"9,135",Injuries:"18,984"},{Year:2007,"Number of incidents":"3,241",Deaths:"12,858",Injuries:"22,453"},{Year:2006,"Number of incidents":"2,749",Deaths:"9,362",Injuries:"15,551"},{Year:2005,"Number of incidents":"2,009",Deaths:"6,313",Injuries:"12,769"},{Year:2004,"Number of incidents":"1,162",Deaths:"5,718",Injuries:"11,817"},{Year:2003,"Number of incidents":"1,262",Deaths:"3,278",Injuries:"7,091"},{Year:2002,"Number of incidents":"1,332",Deaths:"4,799",Injuries:"7,103"},{Year:2001,"Number of incidents":"1,907",Deaths:"7,743",Injuries:"21,151"},{Year:2e3,"Number of incidents":"1,813",Deaths:"4,402",Injuries:"5,869"},{Year:1999,"Number of incidents":"1,395",Deaths:"3,388",Injuries:"5,341"},{Year:1998,"Number of incidents":933,Deaths:"4,688",Injuries:"8,183"},{Year:1997,"Number of incidents":"3,200",Deaths:"10,928",Injuries:"9,174"},{Year:1996,"Number of incidents":"3,056",Deaths:"6,965",Injuries:"10,781"},{Year:1995,"Number of incidents":"3,081",Deaths:"6,094",Injuries:"14,288"},{Year:1994,"Number of incidents":"3,458",Deaths:"7,691",Injuries:"7,573"},{Year:1993,"Number of incidents":747,Deaths:"2,669",Injuries:"5,600"},{Year:1992,"Number of incidents":"5,073",Deaths:"9,745",Injuries:"9,927"},{Year:1991,"Number of incidents":"4,683",Deaths:"8,429",Injuries:"7,591"},{Year:1990,"Number of incidents":"3,887",Deaths:"7,148",Injuries:"6,128"},{Year:1989,"Number of incidents":"4,323",Deaths:"8,136",Injuries:"5,512"},{Year:1988,"Number of incidents":"3,720",Deaths:"7,189",Injuries:"6,860"},{Year:1987,"Number of incidents":"3,184",Deaths:"6,476",Injuries:"5,769"},{Year:1986,"Number of incidents":"2,860",Deaths:"4,976",Injuries:"5,814"},{Year:1985,"Number of incidents":"2,915",Deaths:"7,094",Injuries:"5,130"},{Year:1984,"Number of incidents":"3,495",Deaths:"10,450",Injuries:"5,291"},{Year:1983,"Number of incidents":"2,870",Deaths:"9,444",Injuries:"4,047"},{Year:1982,"Number of incidents":"2,545",Deaths:"5,135",Injuries:"3,342"},{Year:1981,"Number of incidents":"2,585",Deaths:"4,851",Injuries:"3,337"},{Year:1980,"Number of incidents":"2,662",Deaths:"4,391",Injuries:"3,645"},{Year:1979,"Number of incidents":"2,661",Deaths:"2,100",Injuries:"2,502"},{Year:1978,"Number of incidents":"1,526",Deaths:"1,459",Injuries:"1,600"},{Year:1977,"Number of incidents":"1,319",Deaths:456,Injuries:518},{Year:1976,"Number of incidents":923,Deaths:672,Injuries:755},{Year:1975,"Number of incidents":740,Deaths:617,Injuries:617},{Year:1974,"Number of incidents":580,Deaths:542,Injuries:763},{Year:1973,"Number of incidents":473,Deaths:370,Injuries:495},{Year:1972,"Number of incidents":496,Deaths:566,Injuries:408},{Year:1971,"Number of incidents":470,Deaths:173,Injuries:82},{Year:1970,"Number of incidents":651,Deaths:171,Injuries:192}];return{config:{datas:[{label:"dimension",key:"dimension",actions:["sortable","alias"]},{label:"metrics",key:"metrics",rows:[],actions:["format","aggregate"]}],styles:[{label:"label",key:"label",comType:"group",rows:[{label:"showLabel",key:"showLabel",default:false,comType:"checkbox"},{label:"showLabelBySwitch",key:"showLabelBySwitch",default:true,comType:"switch",watcher:{deps:["showLabel"],action:e=>({comType:e.showLabel?"checkbox":"switch",disabled:e.showLabel})}},{label:"showDataColumns",key:"dataColumns",comType:"select",options:[{getItems:e=>{const n=(e||[]).filter((e=>["metrics","dimension"].includes(e.key)));const t=n.reduce(((e,n)=>e.concat(n.rows||[])),[]);return t.map((e=>({key:e.uid,value:e.uid,label:e.label||e.aggregate?`${e.aggregate}(${e.colName})`:e.colName})))}}]},{label:"font",key:"font",comType:"font"}]}],i18ns:[{lang:"zh",translation:{label:"标签",showLabel:"显示标签",showLabelBySwitch:"显示标签2",showLabelByInput:"显示标签3",showLabelWithSelect:"显示标签4",fontFamily:"字体",fontSize:"字体大小",fontColor:"字体颜色",rotateLabel:"旋转标签",showDataColumns:"选择数据列",legend:{label:"图例",showLabel:"图例-显示标签",showLabel2:"图例-显示标签2"}}},{lang:"en",translation:{label:"Label",showLabel:"Show Label",showLabelBySwitch:"Show Lable Switch",showLabelWithInput:"Show Label Input",showLabelWithSelect:"Show Label Select"}}]},isISOContainer:"experiment-antvg2-chart",dependency:["https://cdnjs.cloudflare.com/ajax/libs/antv-g2/4.1.34/g2.min.js","https://cdn.jsdelivr.net/npm/@antv/data-set@0.11.8/build/data-set.min.js"],meta:{id:"experiment-antvg2-chart",name:"[Experiment] AntV G2 Chart",icon:"chart",requirements:[{group:null,aggregate:null}]},onMount(e,t){if(void 0===e.containerId||!t.document)return;const{Chart:s}=t.window.G2;if(!s)return;const a=new t.window.Dataset;const i=new s({container:e.containerId,autoFit:true,height:500,syncViewPadding:true});i.scale({Deaths:{sync:true,nice:true},death:{sync:true,nice:true}});const r=a.createView().source(n);r.transform({type:"map",callback:e=>{if("string"===typeof e.Deaths)e.Deaths=e.Deaths.replace(",","");e.Deaths=parseInt(e.Deaths,10);e.death=e.Deaths;e.year=e.Year;return e}});const o=i.createView();o.data(r.rows);o.axis("Year",{subTickLine:{count:3,length:3},tickLine:{length:6}});o.axis("Deaths",{label:{formatter:e=>e.replace(/(\d)(?=(?:\d{3})+$)/g,"$1,")}});o.line().position("Year*Deaths");const u=a.createView().source(r.rows);u.transform({type:"regression",method:"polynomial",fields:["year","death"],bandwidth:.1,as:["year","death"]});const c=i.createView();c.axis(false);c.data(u.rows);c.line().position("year*death").style({stroke:"#969696",lineDash:[3,3]}).tooltip(false);o.annotation().text({content:"趋势线",position:["1970",2500],style:{fill:"#8c8c8c",fontSize:14,fontWeight:300},offsetY:-70});i.render()},onUpdated(e,n){},onUnMount(){},onResize(e,n){}}}return e})(); 2 | -------------------------------------------------------------------------------- /dist/datart-chartjs.iife.js: -------------------------------------------------------------------------------- 1 | (function(){"use strict";var t='<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t width="192px" height="192px" viewBox="0 0 192 192" enable-background="new 0 0 192 192" xml:space="preserve">\n<path d="M161.271,96.556c-22.368,0.439-17.709,14.599-33.473,18.18c-16.014,3.638-18.542-39.111-34.552-39.111\n\tc-16.012,0-19.559,41.526-39.608,70.034l-0.572,0.807l42.985,24.813l65.22-37.651V96.556z"/>\n<path d="M161.271,95.267c-7.488-9.61-12.567-20.658-23.494-20.658c-19.337,0-14.249,31.545-35.62,31.545\n\tc-21.373,0-23.62-33.931-47.832-2.035c-7.715,10.163-13.925,21.495-18.803,32.218l60.529,34.943l65.22-37.651V95.267z"/>\n<path opacity="0.8" d="M30.829,108.334c7.338-20.321,10.505-36.779,24.514-36.779\n\tc21.371,0,26.458,60.039,44.779,53.931c18.318-6.105,16.282-38.669,44.779-38.669c5.424,0,10.962,3.323,16.371,8.698v38.113\n\tl-65.22,37.651l-65.222-37.651V108.334z"/>\n<path d="M96,176l-69.292-39.999V56L96,16l69.292,40v80L96,176z M34.849,131.301L96,166.602l61.151-35.301V60.7\n\tL96,25.399L34.849,60.7V131.301z"/>\n</svg>';function e({dHelper:e}){const n={labels:["Red","Blue","Yellow","Green","Purple","Orange"],datasets:[{label:"# of Votes",data:[12,19,3,5,2,3],backgroundColor:["rgba(255, 99, 132, 0.2)","rgba(54, 162, 235, 0.2)","rgba(255, 206, 86, 0.2)","rgba(75, 192, 192, 0.2)","rgba(153, 102, 255, 0.2)","rgba(255, 159, 64, 0.2)"],borderColor:["rgba(255, 99, 132, 1)","rgba(54, 162, 235, 1)","rgba(255, 206, 86, 1)","rgba(75, 192, 192, 1)","rgba(153, 102, 255, 1)","rgba(255, 159, 64, 1)"],borderWidth:1}]};return{config:{datas:[{label:"dimension",key:"dimension",actions:["sortable","alias"]},{label:"metrics",key:"metrics",rows:[],actions:["format","aggregate"]}],styles:[],settings:[],i18ns:[{lang:"zh-CN",translation:{chartName:"ChartJS"}},{lang:"en-US",translation:{chartName:"ChartJS"}}]},isISOContainer:"experiment-chartjs-chart",dependency:["https://cdn.jsdelivr.net/npm/chart.js@2.8.0"],meta:{id:"experiment-chartjs-chart",name:"chartName",icon:t,requirements:[{group:null,aggregate:null}]},onMount(t,e){if(void 0===t.containerId||!e.document)return;const{Chart:a}=e.window.Chart;if(!a)return;const r=e.document.createElement("canvas");r.id="chartjs-canvas-container";e.document.getElementById(t.containerId).appendChild(r);var o=e.document.getElementById("chartjs-canvas-container").getContext("2d");new a(o,{type:"bar",data:n,options:{scales:{yAxes:[{ticks:{beginAtZero:true}}]}}})},onUpdated(t,e){},onUnMount(){},onResize(t,e){}}}return e})(); 2 | -------------------------------------------------------------------------------- /dist/datart-clustering.iife.js: -------------------------------------------------------------------------------- 1 | (function(){"use strict";var t='<svg t="1675067481541" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3340" width="16" height="16"><path d="M512 512m-160 0a160 160 0 1 0 320 0 160 160 0 1 0-320 0Z" fill="#2c2c2c" p-id="3341"></path><path d="M512 704c-105.888 0-192-86.112-192-192s86.112-192 192-192 192 86.112 192 192-86.112 192-192 192z m0-320c-70.592 0-128 57.408-128 128s57.408 128 128 128 128-57.408 128-128-57.408-128-128-128zM192 320c-70.592 0-128-57.408-128-128s57.408-128 128-128 128 57.408 128 128-57.408 128-128 128z m0-192c-35.296 0-64 28.704-64 64s28.704 64 64 64 64-28.704 64-64-28.704-64-64-64zM192 960c-70.592 0-128-57.408-128-128s57.408-128 128-128 128 57.408 128 128-57.408 128-128 128z m0-192c-35.296 0-64 28.704-64 64s28.704 64 64 64 64-28.704 64-64-28.704-64-64-64zM832 960c-70.592 0-128-57.408-128-128s57.408-128 128-128 128 57.408 128 128-57.408 128-128 128z m0-192c-35.296 0-64 28.704-64 64s28.704 64 64 64 64-28.704 64-64-28.704-64-64-64zM832 320c-70.592 0-128-57.408-128-128s57.408-128 128-128 128 57.408 128 128-57.408 128-128 128z m0-192c-35.296 0-64 28.704-64 64s28.704 64 64 64 64-28.704 64-64-28.704-64-64-64z" fill="#2c2c2c" p-id="3342"></path><path d="M259.392 796.64a31.968 31.968 0 0 1-22.624-54.624l139.488-139.456a31.968 31.968 0 1 1 45.248 45.248l-139.488 139.456a31.904 31.904 0 0 1-22.624 9.376zM640 416a31.968 31.968 0 0 1-22.624-54.624l124.128-124.096a31.968 31.968 0 1 1 45.248 45.248l-124.128 124.096A31.904 31.904 0 0 1 640 416zM764.192 796.192a31.904 31.904 0 0 1-22.624-9.376l-131.616-131.616a31.968 31.968 0 1 1 45.248-45.248l131.616 131.616a31.968 31.968 0 0 1-22.624 54.624z" fill="#2c2c2c" p-id="3343"></path><path d="M398.848 430.816a31.904 31.904 0 0 1-22.624-9.376L237.184 282.432a31.968 31.968 0 1 1 45.248-45.248l139.04 139.008a31.968 31.968 0 0 1-22.624 54.624z" fill="#2c2c2c" p-id="3344"></path></svg>';var e=[[3.275154,2.957587],[-3.344465,2.603513],[.355083,-3.376585],[1.852435,3.547351],[-2.078973,2.552013],[-.993756,-.884433],[2.682252,4.007573],[-3.087776,2.878713],[-1.565978,-1.256985],[2.441611,.444826],[-.659487,3.111284],[-.459601,-2.618005],[2.17768,2.387793],[-2.920969,2.917485],[-.028814,-4.168078],[3.625746,2.119041],[-3.912363,1.325108],[-.551694,-2.814223],[2.855808,3.483301],[-3.594448,2.856651],[.421993,-2.372646],[1.650821,3.407572],[-2.082902,3.384412],[-.718809,-2.492514],[4.513623,3.841029],[-4.822011,4.607049],[-.656297,-1.449872],[1.919901,4.439368],[-3.287749,3.918836],[-1.576936,-2.977622],[3.598143,1.97597],[-3.977329,4.900932],[-1.79108,-2.184517],[3.914654,3.559303],[-1.910108,4.166946],[-1.226597,-3.317889],[1.148946,3.345138],[-2.113864,3.548172],[.845762,-3.589788],[2.629062,3.535831],[-1.640717,2.990517],[-1.881012,-2.485405],[4.606999,3.510312],[-4.366462,4.023316],[.765015,-3.00127],[3.121904,2.173988],[-4.025139,4.65231],[-.559558,-3.840539],[4.376754,4.863579],[-1.874308,4.032237],[-.089337,-3.026809],[3.997787,2.518662],[-3.082978,2.884822],[.845235,-3.454465],[1.327224,3.358778],[-2.889949,3.596178],[-.966018,-2.839827],[2.960769,3.079555],[-3.275518,1.577068],[.639276,-3.41284]];const s="@global@";function i({dHelper:i}){return{config:{datas:[{label:`${s}.xAxis`,key:"xAxis",type:"mixed",required:true,limit:[1,1]},{label:`${s}.yAxis`,key:"yAxis",type:"mixed",required:true,limit:[1,1]}],settings:[{label:"cluster.title",key:"cluster",comType:"group",rows:[{label:"cluster.clusterCount",key:"clusterCount",default:5,comType:"inputNumber",options:{min:2}}]}],i18ns:[{lang:"zh-CN",translation:{xAxis:"X 轴",yAxis:"Y 轴",cluster:{title:"统计分析",clusterCount:"K值"}}},{lang:"en",translation:{xAxis:"X Axis",yAxis:"Y Axis",cluster:{title:"Clustering",clusterCount:"K Value"}}}]},dependency:["https://fastly.jsdelivr.net/npm/echarts@5.4.1/dist/echarts.min.js","https://fastly.jsdelivr.net/npm/echarts-stat@latest/dist/ecStat.min.js"],meta:{id:"clustering-chart",name:"[Experiment] 统计聚类图表",icon:t,requirements:[{group:null,aggregate:null}]},onMount(t,e){if(void 0===t.containerId||!e.document)return;if("echarts"in e.window&&"ecStat"in e.window){const s=e.window.echarts;this.chart=s.init(e.document.getElementById(t.containerId),"default");const i=e.window.ecStat;s.registerTransform(i.transform.clustering)}},onUpdated(t){if(!t.dataset||!t.dataset.columns||!t.config)return;if(!this.isMatchRequirement(t.config)){this.chart?.clear();return}const e=this.getOptions(t.dataset,t.config);this.chart?.setOption(Object.assign({},e),true)},onUnMount(){this.chart?.dispose()},onResize(t,e){this.chart?.resize(e)},getOptions(t,s){const n=s.settings||[];s.datas||[];const a=t.rows?.map((t=>t?.map((t=>+t))));const[r]=i.getStyles(n,["cluster"],["clusterCount"]);var c=r||2;var l=2;var o=["#37A2DA","#e06343","#37a354","#b55dba","#b5bd48","#8378EA","#96BFFF"];var u=[];for(var d=0;d<r;d++)u.push({value:d,label:"cluster "+d,color:o[d]});const p={dataset:[{source:a||e},{transform:{type:"ecStat:clustering",config:{clusterCount:c,outputType:"single",outputClusterIndexDimension:l}}}],tooltip:{position:"top"},visualMap:{type:"piecewise",top:"middle",min:0,max:c,left:10,splitNumber:c,dimension:l,pieces:u},grid:{left:150},xAxis:{},yAxis:{},series:{type:"scatter",encode:{tooltip:[0,1]},symbolSize:15,itemStyle:{borderColor:"#555"},datasetIndex:1}};return p}}}return i})(); 2 | -------------------------------------------------------------------------------- /dist/datart-luckysheet.iife.js: -------------------------------------------------------------------------------- 1 | (function(){"use strict";const e={datas:[{label:"dimension",key:"dimension",required:true,type:"group",maxFieldCount:1},{label:"metrics",key:"metrics",required:true,type:"aggregate",maxFieldCount:1,actions:{NUMERIC:["aggregate","alias","format","colorRange"],STRING:["aggregate","alias","format","colorRange"]}},{label:"filter",key:"filter",type:"filter",allowSameField:true},{label:"size",key:"size",type:"size",maxFieldCount:1}],styles:[{label:"map.title",key:"map",comType:"group",rows:[{label:"map.level",key:"level",comType:"select",default:"china",options:{items:[{label:"中国-省级地图",value:"china"},{label:"中国-地市级地图",value:"china-city"}]}},{label:"map.theme",key:"theme",comType:"select",default:"light",options:{items:[{label:"明亮",value:"light"},{label:"黑暗",value:"dark"}]}},{label:"map.cycleRatio",key:"cycleRatio",comType:"slider",default:1,options:{items:[1,2,4,8]}}]},{label:"label.title",key:"label",comType:"group",rows:[{label:"label.showLabel",key:"showLabel",default:true,comType:"checkbox"},{label:"label.position",key:"position",comType:"select",default:"top",options:{items:[{label:"上",value:"top"},{label:"左",value:"left"},{label:"右",value:"right"},{label:"下",value:"bottom"},{label:"内",value:"inside"},{label:"内左",value:"insideLeft"},{label:"内右",value:"insideRight"},{label:"内上",value:"insideTop"},{label:"内下",value:"insideBottom"},{label:"内左上",value:"insideTopLeft"},{label:"内左下",value:"insideBottomLeft"},{label:"内右上",value:"insideTopRight"},{label:"内右下",value:"insideBottomRight"}]}},{label:"font",key:"font",comType:"font",default:{fontFamily:"PingFang SC",fontSize:"12",fontWeight:"normal",fontStyle:"normal",color:"black"}}]},{label:"viz.palette.style.visualMap.title",key:"visualMap",comType:"group",rows:[{label:"viz.palette.style.visualMap.show",key:"show",default:true,comType:"checkbox"},{label:"viz.palette.style.visualMap.orient",key:"orient",comType:"select",default:"vertical",options:{items:[{label:"竖直",value:"vertical"},{label:"水平",value:"horizontal"}]}},{label:"viz.palette.style.visualMap.align",key:"align",comType:"select",default:"auto",options:{items:[{label:"自动",value:"auto"},{label:"右",value:"right"},{label:"上",value:"top"},{label:"下",value:"bottom"},{label:"左",value:"left"}]}},{label:"viz.palette.style.visualMap.itemWidth",key:"itemWidth",default:20,comType:"inputNumber"},{label:"viz.palette.style.visualMap.itemHeight",key:"itemHeight",default:140,comType:"inputNumber"},{label:"font",key:"font",comType:"font",default:{fontFamily:"PingFang SC",fontSize:"12",fontWeight:"normal",fontStyle:"normal",color:"black"}}]}],i18ns:[{lang:"zh-CN",translation:{chartName:"Luckysheet Excel",common:{showAxis:"显示坐标轴",inverseAxis:"反转坐标轴",lineStyle:"线条样式",borderType:"边框线条类型",borderWidth:"边框线条宽度",borderColor:"边框线条颜色",backgroundColor:"背景颜色",showLabel:"显示标签",unitFont:"刻度字体",rotate:"旋转角度",position:"位置",showInterval:"显示刻度",interval:"刻度间隔",showTitleAndUnit:"显示标题和刻度",nameLocation:"标题位置",nameRotate:"标题旋转",nameGap:"标题与轴线距离",min:"最小值",max:"最大值"},label:{title:"标签",showLabel:"显示标签",position:"位置"},map:{title:"地图设置",level:"默认地图等级",enableZoom:"开启缩放",theme:"主题",cycleRatio:"气泡大像素比"},background:{title:"背景设置"}}},{lang:"en-US",translation:{chartName:"AMAP",common:{showAxis:"Show Axis",inverseAxis:"Inverse Axis",lineStyle:"Line Style",borderType:"Border Type",borderWidth:"Border Width",borderColor:"Border Color",backgroundColor:"Background Color",showLabel:"Show Label",unitFont:"Unit Font",rotate:"Rotate",position:"Position",showInterval:"Show Interval",interval:"Interval",showTitleAndUnit:"Show Title and Unit",nameLocation:"Name Location",nameRotate:"Name Rotate",nameGap:"Name Gap",min:"Min",max:"Max"},label:{title:"Label",showLabel:"Show Label",position:"Postion"},map:{title:"Setting",level:"Level",enableZoom:"Enable Zoom",theme:"Theme",cycleRatio:"Cycle Ratio"},background:{title:"Background Setting"}}}]};var t='<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="64px" height="64px" viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve"> <image id="image0" width="64" height="64" x="0" y="0"\n href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAABGdBTUEAALGPC/xhBQAAACBjSFJN\nAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABfVBMVEUAAAAugPkvgfktgPgt\nfvgtf/otf/ktfvgtfvctfvctf/gtgPdAgP8ugvougfougPktgPougPktgPkziP8ugPotgPotgPkt\nfvgtfvgufvkuf/kxhP8ugPotgPougPosf/ksfvgsfvgugPg5gP8tgPotgPougPktgfsugPougPot\nh/8ugPovgPozgP8tgPkxgP8tgfwugPotgPkvgfsugPougPozg/8tgPougvs3gP8tgPkugPn///+A\ngP8tgPkvgPkugfotgPpAgP8ugPstgPougPovgPktgPovgPstgPkugPsugPotgPkugPotgPktgPou\ngPkwgvosfvkugPotgPo1gP8vgPkugPkvgvktgPsugPktgPovgPs1hP8tgPkvgfotgPkugPougPk5\njv8ugfwugPotgPsvgP8ugPktgPktgfpVqv8tgPktgfwvgPpVgP8tgPougP8ugPotgPoxgvotgPou\ngPougPougPktgPktgPoui/8ugPktf/n///8DvKdEAAAAfXRSTlMAgHe6wLuBccbCjXwEN2OKqbe1\nD2Tz4d7n5c8foPfU8/Po2hKN+Lh375ERvGgo2ypJ8OdB+5sj7T0O1doBArRWX8oIdO7qg/k84kKQ\nh89a/uU18vydGFyzKz6EwHgdymeuoYsJTV5EJt+CZQPWT58GxRai/S+ejL6G1/ELtlt5DTMAAAAB\nYktHRDynamHPAAAAB3RJTUUH5gcfCDAmtcsrUAAAAp5JREFUWMPtlu1XEkEUh2+GmIigiKSsmCiI\ngqa5SaCspkZSpECallJqhYrv76Y2/3u8CO7MnWUZPtU5/b5w9t59njNnd/YO8Khi6kA3/wX3gscG\njdQbjcaGKgSGJxppNJlMTX+rwNxssba02moUtNlt7SQfh0rwtAOn0+l0GhAudbnIfbpVgo5nOD1u\nt7uXwfs8XlJOv7DA7BsgqgyKCvwBQmVIUDD8nObJiJhg9AXDj4GQQH7J8GRcSBB8xfIkJCIITyB+\nMiIgUKYQT6ZBQPAa8zMRAcGsAwtkEBDMYd4GAgL/G8RHJRHBW8TPx0BAoLxDAguICN4jPg5CAg/L\nf1DEBAs07lrkDdUKgnCC4pMp1Rdel099Yy6dPTgfi4KUGl9a/oSmpDE3fE1ONz85wYqKX/3MmdJ6\nAl+JTgS+cA8JPcFagfaup7/yDxloaMrF0MvPN4CNza3v9tgP+AcTTq341jYAfqYz2zuisCJ7Fgr7\nZxMgnf/djcvm6nF/tvz9bQFkSltwb786fHZONT+sANvli4PDahafoeafHWBHdXl0rPvkmPmdnzy7\nquuT08p8kDk/vPn9E1dXHMFKvMyeX+uFKlWaCGvzo+j8TOfL5iRVm1K0+GH2/CaJ4vezR1ezWm+f\n/f9ASKDY2T+gH4zE5c0BxJPS939Il8+4Ah/mV8vNI6p+fsHh+wYQv/Qwv45PqM4lR+DBC1hWtU+p\n/RnFL0LyIj5JzV96i4WQoAvxrhR9B7XJr1i+zYUEi+w9SvZhldds0474X5znJJ2d33dv2JaN5eP8\n/XpxGS20b9lN1E7j8xbQihK6ur65JXd0tZnmozHQyR2zQAvF/5b0eBSrCp+RhXGAljI+OR2pgYfW\nIj02HqoJz71FR3f/4NCIMPcHwF9SIaiLWngAAABEZVhJZk1NACoAAAAIAAGHaQAEAAAAAQAAABoA\nAAAAAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAECgAwAEAAAAAQAAAEAAAAAARlFCsAAAACV0RVh0\nZGF0ZTpjcmVhdGUAMjAyMi0wNy0zMVQwODo0ODozOCswMDowMNFtR7MAAAAldEVYdGRhdGU6bW9k\naWZ5ADIwMjItMDctMzFUMDg6NDg6MzgrMDA6MDCgMP8PAAAAEXRFWHRleGlmOkNvbG9yU3BhY2UA\nMQ+bAkkAAAASdEVYdGV4aWY6RXhpZk9mZnNldAAyNlMbomUAAAAXdEVYdGV4aWY6UGl4ZWxYRGlt\nZW5zaW9uADY0HLg2ZwAAABd0RVh0ZXhpZjpQaXhlbFlEaW1lbnNpb24ANjTBLu/iAAAAAElFTkSu\nQmCC" />\n</svg>';function l(l){l.dHelper;return{isISOContainer:"luckysheet-chart",chart:null,config:e,dependency:["https://cdn.jsdelivr.net/npm/luckysheet/dist/plugins/css/pluginsCss.css","https://cdn.jsdelivr.net/npm/luckysheet/dist/plugins/plugins.css","https://cdn.jsdelivr.net/npm/luckysheet/dist/css/luckysheet.css","https://cdn.jsdelivr.net/npm/luckysheet/dist/assets/iconfont/iconfont.css","https://cdn.jsdelivr.net/npm/luckysheet/dist/plugins/js/plugin.js","https://cdn.jsdelivr.net/npm/luckysheet/dist/luckysheet.umd.js"],geoMap:null,meta:{id:"experiment-luckysheet-chart",name:"chartName",icon:t,requirements:[{group:0,aggregate:0}]},onMount:function(e,t){if(void 0===e.containerId||!t.document)return;if(t.window.luckysheet)t.window.luckysheet.create({container:e.containerId})},onUpdated:function(e,t){if(!e.dataset||!e.dataset.columns||!e.config)return;if(!this.isMatchRequirement(e.config))return},onUnMount:function(){},onResize:function(e,t){}}}return l})(); 2 | -------------------------------------------------------------------------------- /dist/datart-scroll.iife.js: -------------------------------------------------------------------------------- 1 | (function(){"use strict";var e='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1644896851300" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1980" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M341.333333 640H42.666667V426.666667h298.666666z m341.333334 42.666667v256h245.333333a53.393333 53.393333 0 0 0 53.333333-53.333334v-202.666666z m0-42.666667h298.666666V426.666667h-298.666666z m298.666666-256V181.333333a53.393333 53.393333 0 0 0-53.333333-53.333333H96a53.393333 53.393333 0 0 0-53.333333 53.333333v202.666667z m-640 298.666667H42.666667v202.666666a53.393333 53.393333 0 0 0 53.333333 53.333334h245.333333z m42.666667 256h256v-256H384z m0-298.666667h256V426.666667H384z" p-id="1981"></path></svg>';function t({dHelper:t}){return{config:{datas:[{label:"mixed",key:"mixed",required:true,type:"mixed",limit:[1,999]},{label:"filter",key:"filter",type:"filter",disableAggregate:true}],styles:[{label:"marquee.title",key:"marquee",comType:"group",rows:[{label:"marquee.delayBeforeStart",key:"delayBeforeStart",default:1e3,comType:"inputNumber"},{label:"marquee.direction",key:"direction",default:"up",comType:"select",options:{items:[{label:"向上",value:"up"},{label:"向下",value:"down"},{label:"向左",value:"left"},{label:"向右",value:"right"}]}},{label:"marquee.duration",key:"duration",default:5e3,comType:"inputNumber"},{label:"marquee.gap",key:"gap",default:0,comType:"inputNumber"},{label:"marquee.pauseOnHover",key:"pauseOnHover",default:true,comType:"checkbox"},{label:"marquee.duplicated",key:"duplicated",default:true,comType:"checkbox"},{label:"marquee.startVisible",key:"startVisible",default:true,comType:"checkbox"}]}],settings:[{label:"viz.palette.setting.paging.title",key:"paging",comType:"group",rows:[{label:"viz.palette.setting.paging.pageSize",key:"pageSize",default:1e3,comType:"inputNumber",options:{needRefresh:true,step:1,min:0}}]}],i18ns:[{lang:"zh-CN",translation:{chartName:"[Experiment] 自定义Jquery滚动图表插件",marquee:{title:"滚动设置",delayBeforeStart:"开始延迟",direction:"运动方向",duration:"持续时间",gap:"间隙",pauseOnHover:"悬停时暂停",duplicated:"是否连续",startVisible:"是否在起点显示"},reference:{title:"参考线",open:"点击参考线配置"}}},{lang:"en-US",translation:{chartName:"[Experiment] Scroll The Chart",marquee:{title:"Scroll",delayBeforeStart:"Delay Before Start",direction:"Direction",duration:"Duration",gap:"Gap",pauseOnHover:"Pause On Hover",duplicated:"Duplicated",startVisible:"Start Visible"},reference:{title:"Reference",open:"Open"}}}]},isISOContainer:"demo-scroll-the-chart",dependency:["https://www.jeasyui.com/easyui/jquery.min.js","https://cdn.jsdelivr.net/npm/jquery.marquee@1.6.0/jquery.marquee.min.js","https://cdn.datatables.net/1.11.4/css/jquery.dataTables.css","https://cdn.datatables.net/1.11.4/js/jquery.dataTables.js"],meta:{id:"demo-scroll-the-chart",name:"chartName",icon:e,requirements:[{group:[0,999],aggregate:[0,999]}]},containerId:"",jQuery:null,tableBox:null,onMount(e,t){if("$"in t.window){const{marqueeOptions:a,dataTableOptions:r}=this.getMarqueeOptions(e.dataset,e.config);this.containerId=e.containerId;this.jQuery=t.window.$;this.chart=this.jQuery(`#${this.containerId}`);this.chart.width(t.width+"px");this.chart.html(`<table id="${this.containerId}-scroll-table" style='min-height: 100%; width: 100%;'></table>`);this.tableBox=this.jQuery(`#${this.containerId}-scroll-table`).dataTable(r);this.chart.marquee(a)}},onUpdated(e){if(!e.dataset||!e.dataset.columns||!e.config)return;if(!this.isMatchRequirement(e.config))return;this.chart.marquee("destroy");this.tableBox.fnClearTable();this.tableBox.fnDestroy();this.jQuery(`#${this.containerId}-scroll-table`).empty();const{marqueeOptions:t,dataTableOptions:a}=this.getMarqueeOptions(e.dataset,e.config);this.jQuery(`#${this.containerId}-scroll-table`).dataTable(Object.assign(a,{destroy:true}));this.jQuery(`#${this.containerId}-scroll-table thead`).remove();this.jQuery(`#${this.containerId}-scroll-table`).css({border:"none"});this.chart.marquee(t)},onUnMount(){this.tableBox.fnClearTable();this.tableBox.fnDestroy();this.jQuery(`#${this.containerId}-scroll-table`).empty();this.chart.marquee("destroy")},onResize(e,t){const{marqueeOptions:a}=this.getMarqueeOptions(e.dataset,e.config);this.chart.width(t.width+"px");this.chart.marquee("destroy");this.chart.marquee(a)},getMarqueeOptions(e,a){const r=a.styles;const i=a.datas||[];const s=i.filter((e=>"mixed"===e.key)).flatMap((e=>e.rows||[]));const l=t.transformToDataSet(e.rows,e.columns,i);const[n,o,u,d,c,h,p]=t.getStyles(r,["marquee"],["delayBeforeStart","direction","duration","gap","pauseOnHover","duplicated","startVisible"]);return{marqueeOptions:{delayBeforeStart:n||0,direction:o,duration:u||0,gap:d||0,pauseOnHover:c,duplicated:h,startVisible:p,pauseOnCycle:u||0},dataTableOptions:{data:l.map((e=>{const a={};s.forEach((r=>{a[t.getColumnRenderName(r)]=t.toFormattedValue(e.getCell(r),r.format)}));return a})),columns:s.map((e=>({data:t.getColumnRenderName(e)}))),cellBorder:true,autoWidth:true,paging:false,searching:false,ordering:false,info:false}}}}}return t})(); 2 | -------------------------------------------------------------------------------- /dist/datart-sovit-sample.iife.js: -------------------------------------------------------------------------------- 1 | (function(){"use strict";const e={datas:[{label:"dimension",key:"dimension",required:true,type:"group",maxFieldCount:1},{label:"metrics",key:"metrics",required:true,type:"aggregate",maxFieldCount:1,actions:{NUMERIC:["aggregate","alias","format","colorRange"],STRING:["aggregate","alias","format","colorRange"]}},{label:"filter",key:"filter",type:"filter",allowSameField:true},{label:"size",key:"size",type:"size",maxFieldCount:1}],styles:[{label:"map.title",key:"map",comType:"group",rows:[{label:"map.level",key:"level",comType:"select",default:"china",options:{items:[{label:"中国-省级地图",value:"china"},{label:"中国-地市级地图",value:"china-city"}]}},{label:"map.theme",key:"theme",comType:"select",default:"light",options:{items:[{label:"明亮",value:"light"},{label:"黑暗",value:"dark"}]}},{label:"map.cycleRatio",key:"cycleRatio",comType:"slider",default:1,options:{items:[1,2,4,8]}}]},{label:"label.title",key:"label",comType:"group",rows:[{label:"label.showLabel",key:"showLabel",default:true,comType:"checkbox"},{label:"label.position",key:"position",comType:"select",default:"top",options:{items:[{label:"上",value:"top"},{label:"左",value:"left"},{label:"右",value:"right"},{label:"下",value:"bottom"},{label:"内",value:"inside"},{label:"内左",value:"insideLeft"},{label:"内右",value:"insideRight"},{label:"内上",value:"insideTop"},{label:"内下",value:"insideBottom"},{label:"内左上",value:"insideTopLeft"},{label:"内左下",value:"insideBottomLeft"},{label:"内右上",value:"insideTopRight"},{label:"内右下",value:"insideBottomRight"}]}},{label:"font",key:"font",comType:"font",default:{fontFamily:"PingFang SC",fontSize:"12",fontWeight:"normal",fontStyle:"normal",color:"black"}}]},{label:"viz.palette.style.visualMap.title",key:"visualMap",comType:"group",rows:[{label:"viz.palette.style.visualMap.show",key:"show",default:true,comType:"checkbox"},{label:"viz.palette.style.visualMap.orient",key:"orient",comType:"select",default:"vertical",options:{items:[{label:"竖直",value:"vertical"},{label:"水平",value:"horizontal"}]}},{label:"viz.palette.style.visualMap.align",key:"align",comType:"select",default:"auto",options:{items:[{label:"自动",value:"auto"},{label:"右",value:"right"},{label:"上",value:"top"},{label:"下",value:"bottom"},{label:"左",value:"left"}]}},{label:"viz.palette.style.visualMap.itemWidth",key:"itemWidth",default:20,comType:"inputNumber"},{label:"viz.palette.style.visualMap.itemHeight",key:"itemHeight",default:140,comType:"inputNumber"},{label:"font",key:"font",comType:"font",default:{fontFamily:"PingFang SC",fontSize:"12",fontWeight:"normal",fontStyle:"normal",color:"black"}}]}],i18ns:[{lang:"zh-CN",translation:{chartName:"数维3D示例",common:{showAxis:"显示坐标轴",inverseAxis:"反转坐标轴",lineStyle:"线条样式",borderType:"边框线条类型",borderWidth:"边框线条宽度",borderColor:"边框线条颜色",backgroundColor:"背景颜色",showLabel:"显示标签",unitFont:"刻度字体",rotate:"旋转角度",position:"位置",showInterval:"显示刻度",interval:"刻度间隔",showTitleAndUnit:"显示标题和刻度",nameLocation:"标题位置",nameRotate:"标题旋转",nameGap:"标题与轴线距离",min:"最小值",max:"最大值"},label:{title:"标签",showLabel:"显示标签",position:"位置"},map:{title:"地图设置",level:"默认地图等级",enableZoom:"开启缩放",theme:"主题",cycleRatio:"气泡大像素比"},background:{title:"背景设置"}}},{lang:"en-US",translation:{chartName:"Sovit 3D Sample",common:{showAxis:"Show Axis",inverseAxis:"Inverse Axis",lineStyle:"Line Style",borderType:"Border Type",borderWidth:"Border Width",borderColor:"Border Color",backgroundColor:"Background Color",showLabel:"Show Label",unitFont:"Unit Font",rotate:"Rotate",position:"Position",showInterval:"Show Interval",interval:"Interval",showTitleAndUnit:"Show Title and Unit",nameLocation:"Name Location",nameRotate:"Name Rotate",nameGap:"Name Gap",min:"Min",max:"Max"},label:{title:"Label",showLabel:"Show Label",position:"Postion"},map:{title:"Setting",level:"Level",enableZoom:"Enable Zoom",theme:"Theme",cycleRatio:"Cycle Ratio"},background:{title:"Background Setting"}}}]};var t='<?xml version="1.0" standalone="no"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"\n "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">\n<svg version="1.0" xmlns="http://www.w3.org/2000/svg"\n width="378.000000pt" height="386.000000pt" viewBox="0 0 378.000000 386.000000"\n preserveAspectRatio="xMidYMid meet">\n\n<g transform="translate(0.000000,386.000000) scale(0.100000,-0.100000)"\nfill="#000000" stroke="none">\n<path d="M945 3409 c-506 -241 -924 -444 -929 -452 -5 -8 -7 -21 -4 -28 3 -8\n93 -56 199 -106 107 -51 522 -248 923 -438 401 -190 736 -345 745 -343 8 2 17\n11 19 20 2 12 -20 27 -85 58 -559 261 -1332 635 -1326 640 4 4 319 154 698\n334 380 181 700 334 713 342 22 14 22 18 22 202 0 192 -4 213 -39 211 -9 -1\n-430 -198 -936 -440z"/>\n<path d="M3565 2705 c-60 -30 -447 -215 -860 -412 -734 -351 -789 -380 -742\n-399 8 -3 64 18 123 47 247 118 1220 581 1232 586 9 4 12 -143 12 -713 l1\n-719 42 -20 c23 -11 117 -60 210 -108 l167 -88 0 921 c0 616 -3 928 -10 941\n-17 30 -55 22 -175 -36z"/>\n<path d="M24 2735 c-4 -9 -3 -20 2 -25 5 -4 395 -191 867 -416 l857 -408 0\n-733 c0 -403 -1 -733 -3 -733 -2 0 -377 178 -833 395 -456 218 -841 398 -856\n402 -37 7 -39 -7 -36 -210 l3 -168 870 -415 c478 -228 876 -413 885 -412 13 3\n15 105 15 956 l0 953 -860 410 c-473 225 -870 412 -882 415 -16 4 -25 1 -29\n-11z"/>\n</g>\n</svg>';function a(a){var l=a.dHelper;return{isISOContainer:"sovit-sample",chart:null,config:e,dependency:["https://admin.sovitjs.com/static/sovitjs/jquery-ui.css","https://admin.sovitjs.com/static/sovitjs/SovitChartPaser.min.js"],meta:{id:"experiment-sovit-smaple",name:"chartName",icon:t,requirements:[{group:1,aggregate:[1,2]}]},onMount:function(e,t){if(void 0===e.containerId||!t.document)return;if("SovitChartPaser"in t.window){var a=t.window.SovitChartPaser;var l=new a.SceneMain({apiurl:"https://admin.sovitjs.com/restapi",publishType:1});l.initChart(e.containerId,{pageId:"3221068859372994564"},(function(e,t,a){console.log("comId, eventType, reData ---\x3e ",e,t,a)}))}},onUpdated:function(e,t){var a,l,o;if(!e.dataset||!e.dataset.columns||!e.config)return;if(!this.isMatchRequirement(e.config)){null===(a=this.chart)||void 0===a?void 0:a.clear();return}null===(l=this.chart)||void 0===l?void 0:l.clear();var i=this.getOptions(e.dataset,e.config);null===(o=this.chart)||void 0===o?void 0:o.setOption(Object.assign({},i),true)},onUnMount:function(){var e;null===(e=this.chart)||void 0===e?void 0:e.dispose()},onResize:function(e,t){var a;null===(a=this.chart)||void 0===a?void 0:a.resize(t)},getOptions:function(e,t){var a=t.styles;var o=t.datas||[];o.filter((function(e){return"group"===e.type})).flatMap((function(e){return e.rows||[]}));o.filter((function(e){return"aggregate"===e.type})).flatMap((function(e){return e.rows||[]}));o.filter((function(e){return"size"===e.type})).flatMap((function(e){return e.rows||[]}));l.transformToDataSet(e.rows,e.columns,o);l.getValue(a,["map","theme"]);return null}}}return a})(); 2 | -------------------------------------------------------------------------------- /dist/datart-threejs-bingdundun.iife.js: -------------------------------------------------------------------------------- 1 | (function(){"use strict";var e='<?xml version="1.0" encoding="UTF-8"?>\n<svg version="1.1" viewBox="0 0 226.77 226.77" xmlns="http://www.w3.org/2000/svg">\n <g transform="translate(8.964 4.2527)">\n <path d="m63.02 200.61-43.213-174.94 173.23 49.874z"/>\n <path d="m106.39 50.612 21.591 87.496-86.567-24.945z"/>\n <path d="m84.91 125.03-10.724-43.465 43.008 12.346z"/>\n <path d="m63.458 38.153 10.724 43.465-43.008-12.346z"/>\n <path d="m149.47 62.93 10.724 43.465-43.008-12.346z"/>\n <path d="m84.915 125.06 10.724 43.465-43.008-12.346z"/>\n </g>\n</svg>';function t({dHelper:t}){return{config:{datas:[{label:"dimension",key:"dimension",required:true,type:"group"},{label:"metrics",key:"metrics",required:true,type:"aggregate"},{label:"filter",key:"filter",type:"filter",allowSameField:true},{label:"colorize",key:"color",type:"color"}],styles:[{label:"label.title",key:"label",comType:"group",rows:[{label:"label.text",key:"text",default:"datart",comType:"input"},{label:"label.fontLeft",key:"fontL",comType:"font",default:{fontFamily:"Lato",fontSize:200,fontWeight:"bolder",fontStyle:"normal",color:"#0ff"}},{label:"label.fontRight",key:"fontR",comType:"font",default:{fontFamily:"Lato",fontSize:200,fontWeight:"bolder",fontStyle:"normal",color:"#f0f"}}]}],i18ns:[{lang:"zh-CN",translation:{label:{title:"标签",text:"文本",fontLeft:"主字体",fontRight:"副字体"}}}]},isISOContainer:"experiment-threejs-bingdundun",dependency:["https://unpkg.com/three@0.131.3/build/three.min.js","https://unpkg.com/three@0.131.3/examples/js/libs/stats.min.js","https://unpkg.com/three@0.131.3/examples/js/loaders/GLTFLoader.js","https://unpkg.com/three@0.131.3/examples/js/controls/OrbitControls.js"],meta:{id:"experiment-threejs-bingdundun",name:"[Experiment] 冰墩墩",icon:e,requirements:[{group:null,aggregate:null}]},container:null,stats:null,clock:null,controls:null,camera:null,scene:null,renderer:null,mixer:null,mesh:null,meshes:[],window:null,loadingProcessTimeout:null,onMount(e,t){if(void 0===e.containerId||!t.document)return;const{THREE:n}=t.window;if(!n)return;this.window=t.window;this.container=t.document.getElementById(e.containerId);this.camera=new n.PerspectiveCamera(25,t.window.innerWidth/t.window.innerHeight,1,1e3);this.camera.position.set(0,30,100);this.scene=new n.Scene;this.clock=new n.Clock;const i=new n.LoadingManager;const r=new n.GLTFLoader(i);const s=e=>{e.scene.traverse((e=>{if(e.isMesh){this.meshes.push(e);if("皮肤"===e.name){e.material.metalness=.3;e.material.roughness=.8}if("外壳"===e.name){e.material.transparent=true;e.material.opacity=.4;e.material.metalness=.4;e.material.roughness=0;e.material.refractionRatio=1.6;e.castShadow=true;e.material.envMapIntensity=1}if("围脖"===e.name){e.material.transparent=true;e.material.opacity=.6;e.material.metalness=.4;e.material.roughness=.6}}}));e.scene.rotation.y=Math.PI/24;e.scene.position.set(0,0,0);e.scene.scale.set(16,16,16);this.scene.fog=new n.Fog(16777215,10,100);this.scene.add(e.scene)};r.load("https://unpkg.com/datart-extension-charts@0.0.1/plugins/datart-threejs-bingdundun/bingdundun.glb",s)},onUpdated(e,t){if(!e.dataset||!e.dataset.columns||!e.config)return;if(!this.isMatchRequirement(e.config)){this.chart.clear();return}const{THREE:n,Stats:i}=t.window;const r=new n.GridHelper(10,20,8947848,4473924);this.scene.add(r);const s=new n.AmbientLight(16777215,.2);this.scene.add(s);const a=new n.PointLight(16777215,.8);this.scene.add(this.camera);this.camera.add(a);this.renderer=new n.WebGLRenderer({antialias:true});this.renderer.outputEncoding=n.sRGBEncoding;this.renderer.shadowMap.enabled=true;this.renderer.setPixelRatio(window.devicePixelRatio);this.renderer.setSize(t.window.innerWidth,t.window.innerHeight);this.container.appendChild(this.renderer.domElement);this.controls=new n.OrbitControls(this.camera,this.renderer.domElement);this.controls.screenSpacePanning=true;this.controls.minDistance=5;this.controls.maxDistance=40;this.controls.target.set(0,2,0);this.controls.update();this.stats=new i;this.container.appendChild(this.stats.dom);this.animate(t.window)},onUnMount(){},onResize(e,t){this.camera.aspect=t.window.innerWidth/t.window.innerHeight;this.camera.updateProjectionMatrix();this.renderer.setSize(t.window.innerWidth,t.window.innerHeight)},animate(){this.window.requestAnimationFrame(this.animate.bind(this));this.render();this.stats.update()},render(){const e=this.clock.getDelta();if(!!this.mixer)this.mixer.update(e);this.renderer.render(this.scene,this.camera)}}}return t})(); 2 | -------------------------------------------------------------------------------- /dist/datart-threejs-webgl.iife.js: -------------------------------------------------------------------------------- 1 | (function(){"use strict";var e='<?xml version="1.0" encoding="UTF-8"?>\n<svg version="1.1" viewBox="0 0 226.77 226.77" xmlns="http://www.w3.org/2000/svg">\n <g transform="translate(8.964 4.2527)">\n <path d="m63.02 200.61-43.213-174.94 173.23 49.874z"/>\n <path d="m106.39 50.612 21.591 87.496-86.567-24.945z"/>\n <path d="m84.91 125.03-10.724-43.465 43.008 12.346z"/>\n <path d="m63.458 38.153 10.724 43.465-43.008-12.346z"/>\n <path d="m149.47 62.93 10.724 43.465-43.008-12.346z"/>\n <path d="m84.915 125.06 10.724 43.465-43.008-12.346z"/>\n </g>\n</svg>';function t({dHelper:t}){return{config:{datas:[{label:"dimension",key:"dimension",required:true,type:"group"},{label:"metrics",key:"metrics",required:true,type:"aggregate"},{label:"filter",key:"filter",type:"filter",allowSameField:true},{label:"colorize",key:"color",type:"color"}],styles:[{label:"label.title",key:"label",comType:"group",rows:[{label:"label.text",key:"text",default:"datart",comType:"input"},{label:"label.fontLeft",key:"fontL",comType:"font",default:{fontFamily:"Lato",fontSize:200,fontWeight:"bolder",fontStyle:"normal",color:"#0ff"}},{label:"label.fontRight",key:"fontR",comType:"font",default:{fontFamily:"Lato",fontSize:200,fontWeight:"bolder",fontStyle:"normal",color:"#f0f"}}]}],i18ns:[{lang:"zh-CN",translation:{label:{title:"标签",text:"文本",fontLeft:"主字体",fontRight:"副字体"}}}]},isISOContainer:"experiment-threejs-chart",dependency:["https://unpkg.com/three@0.131.3/build/three.min.js","https://unpkg.com/three@0.131.3/examples/js/libs/stats.min.js","https://unpkg.com/three@0.131.3/examples/js/loaders/ColladaLoader.js","https://unpkg.com/three@0.131.3/examples/js/controls/OrbitControls.js"],meta:{id:"experiment-threejs-chart",name:"[Experiment] ThreeJS",icon:e,requirements:[{group:null,aggregate:null}]},container:null,stats:null,clock:null,controls:null,camera:null,scene:null,renderer:null,mixer:null,mesh:null,window:null,onMount(e,t){if(void 0===e.containerId||!t.document)return;const{THREE:n}=t.window;if(!n)return;this.window=t.window;this.container=t.document.getElementById(e.containerId);this.camera=new n.PerspectiveCamera(25,t.window.innerWidth/t.window.innerHeight,1,1e3);this.camera.position.set(15,10,-15);this.scene=new n.Scene;this.clock=new n.Clock;const i=new n.ColladaLoader;const r=e=>{const t=e.scene;const i=t.animations;t.traverse((function(e){if(e.isSkinnedMesh)e.frustumCulled=false}));this.mixer=new n.AnimationMixer(t);this.mixer.clipAction(i[0]).play();this.scene.add(t)};i.load("https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/models/collada/stormtrooper/stormtrooper.dae",r)},onUpdated(e,t){if(!e.dataset||!e.dataset.columns||!e.config)return;if(!this.isMatchRequirement(e.config)){this.chart.clear();return}const{THREE:n,Stats:i}=t.window;const r=new n.GridHelper(10,20,8947848,4473924);this.scene.add(r);const o=new n.AmbientLight(16777215,.2);this.scene.add(o);const s=new n.PointLight(16777215,.8);this.scene.add(this.camera);this.camera.add(s);this.renderer=new n.WebGLRenderer({antialias:true});this.renderer.outputEncoding=n.sRGBEncoding;this.renderer.setPixelRatio(window.devicePixelRatio);this.renderer.setSize(t.window.innerWidth,t.window.innerHeight);this.container.appendChild(this.renderer.domElement);this.controls=new n.OrbitControls(this.camera,this.renderer.domElement);this.controls.screenSpacePanning=true;this.controls.minDistance=5;this.controls.maxDistance=40;this.controls.target.set(0,2,0);this.controls.update();this.stats=new i;this.container.appendChild(this.stats.dom);this.animate(t.window)},onUnMount(){},onResize(e,t){this.camera.aspect=t.window.innerWidth/t.window.innerHeight;this.camera.updateProjectionMatrix();this.renderer.setSize(t.window.innerWidth,t.window.innerHeight)},animate(){this.window.requestAnimationFrame(this.animate.bind(this));this.render();this.stats.update()},render(){const e=this.clock.getDelta();if(!!this.mixer)this.mixer.update(e);this.renderer.render(this.scene,this.camera)}}}return t})(); 2 | -------------------------------------------------------------------------------- /dist/datart-uml.iife.js: -------------------------------------------------------------------------------- 1 | (function(){"use strict";var e='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1639279995753" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5363" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M149.33 517.97h341.34v106.65h42.66V517.97h341.34v127.97h42.67V475.3h-384v-85.33h-42.67v85.33h-384v170.65h42.67V517.97z m85.34 170.65H21.33A21.33 21.33 0 0 0 0 709.94v170.67c0 11.775 9.544 21.33 21.33 21.33h213.34c11.776 0 21.33-9.555 21.33-21.33V709.95c0-11.777-9.564-21.33-21.33-21.33z m384 0H405.33A21.33 21.33 0 0 0 384 709.94v170.67c0 11.775 9.544 21.33 21.33 21.33h213.34c11.776 0 21.33-9.555 21.33-21.33V709.95c0-11.777-9.564-21.33-21.33-21.33z m384 0H789.33A21.33 21.33 0 0 0 768 709.94v170.67c0 11.775 9.544 21.33 21.33 21.33h213.34c11.776 0 21.33-9.555 21.33-21.33V709.95c0-11.777-9.564-21.33-21.33-21.33zM341.33 325.98h341.34c11.776 0 21.33-9.554 21.33-21.34V133.98a21.34 21.34 0 0 0-21.33-21.34H341.33A21.33 21.33 0 0 0 320 133.98v170.66c0 11.776 9.544 21.34 21.33 21.34z" p-id="5364"></path></svg>';function t({dHelper:t}){const n={code:`%%{config: { 'fontFamily': 'Menlo', 'fontSize': 12, 'fontWeight': 400} }%%\n %%{init: { 'logLevel': 'debug', 'theme': '' } }%%\n \n sequenceDiagram\n participant A as 项目主入口\n participant C as 图表管理器\n participant V as 可视化模块\n participant S as 后端服务\n \n A->>C: 初始化 Chart Manager\n C->>S: 请求插件图表路径集合\n S--\x3e>C: 返回插件图表路径集合\n Note right of S: 服务端将从'custom-chart-plugins'文件夹读取自定义组件\n loop 插件集合\n C->>S: 下载插件图表\n S--\x3e>C: 返回插件图表路文件\n C--\x3e>C: 检查及加载插件图表文件\n end\n C->>C: 加载默认图表集合\n C--\x3e>A: 完成图表初始化\n A->>V: 切换到可视化模块开始制作自定义图表\n V->>S: 保存制作完成的图表\n `,watermark:`Powered by Datart`};return{config:{datas:[],styles:[{label:"code.title",key:"code",comType:"group",rows:[{label:"code.area",key:"area",comType:"text",options:{}}]},{label:"watermark.title",key:"watermark",comType:"group",rows:[{label:"watermark.area",key:"area",comType:"text",options:{}}]}],settings:[],i18ns:[{lang:"zh-CN",translation:{code:{title:"代码设置",area:"编辑区"},watermark:{title:"水印设置",area:"编辑区"}}},{lang:"en",translation:{code:{title:"Code Setting",area:"Editor Block"},watermark:{title:"Watermark Setting",area:"Editor Block"}}}]},isISOContainer:"experiment-mermaid-uml-chart",dependency:["https://cdnjs.cloudflare.com/ajax/libs/mermaid/8.13.3/mermaid.min.js"],meta:{id:"experiment-mermaid-uml-chart",name:"[Experiment] Mermaid UML",icon:e,requirements:[{group:null,aggregate:null}]},_containerId:null,onMount(e,t){this._containerId=e.containerId;if("mermaid"in t.window){this.chart=t.window.mermaid.mermaidAPI;this.chart.initialize({startOnLoad:false})}},onUpdated(e,a){const r=e.config.styles;const i=t.getValue(r,["code","area"])||n.code;const o=t.getValue(r,["watermark","area"])||n.watermark;var s=a.document.getElementById(this._containerId);if(this.chart&&s){this.chart.render("theGraph",i,(function(e){s.style.position="relative";s.style.overflow="hidden";s.style.margin="20px";s.innerHTML=e}));this.addWatermark(s,o,a)}},onUnMount(){},onResize(e,t){},addWatermark(e,t,n){if(!t)return;const a=n.document.createElement("div");a.style.position="absolute";a.style.left="-50%";a.style.top="-50%";a.style.width="200%";a.style.height="200%";a.style.color="#f1f1f1";a.style["line-height"]="90px";a.style["z-index"]=1;a.style["font-size"]="18px";a.style["-webkit-transform"]="rotate(-45deg)";a.style["-webkit-transform"]="rotate(-45deg)";a.innerHTML=`\n <p>${Array(Math.ceil(1/t.length*2e3)).fill(`${t}`).join(Array(20).fill(" ").join(" "))}</p>\n `;e.appendChild(a)}}}return t})(); 2 | -------------------------------------------------------------------------------- /dist/datart-vue-carousel.iife.js: -------------------------------------------------------------------------------- 1 | (function(){"use strict";var t='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1647421818069" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2510" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" p-id="2511"></path><path d="M706.048 719.872h-389.12V292.864h389.12v427.008z m-330.752-57.856h272.384V350.72H375.296v311.296z" p-id="2512"></path><path d="M757.248 377.856h126.976v316.928h-126.976zM138.752 376.832h126.976v316.928H138.752z" p-id="2513"></path></svg>';function e({dHelper:e}){return{config:{datas:[{label:"dimension",key:"dimension",type:"group"},{label:"filter",key:"filter",type:"filter",allowSameField:true}],styles:[{label:"carousel.title",key:"carousel",comType:"group",rows:[{label:"carousel.interval",key:"interval",comType:"inputNumber",default:3e3,options:{min:0,step:1}}]}],settings:[{label:"viz.palette.setting.paging.title",key:"paging",comType:"group",rows:[{label:"viz.palette.setting.paging.pageSize",key:"pageSize",default:1e3,comType:"inputNumber",options:{needRefresh:true,step:1,min:0}}]}],i18ns:[{lang:"zh-CN",translation:{chartName:"[Experiment] 用户自定义Vue跑马灯",carousel:{title:"跑马灯",interval:"切换间隔(毫秒)"}}},{lang:"en-US",translation:{chartName:"[Experiment] Vue Carousel",carousel:{title:"Carousel",interval:"Interval(MS)"}}}]},isISOContainer:"demo-customize-line-chart",dependency:["https://cdn.jsdelivr.net/npm/vue@2.6.14"],meta:{id:"demo-vue-carousel",name:"chartName",icon:t,requirements:[{group:1}]},chartId:"vueCarousel",onMount(t,e){if("Vue"in e.window){e.document.getElementById(t.containerId).innerHTML=`<div id='${this.chartId}'></div>`;const i=e.window.Vue;this.chart=new i({el:`#${this.chartId}`,template:this.getTemplate(),data:{nowIndex:0,list:[],btnStyle:{display:"inline-block",margin:"0 20px",width:"10px",height:"10px",border:"1px solid #000",borderRadius:"50%"},actionBtnStyle:{display:"inline-block",margin:"0 20px",width:"10px",height:"10px",border:"1px solid #000",borderRadius:"50%",background:"#000"},setTime:3e3,timer:null},methods:{onClickBtn(t){this.nowIndex=t;this.initInterval()},initInterval(t=this.setTime){if(this.timer)clearInterval(this.timer);if(t)this.timer=setInterval((()=>{this.nowIndex+=1;if(this.nowIndex>=this.list.length)this.nowIndex=0}),t)},getImage(t){return t}},watch:{setTime:function(t){this.initInterval(t)},list:{handler:function(t){if(t.length){this.nowIndex=0;this.initInterval()}},deep:true}},mounted:function(){if(this.list.length)this.initInterval()}})}},onUpdated(t){if(!t.dataset||!t.dataset.columns||!t.config)return;const i=t.config.datas||[];const n=i.filter((t=>"group"===t.type)).flatMap((t=>t.rows||[]));const a=t.config.styles||[];const s=e.transformToDataSet(t.dataset.rows,t.dataset.columns,i);const[l]=e.getStyles(a,["carousel"],["interval"]);this.chart.$data.list=s.map((t=>t.getCell(n[0])));this.chart.$data.setTime=void 0!==l?l:3e3},onUnMount(){if(this.chart.$data.timer)clearInterval(this.chart.$data.timer);this.chart=null},onResize(){},getTemplate(){return`\n <div style='padding-top: 2.5%;'>\n <div\n v-if='list.length'\n v-show='index === nowIndex'\n v-for='(item, index) in list'\n style='text-align: center; height: 80%; width: 100%;'\n >\n <img :src='getImage(item)' style='max-height: 100%; max-width: 100%;' />\n </div>\n <div style='text-align: center; width: 100%; margin-top: 5%;'\n >\n <div\n v-if='list.length'\n v-for='(item, index) in list'\n :style='index === nowIndex ? actionBtnStyle : btnStyle'\n @click='onClickBtn(index)'\n />\n </div>\n </div>\n `}}}return e})(); 2 | -------------------------------------------------------------------------------- /dist/datart-vuejs.iife.js: -------------------------------------------------------------------------------- 1 | (function(){"use strict";var n='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1642129750527" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2648" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M777.8 128.6H624l-112 177.2-96-177.2H64L512 896 960 128.6h-182.2z m-602.4 64h107.6L512 589 740.8 192.6h107.6L512 769 175.4 192.6z" p-id="2649"></path></svg>';function e({dHelper:e}){const t=()=>`\n \`\`\`js\n import Chart from 'app/pages/ChartWorkbenchPage/models/Chart';\n import { getStyleValueByGroup } from 'app/utils/chart';\n import Config from './config';\n\n class VueJSChart extends Chart {\n constructor() {\n super('vue-chart', 'DEMO - VueJS Chart', 'star');\n }\n \n isISOContainer = 'vue-chart-container';\n config = Config;\n dependency = [\n 'https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js',\n 'https://cdn.jsdelivr.net/npm/vue-markdown@2.2.4/dist/vue-markdown.js',\n 'https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/4.0.0/github-markdown.min.css',\n ];\n chart: any = null;\n nodeId = 'vue';\n \n onMount(options, context): void {\n const node = context.document.createElement('div');\n node.setAttribute('id', this.nodeId);\n context.document.getElementById(options.containerId).appendChild(node);\n \n const Vue = context.window.Vue;\n Vue.use(context.window.VueMarkdown);\n this.chart = new Vue({\n el: \`#\${this.nodeId}\`,\n data: { vue: 'Hello', person: { name: 'Stephen' }, content: getCode() },\n template: this.getTemplate(),\n methods: {\n greet: function (event) {\n alert('Hello My Friends ~ this.me');\n },\n },\n });\n }\n \n onUpdated(options, context): void {\n if (!this.isMatchRequirement(options.config)) {\n return;\n }\n\n const name = this.getInfo(options?.config?.styles);\n this.chart.$set(this.chart.person, 'name', name);\n }\n \n onUnMount(): void {}\n \n private getInfo(styleConfigs) {\n const name = getStyleValueByGroup(styleConfigs, 'label', 'name');\n return name;\n }\n \n private getTemplate() {\n return \`\n <div class="markdown-body">\n <a-collapse :accordion="true" default-active-key="2" :bordered="false">\n <a-collapse-panel key="1" name="Welcom~">\n <p>{{ vue }} {{ person.name }} ,</p>\n <p>Welcome to VueJS Chart Demo ~ <button v-on:click="greet">Greet</button></p>\n </a-collapse-panel>\n <a-collapse-panel key="3" name="code bloks">\n <vue-markdown>\n {{content}}\n </vue-markdown>\n </a-collapse-panel>\n </a-collapse>\n </div>\n \`;\n }\n }\n \`\`\`\n `;return{config:{styles:[{label:"label",key:"label",comType:"group",rows:[{label:"name",key:"name",default:"Friends",comType:"input"},{label:"font",key:"font",comType:"font",default:{fontFamily:"PingFang SC",fontSize:"24",fontWeight:"normal",fontStyle:"normal",color:"yellow"}}]}],i18ns:[{lang:"zh-CN",translation:{label:"标签",name:"你的姓名"}},{lang:"en-US",translation:{label:"Label",name:"Your Name"}}]},isISOContainer:"experiment-vue-dynamic-chart",dependency:["https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js","https://cdn.jsdelivr.net/npm/vue-markdown@2.2.4/dist/vue-markdown.js","https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/4.0.0/github-markdown.min.css"],meta:{id:"experiment-vue-dynamic-chart",name:"[Experiment] VUEJS Chart",icon:n,requirements:[{group:null,aggregate:null}]},onMount(n,e){const o=e.document.createElement("div");o.setAttribute("id",this.nodeId);e.document.getElementById(n.containerId).appendChild(o);const a=e.window.Vue;a.use(e.window.VueMarkdown);this.chart=new a({el:`#${this.nodeId}`,data:{vue:"Hello",person:{name:"Stephen"},content:t()},template:this.getTemplate(),methods:{greet:function(n){alert("Hello My Friends ~ this.me")}}})},onUpdated(n,e){if(!this.isMatchRequirement(n.config))return;const t=this.getInfo(n?.config?.styles);this.chart.$set(this.chart.person,"name",t)},onUnMount(){},onResize(n,e){},getInfo(n){const t=e.getValue(n,["label","name"]);return t},getTemplate(){return`\n <div class="markdown-body">\n <a-collapse :accordion="true" default-active-key="2" :bordered="false">\n <a-collapse-panel key="1" name="Welcom~">\n <p>{{ vue }} {{ person.name }} ,</p>\n <p>Welcome to VueJS Chart Demo ~ <button v-on:click="greet">Greet</button></p>\n </a-collapse-panel>\n <a-collapse-panel key="3" name="code bloks">\n <vue-markdown>\n {{content}}\n </vue-markdown>\n </a-collapse-panel>\n </a-collapse>\n </div>\n `}}}return e})(); 2 | -------------------------------------------------------------------------------- /dist/datart-zrender.iife.js: -------------------------------------------------------------------------------- 1 | (function(){"use strict";function t({dHelper:t}){return{config:{datas:[{label:"dimension",key:"dimension",required:true,type:"group"},{label:"metrics",key:"metrics",required:true,type:"aggregate"},{label:"filter",key:"filter",type:"filter",allowSameField:true},{label:"colorize",key:"color",type:"color"}],styles:[{label:"label.title",key:"label",comType:"group",rows:[{label:"label.text",key:"text",default:"datart",comType:"input"},{label:"label.fontLeft",key:"fontL",comType:"font",default:{fontFamily:"Lato",fontSize:200,fontWeight:"bolder",fontStyle:"normal",color:"#0ff"}},{label:"label.fontRight",key:"fontR",comType:"font",default:{fontFamily:"Lato",fontSize:200,fontWeight:"bolder",fontStyle:"normal",color:"#f0f"}}]}],i18ns:[{lang:"zh-CN",translation:{label:{title:"标签",text:"文本",fontLeft:"主字体",fontRight:"副字体"}}}]},isISOContainer:"experiment-zrender-chart",dependency:["https://ecomfe.github.io/zrender-doc/public/lib/js/zrender.min.js"],meta:{id:"experiment-zrender-chart",name:"[Experiment] ZRender Chart",icon:"chart",requirements:[{group:null,aggregate:null}]},onMount(t,e){if(void 0===t.containerId||!e.document)return;const{zrender:n}=e.window;if(!n)return;this.chart=n.init(e.document.getElementById(t.containerId));this.mouseEvents.forEach((t=>{this.chart.on(t.name,t.callback)}))},onUpdated(t,e){if(!t.dataset||!t.dataset.columns||!t.config)return;if(!this.isMatchRequirement(t.config)){this.chart.clear();return}this.draw(e,t.config.styles)},onUnMount(){this.chart&&this.chart.dispose()},onResize(t,e){this.draw(e,t?.config?.styles)},draw(t,e){const{text:n,fontL:i,fontR:o}=this.getText(e);const{zrender:r}=t.window;const a=this.chart;var l=t.width||a.getWidth();var f=t.height||a.getHeight();a.clear();a.resize({width:l,height:f});var h=new r.Rect({style:{fill:"#333"},shape:{width:l,height:f}});a.add(h);var d=new r.Text({style:{text:n,textAlign:"center",textVerticalAlign:"middle",fontSize:i.fontSize,fontFamily:i.fontFamily,fontWeight:i.fontWight,textFill:i.color,blend:"lighten"},position:[l/2+5,f/2]});a.add(d);var s=new r.Text({style:{text:n,textAlign:"center",textVerticalAlign:"middle",fontSize:o.fontSize,fontFamily:o.fontFamily,fontWeight:o.fontWight,textFill:o.color,blend:"lighten"},position:[l/2,f/2]});a.add(s);var c=[];for(var m=0;m<16;++m){var g=new r.Rect({shape:{x:l*(Math.random()-.3),y:f*Math.random(),width:l*(Math.random()+.3),height:8*Math.random()},style:{fill:["#ff0","#f0f","#0ff","#00f"][Math.floor(4*Math.random())],blend:"lighten",opacity:0}});a.add(g);c.push(g)}if(this.timerId)t.window.clearInterval(this.timerId);this.timerId=setInterval((function(){if(Math.random()>.2){s.attr("position",[l/2+50*Math.random(),f/2]);for(var t=0;t<c.length;++t){c[t].attr("shape",{x:l*Math.random(),y:f*Math.random(),width:l*Math.random(),height:8*Math.random()});c[t].attr("style",{opacity:1})}setTimeout((function(){s.attr("position",[l/2,f/2]);for(var t=0;t<c.length;++t)c[t].attr("style",{opacity:0})}),100)}}),500)},getText(e){if(e){const[n,i,o]=t.getStyles(e,["label"],["text","fontL","fontR"]);this.textObj={text:n,fontL:i,fontR:o}}return this.textObj}}}return t})(); 2 | -------------------------------------------------------------------------------- /docs/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contribute Guidelines 2 | 3 | -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- 1 | declare module "*.svg" { 2 | const content: any; 3 | export default content; 4 | } 5 | -------------------------------------------------------------------------------- /legacy-custom-chart-plugins/demo-d3js-scatter-chart.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | function D3JSScatterChart({ dHelper }) { 20 | return { 21 | //【可选】扩展配置图表功能,可配合`数据视图`对数据处理 22 | config: { 23 | datas: [ 24 | { 25 | label: "dimension", 26 | key: "dimension", 27 | required: false, 28 | type: "group", 29 | }, 30 | { 31 | label: "metrics", 32 | key: "metrics", 33 | required: true, 34 | type: "aggregate", 35 | }, 36 | ], 37 | styles: [ 38 | { 39 | label: "common.title", 40 | key: "scatter", 41 | comType: "group", 42 | rows: [ 43 | { 44 | label: "common.color", 45 | key: "color", 46 | comType: "fontColor", 47 | }, 48 | ], 49 | }, 50 | ], 51 | i18ns: [ 52 | { 53 | lang: "zh-CN", 54 | translation: { 55 | common: { 56 | title: "散点图配置", 57 | color: "气泡颜色", 58 | }, 59 | }, 60 | }, 61 | { 62 | lang: "en", 63 | translation: { 64 | common: { 65 | title: "Scatter Setting", 66 | color: "Bubble Color", 67 | }, 68 | }, 69 | }, 70 | ], 71 | }, 72 | 73 | isISOContainer: "demo-d3js-scatter-chart", 74 | 75 | //【必须】加载D3JS绘图引擎,此处需给出CDN链接或者服务端相对资源地址即可 76 | dependency: ["https://d3js.org/d3.v5.min.js"], 77 | 78 | //【必须】设置图表的基本信息,icon可从Datart Icon图标中选取,暂时不支持自定义 79 | meta: { 80 | id: "demo-d3js-scatter-chart", 81 | name: "[Plugin Demo] D3JS 散点图", 82 | icon: "sandiantu", 83 | requirements: [ 84 | { 85 | group: [0, 999], 86 | aggregate: 2, 87 | }, 88 | ], 89 | }, 90 | 91 | //【必须】Datart提供的生命周期函数,其他周期如onUpdated,onResize以及onUnMount 92 | onMount(options, context) { 93 | if (!context.document) { 94 | return; 95 | } 96 | 97 | const host = context.document.getElementById(options.containerId); 98 | var margin = { top: 10, right: 40, bottom: 30, left: 30 }, 99 | width = context.width - margin.left - margin.right, 100 | height = context.height - margin.top - margin.bottom; 101 | 102 | // 初始化D3JS绘图区域 103 | this.chart = context.window.d3 104 | .select(host) 105 | .append("svg") 106 | .attr("width", width + margin.left + margin.right) 107 | .attr("height", height + margin.top + margin.bottom) 108 | .append("g") 109 | .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); 110 | }, 111 | 112 | onUpdated(options, context) { 113 | if (!options.dataset || !options.dataset.columns || !options.config) { 114 | return; 115 | } 116 | 117 | // 获取当前绘图区域的宽高 118 | const clientWidth = context.window.innerWidth; 119 | const clientHeight = context.window.innerHeight; 120 | const margin = { top: 40, right: 40, bottom: 40, left: 40 }; 121 | const width = clientWidth - margin.left - margin.right; 122 | const height = clientHeight - margin.top - margin.bottom; 123 | 124 | // 获取散点图数据及配置 125 | const { data, style } = this.getOptions(options.dataset, options.config); 126 | 127 | // 绘制基于百分比的横纵坐标轴散点图, 以下是D3JS绘图逻辑 128 | var x = context.window.d3 129 | .scaleLinear() 130 | .domain([0, 100]) // This is the min and the max of the data: 0 to 100 if percentages 131 | .range([0, width]); // This is the corresponding value I want in Pixel 132 | 133 | this.chart 134 | .append("g") 135 | .attr("transform", "translate(0," + height + ")") 136 | .call(context.window.d3.axisBottom(x)); 137 | 138 | // X scale and Axis 139 | var y = context.window.d3 140 | .scaleLinear() 141 | .domain([0, 100]) // This is the min and the max of the data: 0 to 100 if percentages 142 | .range([height, 0]); // This is the corresponding value I want in Pixel 143 | 144 | this.chart.append("g").call(context.window.d3.axisLeft(y)); 145 | 146 | // Add 3 dots for 0, 50 and 100% 147 | this.chart 148 | .selectAll("whatever") 149 | .data(data) 150 | .enter() 151 | .append("circle") 152 | .attr("cx", function (d) { 153 | return x(d.x); 154 | }) 155 | .attr("cy", function (d) { 156 | return y(d.y); 157 | }) 158 | .style("fill", style.color) 159 | .attr("r", 7); 160 | 161 | this.chart.selectAll("whatever").style("color", "blue"); 162 | }, 163 | 164 | getOptions(dataset, config) { 165 | // 当前服务端返回的图表数据集 166 | const dataConfigs = config.datas || []; 167 | 168 | // 获取样式配置信息 169 | const styleConfigs = config.styles; 170 | const groupConfigs = dataConfigs 171 | .filter((c) => c.type === "group") 172 | .flatMap((config) => config.rows || []); 173 | 174 | // 获取指标类型配置信息 175 | const aggregateConfigs = dataConfigs 176 | .filter((c) => c.type === "aggregate") 177 | .flatMap((config) => config.rows || []); 178 | 179 | // 数据转换,根据Datart提供了Helper转换工具 180 | const objDataColumns = dHelper.transformToObjectArray( 181 | dataset.rows, 182 | dataset.columns 183 | ); 184 | const data = objDataColumns.map((dc) => { 185 | return { 186 | x: dc[dHelper.getValueByColumnKey(aggregateConfigs[0])], 187 | y: dc[dHelper.getValueByColumnKey(aggregateConfigs[1])], 188 | }; 189 | }); 190 | 191 | var xMinValue = Math.min(...data.map((o) => o.x)); 192 | var xMaxValue = Math.max(...data.map((o) => o.y)); 193 | 194 | var yMinValue = Math.min(...data.map((o) => o.y)); 195 | var yMaxValue = Math.max(...data.map((o) => o.y)); 196 | 197 | // 获取用户配置 198 | const color = dHelper.getStyleValueByGroup( 199 | styleConfigs, 200 | "scatter", 201 | "color" 202 | ); 203 | 204 | return { 205 | style: { 206 | color, 207 | }, 208 | data: data.map((d) => { 209 | return { 210 | x: ((d.x || xMinValue - xMinValue) * 100) / (xMaxValue - xMinValue), 211 | y: ((d.y || yMinValue - yMinValue) * 100) / (yMaxValue - yMinValue), 212 | }; 213 | }), 214 | }; 215 | }, 216 | 217 | onUnMount() {}, 218 | }; 219 | } 220 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "datart-extension-charts", 3 | "version": "0.0.1", 4 | "description": "Datart Extension Charts", 5 | "repository": { 6 | "type": "git", 7 | "url": "git+https://github.com/Cuiyansong/datart-extension-charts-fork.git" 8 | }, 9 | "author": "Stephen Cui", 10 | "license": "Apache-2.0", 11 | "bugs": { 12 | "url": "https://github.com/Cuiyansong/datart-extension-charts-fork/issues" 13 | }, 14 | "homepage": "https://github.com/Cuiyansong/datart-extension-charts-fork#readme", 15 | "scripts": { 16 | "build": "rollup -c", 17 | "build:watch": "rollup -c -w" 18 | }, 19 | "devDependencies": { 20 | "@rollup/plugin-json": "^4.1.0", 21 | "@rollup/plugin-node-resolve": "^13.3.0", 22 | "@rollup/plugin-typescript": "^8.3.0", 23 | "commitizen": "^4.2.4", 24 | "cz-conventional-changelog": "3.3.0", 25 | "rollup": "^2.60.2", 26 | "rollup-plugin-progress": "^1.1.2", 27 | "rollup-plugin-svg": "^2.0.0", 28 | "rollup-plugin-terser": "^7.0.2", 29 | "tslib": "^2.3.1", 30 | "typescript": "^4.2.2" 31 | }, 32 | "config": { 33 | "commitizen": { 34 | "path": "./node_modules/cz-conventional-changelog" 35 | } 36 | }, 37 | "dependencies": { 38 | "three": "^0.135.0", 39 | "three-mesh-bvh": "^0.5.22", 40 | "web-ifc-three": "^0.0.121" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /plugins/datart-3d-map/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] 3D地图 插件图表 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ## 使用说明 7 | ![AntVGG](./experiment-3d-map-chart.png) 8 | 9 | ### 数据区域配置 10 | 11 | - 维度: 地理信息数据字段 12 | - 指标: 根据指标决定【视觉映射】颜色深浅 13 | - 大小: 根据指标决定气泡大小,并且可以在样式配置区域更改相对半径值 14 | - 过滤: 过滤不需要的数据,可以是维度条件,也可以是指标条件 15 | 16 | ### 样式区域配置 17 | - 可切换`省级`和`地市级`,对应`维度`区域的地区设置,**目前可能没有那么完善,基于内置的区域名称和维度值名称匹配** 18 | 19 | -------------------------------------------------------------------------------- /plugins/datart-3d-map/experiment-3d-map-chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-3d-map/experiment-3d-map-chart.png -------------------------------------------------------------------------------- /plugins/datart-3d-map/gaode-map-logo.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1641525830160" class="icon" fill="#333333" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2461" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M748.416 313.088V312.96a3.456 3.456 0 0 0-0.448-0.832c-1.088-1.408-3.84-1.216-6.144 0.512l-7.68 6.016-1.408 1.216-36.608 28.16h18.24l15.616-14.72 2.752-2.624 10.88-10.304c0.384-0.256 0.512-0.704 0.768-1.024l1.728-1.344c1.472-1.28 2.432-2.88 2.496-4.224-0.064-0.256-0.064-0.512-0.192-0.704z m0 0V312.96a3.456 3.456 0 0 0-0.448-0.832c-1.088-1.408-3.84-1.216-6.144 0.512l-7.68 6.016-1.408 1.216-36.608 28.16h18.24l15.616-14.72 2.752-2.624 10.88-10.304c0.384-0.256 0.512-0.704 0.768-1.024l1.728-1.344c1.472-1.28 2.432-2.88 2.496-4.224-0.064-0.256-0.064-0.512-0.192-0.704z m-9.6-93.376l-6.144 2.816-65.28 29.952-6.144 2.816-188.608 86.592-13.312 6.144-142.144 65.216-13.248 6.08-225.984 103.808 220.096 136 45.376 182.976 83.712-107.008 234.176 151.616 6.144 4.032 47.744 30.848 17.472-67.008 6.144-23.616 106.944-411.648 1.6-6.144 16.96-65.216 1.536-6.144 53.184-204.992-180.224 82.88z m-344.32 422.656v0.128h-0.064l-29.824 86.272-8.064-110.144 246.272-190.016 19.904-15.36 32.064-24.768 12.608-9.792 25.472-19.648-25.472 24.128-15.36 14.656-16.256 15.424-20.352 19.2-219.584 208.192a4.224 4.224 0 0 0-1.344 1.728z m385.472-229.12l-1.664 6.08-39.488 152.192-6.144 23.616-57.856 222.656-7.36-4.608-6.144-4.032-261.312-163.264 0.512-0.384 224.768-212.928 20.352-19.392 6.336-6.016 15.488-14.656 38.848-36.928 8-7.552 15.616-14.72 2.752-2.624 10.88-10.304c0.384-0.256 0.512-0.704 0.768-1.024l1.728-1.344c1.472-1.28 2.432-2.88 2.496-4.224 0-0.256 0-0.512-0.128-0.704V312.96a3.456 3.456 0 0 0-0.448-0.832c-1.088-1.408-3.84-1.216-6.144 0.512l-7.68 6.016-1.408 1.216-36.608 28.16-6.976 5.376-21.632 16.704-12.416 9.6-43.52 33.536-19.456 14.976L351.424 614.016c-0.32 0.128-0.576 0.64-0.896 0.896L215.744 531.584l244.416-112.256 13.312-6.144 142.08-65.216 13.248-6.144 32.512-14.848 6.144-2.816 65.28-30.016 6.144-2.752 82.624-38.016-22.976 88.448-1.472 6.144-17.088 65.28z m-31.552-100.16V312.96a3.456 3.456 0 0 0-0.448-0.832c-1.088-1.408-3.84-1.216-6.144 0.512l-7.68 6.016-1.408 1.216-36.608 28.16h18.24l15.616-14.72 2.752-2.624 10.88-10.304c0.384-0.256 0.512-0.704 0.768-1.024l1.728-1.344c1.472-1.28 2.432-2.88 2.496-4.224-0.064-0.256-0.064-0.512-0.192-0.704z m0 0V312.96a3.456 3.456 0 0 0-0.448-0.832c-1.088-1.408-3.84-1.216-6.144 0.512l-7.68 6.016-1.408 1.216-36.608 28.16h18.24l15.616-14.72 2.752-2.624 10.88-10.304c0.384-0.256 0.512-0.704 0.768-1.024l1.728-1.344c1.472-1.28 2.432-2.88 2.496-4.224-0.064-0.256-0.064-0.512-0.192-0.704zM740.8 44.544v161.664l-65.216 30.016V44.544c0-22.336 14.592-40.512 32.576-40.512a29.44 29.44 0 0 1 23.104 11.904 45.504 45.504 0 0 1 9.536 28.608z" p-id="2462"></path><path d="M740.8 870.848v108.608c0 22.272-14.592 40.512-32.64 40.512a29.568 29.568 0 0 1-22.976-11.904 45.888 45.888 0 0 1-9.536-28.608v-72.384l47.744 30.848 17.408-67.072zM1024.064 380.672c0 8.96-4.48 17.152-11.776 23.04a45.888 45.888 0 0 1-28.608 9.472h-120l16.96-65.216h103.04c22.336 0.064 40.384 14.72 40.384 32.704zM434.88 348.032L292.736 413.248H40.576c-22.4 0-40.512-14.592-40.512-32.576 0-9.024 4.544-17.152 11.84-23.04a46.08 46.08 0 0 1 28.672-9.6h394.304z" p-id="2463"></path></svg> -------------------------------------------------------------------------------- /plugins/datart-3d-map/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { mapChart } from "./experiment-3d-map-chart"; 20 | 21 | export default mapChart; 22 | -------------------------------------------------------------------------------- /plugins/datart-amap/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] 高德地图 插件图表 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | __Note: 请将文件`experiment-amap-chart.js`中的高德地图Key换成自己注册的使用, 该Key仅仅作为临时样例使用。__ 7 | 8 | ## 使用说明 9 | 10 | ### 数据区域配置 11 | 12 | - 维度: 地理信息数据字段 13 | - 指标: 根据指标决定【视觉映射】颜色深浅 14 | - 大小: 根据指标决定气泡大小,并且可以在样式配置区域更改相对半径值 15 | - 过滤: 过滤不需要的数据,可以是维度条件,也可以是指标条件 16 | 17 | ### 样式区域配置 18 | - 可切换`省级`和`地市级`,对应`维度`区域的地区设置,**目前可能没有那么完善,基于内置的区域名称和维度值名称匹配** 19 | 20 | -------------------------------------------------------------------------------- /plugins/datart-amap/gaode-map-logo.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1641525830160" class="icon" fill="#333333" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2461" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M748.416 313.088V312.96a3.456 3.456 0 0 0-0.448-0.832c-1.088-1.408-3.84-1.216-6.144 0.512l-7.68 6.016-1.408 1.216-36.608 28.16h18.24l15.616-14.72 2.752-2.624 10.88-10.304c0.384-0.256 0.512-0.704 0.768-1.024l1.728-1.344c1.472-1.28 2.432-2.88 2.496-4.224-0.064-0.256-0.064-0.512-0.192-0.704z m0 0V312.96a3.456 3.456 0 0 0-0.448-0.832c-1.088-1.408-3.84-1.216-6.144 0.512l-7.68 6.016-1.408 1.216-36.608 28.16h18.24l15.616-14.72 2.752-2.624 10.88-10.304c0.384-0.256 0.512-0.704 0.768-1.024l1.728-1.344c1.472-1.28 2.432-2.88 2.496-4.224-0.064-0.256-0.064-0.512-0.192-0.704z m-9.6-93.376l-6.144 2.816-65.28 29.952-6.144 2.816-188.608 86.592-13.312 6.144-142.144 65.216-13.248 6.08-225.984 103.808 220.096 136 45.376 182.976 83.712-107.008 234.176 151.616 6.144 4.032 47.744 30.848 17.472-67.008 6.144-23.616 106.944-411.648 1.6-6.144 16.96-65.216 1.536-6.144 53.184-204.992-180.224 82.88z m-344.32 422.656v0.128h-0.064l-29.824 86.272-8.064-110.144 246.272-190.016 19.904-15.36 32.064-24.768 12.608-9.792 25.472-19.648-25.472 24.128-15.36 14.656-16.256 15.424-20.352 19.2-219.584 208.192a4.224 4.224 0 0 0-1.344 1.728z m385.472-229.12l-1.664 6.08-39.488 152.192-6.144 23.616-57.856 222.656-7.36-4.608-6.144-4.032-261.312-163.264 0.512-0.384 224.768-212.928 20.352-19.392 6.336-6.016 15.488-14.656 38.848-36.928 8-7.552 15.616-14.72 2.752-2.624 10.88-10.304c0.384-0.256 0.512-0.704 0.768-1.024l1.728-1.344c1.472-1.28 2.432-2.88 2.496-4.224 0-0.256 0-0.512-0.128-0.704V312.96a3.456 3.456 0 0 0-0.448-0.832c-1.088-1.408-3.84-1.216-6.144 0.512l-7.68 6.016-1.408 1.216-36.608 28.16-6.976 5.376-21.632 16.704-12.416 9.6-43.52 33.536-19.456 14.976L351.424 614.016c-0.32 0.128-0.576 0.64-0.896 0.896L215.744 531.584l244.416-112.256 13.312-6.144 142.08-65.216 13.248-6.144 32.512-14.848 6.144-2.816 65.28-30.016 6.144-2.752 82.624-38.016-22.976 88.448-1.472 6.144-17.088 65.28z m-31.552-100.16V312.96a3.456 3.456 0 0 0-0.448-0.832c-1.088-1.408-3.84-1.216-6.144 0.512l-7.68 6.016-1.408 1.216-36.608 28.16h18.24l15.616-14.72 2.752-2.624 10.88-10.304c0.384-0.256 0.512-0.704 0.768-1.024l1.728-1.344c1.472-1.28 2.432-2.88 2.496-4.224-0.064-0.256-0.064-0.512-0.192-0.704z m0 0V312.96a3.456 3.456 0 0 0-0.448-0.832c-1.088-1.408-3.84-1.216-6.144 0.512l-7.68 6.016-1.408 1.216-36.608 28.16h18.24l15.616-14.72 2.752-2.624 10.88-10.304c0.384-0.256 0.512-0.704 0.768-1.024l1.728-1.344c1.472-1.28 2.432-2.88 2.496-4.224-0.064-0.256-0.064-0.512-0.192-0.704zM740.8 44.544v161.664l-65.216 30.016V44.544c0-22.336 14.592-40.512 32.576-40.512a29.44 29.44 0 0 1 23.104 11.904 45.504 45.504 0 0 1 9.536 28.608z" p-id="2462"></path><path d="M740.8 870.848v108.608c0 22.272-14.592 40.512-32.64 40.512a29.568 29.568 0 0 1-22.976-11.904 45.888 45.888 0 0 1-9.536-28.608v-72.384l47.744 30.848 17.408-67.072zM1024.064 380.672c0 8.96-4.48 17.152-11.776 23.04a45.888 45.888 0 0 1-28.608 9.472h-120l16.96-65.216h103.04c22.336 0.064 40.384 14.72 40.384 32.704zM434.88 348.032L292.736 413.248H40.576c-22.4 0-40.512-14.592-40.512-32.576 0-9.024 4.544-17.152 11.84-23.04a46.08 46.08 0 0 1 28.672-9.6h394.304z" p-id="2463"></path></svg> -------------------------------------------------------------------------------- /plugins/datart-amap/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { GaodeMapChart } from "./experiment-amap-chart"; 20 | 21 | export default GaodeMapChart; 22 | -------------------------------------------------------------------------------- /plugins/datart-antd-react/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] 基于Ant Design React组件的图表 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ## 使用说明 7 | 8 | ![Ant Design Table](./antd-react-table-plugin-chart.png) -------------------------------------------------------------------------------- /plugins/datart-antd-react/antd-react-table-plugin-chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-antd-react/antd-react-table-plugin-chart.png -------------------------------------------------------------------------------- /plugins/datart-antd-react/experiment-antd-react-chart.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | export function AntDesignChart({ dHelper }) { 20 | const icon = 21 | "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0xMS41IC0xMC4yMzE3NCAyMyAyMC40NjM0OCI+CiAgPHRpdGxlPlJlYWN0IExvZ288L3RpdGxlPgogIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIyLjA1IiBmaWxsPSIjNjFkYWZiIi8+CiAgPGcgc3Ryb2tlPSIjNjFkYWZiIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiPgogICAgPGVsbGlwc2Ugcng9IjExIiByeT0iNC4yIi8+CiAgICA8ZWxsaXBzZSByeD0iMTEiIHJ5PSI0LjIiIHRyYW5zZm9ybT0icm90YXRlKDYwKSIvPgogICAgPGVsbGlwc2Ugcng9IjExIiByeT0iNC4yIiB0cmFuc2Zvcm09InJvdGF0ZSgxMjApIi8+CiAgPC9nPgo8L3N2Zz4K"; 22 | 23 | return { 24 | config: { 25 | datas: [], 26 | styles: [ 27 | { 28 | label: "code.title", 29 | key: "code", 30 | comType: "group", 31 | rows: [ 32 | { 33 | label: "code.area", 34 | key: "area", 35 | comType: "text", 36 | options: {}, 37 | }, 38 | ], 39 | }, 40 | { 41 | label: "watermark.title", 42 | key: "watermark", 43 | comType: "group", 44 | rows: [ 45 | { 46 | label: "watermark.area", 47 | key: "area", 48 | comType: "text", 49 | options: {}, 50 | }, 51 | ], 52 | }, 53 | ], 54 | settings: [], 55 | i18ns: [ 56 | { 57 | lang: "zh-CN", 58 | translation: { 59 | code: { 60 | title: "代码设置", 61 | area: "编辑区", 62 | }, 63 | watermark: { 64 | title: "水印设置", 65 | area: "编辑区", 66 | }, 67 | }, 68 | }, 69 | { 70 | lang: "en", 71 | translation: { 72 | code: { 73 | title: "Code Setting", 74 | area: "Editor Block", 75 | }, 76 | watermark: { 77 | title: "Watermark Setting", 78 | area: "Editor Block", 79 | }, 80 | }, 81 | }, 82 | ], 83 | }, 84 | _containerId: null, 85 | isISOContainer: "experiment-antd-react-chart", 86 | dependency: [ 87 | "https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.production.min.js", 88 | "https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js", 89 | "https://cdnjs.cloudflare.com/ajax/libs/antd/4.24.1/antd.min.js", 90 | "https://cdnjs.cloudflare.com/ajax/libs/antd/4.24.1/antd.min.css", 91 | ], 92 | meta: { 93 | id: "experiment-antd-react-chart", 94 | name: "[Experiment] Ant Design React", 95 | icon: "chart", 96 | }, 97 | _ReactDom: null, 98 | _React: null, 99 | 100 | onMount(options, context) { 101 | this._containerId = options.containerId; 102 | if ("React" in context.window && "ReactDOM" in context.window) { 103 | this._ReactDOM = context.window.ReactDOM; 104 | this._React = context.window.React; 105 | const root = this._ReactDOM.createRoot( 106 | context.document.getElementById(options.containerId) 107 | ); 108 | root.render(this.buildComponent(context.window)); 109 | } 110 | }, 111 | 112 | onUpdated(options, context) { 113 | const styles = options.config.styles; 114 | }, 115 | 116 | onUnMount() { 117 | // this.chart && this.chart.dispose(); 118 | }, 119 | 120 | onResize(opt, context) { 121 | // this.chart && this.chart.resize(context); 122 | }, 123 | 124 | buildComponent({ antd }) { 125 | const e = this._React.createElement; 126 | const dataSource = [ 127 | { 128 | key: "1", 129 | name: "Mike", 130 | age: 32, 131 | address: "10 Downing Street", 132 | }, 133 | { 134 | key: "2", 135 | name: "John", 136 | age: 42, 137 | address: "10 Downing Street", 138 | }, 139 | ]; 140 | const columns = [ 141 | { 142 | title: "Name", 143 | dataIndex: "name", 144 | key: "name", 145 | }, 146 | { 147 | title: "Age", 148 | dataIndex: "age", 149 | key: "age", 150 | }, 151 | { 152 | title: "Address", 153 | dataIndex: "address", 154 | key: "address", 155 | }, 156 | ]; 157 | return e("div", null, [ 158 | e('h1', null, 'Hello World!'), 159 | e(antd.Table, { dataSource, columns }, null), 160 | ]); 161 | }, 162 | }; 163 | } 164 | -------------------------------------------------------------------------------- /plugins/datart-antd-react/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { AntDesignChart } from "./experiment-antd-react-chart"; 20 | 21 | export default AntDesignChart; 22 | -------------------------------------------------------------------------------- /plugins/datart-antv-box/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] Antv G2Plot Box Chart 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ![AntVGG](./experiment-antv-box.png) 7 | 8 | ### 参考属性 9 | https://g2plot.antv.antgroup.com/api/plots/box 10 | 11 | -------------------------------------------------------------------------------- /plugins/datart-antv-box/experiment-antv-box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-antv-box/experiment-antv-box.png -------------------------------------------------------------------------------- /plugins/datart-antv-box/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { AntVBox } from "./experiment-antv-box"; 20 | 21 | export default AntVBox; 22 | -------------------------------------------------------------------------------- /plugins/datart-antv-sankey/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] Antv G2Plot Sankey Chart 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ![AntVGG](./experiment-antv-sankey.png) 7 | 8 | ### 参考属性 9 | https://charts.ant.design/zh/examples/relation-plots/sankey#draggable 10 | -------------------------------------------------------------------------------- /plugins/datart-antv-sankey/experiment-antv-sankey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-antv-sankey/experiment-antv-sankey.png -------------------------------------------------------------------------------- /plugins/datart-antv-sankey/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { AntVSankey } from "./experiment-antv-sankey"; 20 | 21 | export default AntVSankey; 22 | -------------------------------------------------------------------------------- /plugins/datart-antvg2/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] AntV GG 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ![AntVGG](./experiment-antvg2-chart.png) 7 | -------------------------------------------------------------------------------- /plugins/datart-antvg2/experiment-antvg2-chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-antvg2/experiment-antvg2-chart.png -------------------------------------------------------------------------------- /plugins/datart-antvg2/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { AntVG2Chart } from "./experiment-antvg2-chart"; 20 | 21 | export default AntVG2Chart; 22 | -------------------------------------------------------------------------------- /plugins/datart-babylon/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] BabylonJS Demo 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ![BabylonJS](./babylon-js-demo.png) 7 | -------------------------------------------------------------------------------- /plugins/datart-babylon/babylon-js-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-babylon/babylon-js-demo.png -------------------------------------------------------------------------------- /plugins/datart-babylon/babylon-js-logo.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 55 55"><defs><style>.logo_svg__cls-1{fill:#d5d2ca}.logo_svg__cls-2{fill:#fff}.logo_svg__cls-3{fill:#e0684b}.logo_svg__cls-4{fill:#bb464b}</style></defs><g id="logo_svg__UI"><path class="logo_svg__cls-2" d="m34.29 11.63-13.64 7.88v15.74l13.64 7.88 13.63-7.88V19.51Z"></path><path class="logo_svg__cls-3" d="m47.92 19.51-4.26-2.47-4.11 2.37 4.27 2.47 4.1-2.37zM24.76 21.88 38.39 14l-4.1-2.37-13.64 7.88 4.11 2.37zM30.02 29.84l4.27 2.47 4.27-2.47-4.27-2.46-4.27 2.46z"></path><path class="logo_svg__cls-4" d="M43.82 21.88v11l-9.53 5.5-9.53-5.5v-11l-4.11-2.37v15.74l13.64 7.88 13.63-7.88V19.51l-4.1 2.37z"></path><path class="logo_svg__cls-4" d="m34.29 22.45-4.27 2.46v4.93l4.27-2.46 4.27 2.46v-4.93l-4.27-2.46z"></path><path d="m43.82 21.88-5.26 3.03v4.93l-4.27 2.47v6.07l9.53-5.5v-11z" style="fill: rgb(224, 222, 216);"></path><path class="logo_svg__cls-1" d="m24.76 21.88 5.26 3.03v4.93l4.27 2.47v6.07l-9.53-5.5v-11z"></path><path class="logo_svg__cls-2" d="m38.39 14 5.27 3.04-4.11 2.37 4.27 2.47-5.26 3.03-4.27-2.46-4.27 2.46-5.26-3.03L38.39 14z"></path></g><path d="M0 0h55v55H0z" id="logo_svg__Icon_buttons" data-name="Icon buttons" style="fill: none;"></path></svg> -------------------------------------------------------------------------------- /plugins/datart-babylon/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { BabylonJSDemo } from "./experiment-babylon"; 20 | 21 | export default BabylonJSDemo; 22 | -------------------------------------------------------------------------------- /plugins/datart-bmap/baidu-map-logo.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1676278422081" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3080" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M613.23 692.16c48.61-10.26 41.92-68.23 40.58-81.16-2.23-19.62-25.42-53.51-56.64-50.84-39.24 3.57-45.04 60.2-45.04 60.2-5.34 26.32 12.49 82.06 61.1 71.8z m51.29 100.79c-1.34 4.01-4.46 14.27-1.78 23.64 5.35 20.51 23.19 21.41 23.19 21.41h25.42v-62h-27.2c-12.05 3.12-18.29 12.94-19.63 16.95z m38.8-198.01c26.76 0 48.61-30.77 48.61-69.12 0-37.91-21.41-68.68-48.61-68.68-26.76 0-48.61 30.77-48.61 68.68 0 38.35 21.85 69.12 48.61 69.12z m115.05 4.46c35.68 4.46 58.87-33.45 63.33-62.43 4.46-28.99-18.28-62.43-43.7-68.23-25.42-5.8-57.08 34.78-59.76 61.54-3.57 32.11 4.46 64.66 40.13 69.12z m87.86 170.36s-55.3-42.81-87.85-89.19c-43.7-68.23-106.14-40.58-127.1-5.8-20.51 34.78-53.07 56.64-57.53 62.43-4.46 5.8-66.89 39.24-53.07 100.79 13.82 61.1 62.43 60.2 62.43 60.2s35.68 3.57 77.15-5.8c41.47-9.37 77.15 2.23 77.15 2.23s96.77 32.55 123.53-29.88c26.76-62.87-14.71-94.98-14.71-94.98z m-165.9 92.76h-62.88c-27.2-5.35-37.91-24.08-39.24-27.2-1.34-3.12-8.92-18.28-4.91-43.7 11.59-37.91 45.49-40.58 45.49-40.58h33.45V710l28.54 0.45-0.45 152.07z m117.29-0.45h-72.69c-28.1-7.14-29.43-27.2-29.43-27.2V754.6l29.43-0.45v72.24c1.78 7.58 11.15 8.92 11.15 8.92h29.88V754.6h31.22c-0.01 0 0.44 107.47 0.44 107.47z m103.01-214.06c0-13.82-11.59-55.74-53.96-55.74-42.81 0-48.61 39.24-48.61 67.34 0 26.31 2.23 63.77 55.3 62.43 53.07-0.89 47.27-60.2 47.27-74.03z m-495.45 90.53c4.46 9.37 11.15 16.95 20.07 22.74 8.92 5.35 18.73 8.47 29.43 8.47s20.07-2.68 29.43-8.47c8.92-5.35 16.05-12.93 20.51-22.74l3.57-7.58c-13.38-5.35-25.87-14.27-35.68-26.31-23.19-28.1-28.99-65.56-24.53-90.98 4.01-34.78 26.31-92.76 85.18-98.11 2.23 0 4.91-0.45 7.14-0.45 3.57 0 6.69 0 9.81 0.45 4.46-58.42 43.7-103.02 93.2-103.02 4.91 0 9.37 0.89 13.82 1.78l6.24-12.93c9.37-20.51 14.27-46.38 14.27-78.04 0-61.54-21.85-114.16-65.11-157.42-43.7-43.7-96.33-65.56-157.87-65.56s-114.16 21.85-157.42 65.11c-43.7 43.7-65.56 96.33-65.56 157.87 0 31.66 4.91 57.53 14.27 78.04l159.23 337.15z m-29.44-494.12c21.85-21.85 48.16-32.55 78.93-32.55 30.77 0 57.08 10.7 78.93 32.55s32.55 48.16 32.55 78.93-10.7 57.08-32.55 78.93c-21.85 21.85-48.16 32.55-78.93 32.55-30.77 0-57.08-10.7-78.93-32.55-21.85-21.85-32.55-48.16-32.55-78.93s10.7-57.07 32.55-78.93zM563.73 903.1H68.72L247.1 635.53h119.96l20.96 44.6H270.74L151.67 858.51h388.87c5.8 18.28 13.83 33 23.19 44.59z" p-id="3081" fill="#d81e06"></path></svg> -------------------------------------------------------------------------------- /plugins/datart-bmap/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { BMap } from "./experiment-bmap-chart"; 20 | 21 | export default BMap; 22 | -------------------------------------------------------------------------------- /plugins/datart-chartjs/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] ChartJS 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ![ChartJS Sample](./experiment-antvg2-chart.png) 7 | 8 | ## 使用说明 9 | [ChartJS](https://www.chartjs.org/) official site. 10 | 11 | ### 数据区域配置 12 | 13 | ### 样式区域配置 14 | 15 | 16 | -------------------------------------------------------------------------------- /plugins/datart-chartjs/chartjs-logo.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> 3 | <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" 4 | width="192px" height="192px" viewBox="0 0 192 192" enable-background="new 0 0 192 192" xml:space="preserve"> 5 | <path d="M161.271,96.556c-22.368,0.439-17.709,14.599-33.473,18.18c-16.014,3.638-18.542-39.111-34.552-39.111 6 | c-16.012,0-19.559,41.526-39.608,70.034l-0.572,0.807l42.985,24.813l65.22-37.651V96.556z"/> 7 | <path d="M161.271,95.267c-7.488-9.61-12.567-20.658-23.494-20.658c-19.337,0-14.249,31.545-35.62,31.545 8 | c-21.373,0-23.62-33.931-47.832-2.035c-7.715,10.163-13.925,21.495-18.803,32.218l60.529,34.943l65.22-37.651V95.267z"/> 9 | <path opacity="0.8" d="M30.829,108.334c7.338-20.321,10.505-36.779,24.514-36.779 10 | c21.371,0,26.458,60.039,44.779,53.931c18.318-6.105,16.282-38.669,44.779-38.669c5.424,0,10.962,3.323,16.371,8.698v38.113 11 | l-65.22,37.651l-65.222-37.651V108.334z"/> 12 | <path d="M96,176l-69.292-39.999V56L96,16l69.292,40v80L96,176z M34.849,131.301L96,166.602l61.151-35.301V60.7 13 | L96,25.399L34.849,60.7V131.301z"/> 14 | </svg> -------------------------------------------------------------------------------- /plugins/datart-chartjs/experiment-chartjs-sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-chartjs/experiment-chartjs-sample.png -------------------------------------------------------------------------------- /plugins/datart-chartjs/experiment-chartjs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import ChartJSIcon from "./chartjs-logo.svg"; 20 | 21 | export function ChartJS({ dHelper }) { 22 | const mockData = { 23 | labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"], 24 | datasets: [ 25 | { 26 | label: "# of Votes", 27 | data: [12, 19, 3, 5, 2, 3], 28 | backgroundColor: [ 29 | "rgba(255, 99, 132, 0.2)", 30 | "rgba(54, 162, 235, 0.2)", 31 | "rgba(255, 206, 86, 0.2)", 32 | "rgba(75, 192, 192, 0.2)", 33 | "rgba(153, 102, 255, 0.2)", 34 | "rgba(255, 159, 64, 0.2)", 35 | ], 36 | borderColor: [ 37 | "rgba(255, 99, 132, 1)", 38 | "rgba(54, 162, 235, 1)", 39 | "rgba(255, 206, 86, 1)", 40 | "rgba(75, 192, 192, 1)", 41 | "rgba(153, 102, 255, 1)", 42 | "rgba(255, 159, 64, 1)", 43 | ], 44 | borderWidth: 1, 45 | }, 46 | ], 47 | }; 48 | 49 | return { 50 | config: { 51 | datas: [ 52 | { 53 | label: "dimension", 54 | key: "dimension", 55 | actions: ["sortable", "alias"], 56 | }, 57 | { 58 | label: "metrics", 59 | key: "metrics", 60 | rows: [], 61 | actions: ["format", "aggregate"], 62 | }, 63 | ], 64 | styles: [], 65 | settings: [], 66 | i18ns: [ 67 | { 68 | lang: "zh-CN", 69 | translation: { 70 | chartName: "ChartJS", 71 | }, 72 | }, 73 | { 74 | lang: "en-US", 75 | translation: { 76 | chartName: "ChartJS", 77 | }, 78 | }, 79 | ], 80 | }, 81 | isISOContainer: "experiment-chartjs-chart", 82 | dependency: ["https://cdn.jsdelivr.net/npm/chart.js@2.8.0"], 83 | meta: { 84 | id: "experiment-chartjs-chart", 85 | name: "chartName", 86 | icon: ChartJSIcon, 87 | requirements: [ 88 | { 89 | group: null, 90 | aggregate: null, 91 | }, 92 | ], 93 | }, 94 | 95 | onMount(options, context) { 96 | if (options.containerId === undefined || !context.document) { 97 | return; 98 | } 99 | const { Chart } = context.window.Chart; 100 | if (!Chart) { 101 | return; 102 | } 103 | 104 | const node = context.document.createElement("canvas"); 105 | node.id = "chartjs-canvas-container"; 106 | context.document.getElementById(options.containerId).appendChild(node); 107 | 108 | var ctx = context.document 109 | .getElementById("chartjs-canvas-container") 110 | .getContext("2d"); 111 | var myChart = new Chart(ctx, { 112 | type: "bar", 113 | data: mockData, 114 | options: { 115 | scales: { 116 | yAxes: [ 117 | { 118 | ticks: { 119 | beginAtZero: true, 120 | }, 121 | }, 122 | ], 123 | }, 124 | }, 125 | }); 126 | }, 127 | 128 | onUpdated(props, context) {}, 129 | 130 | onUnMount() {}, 131 | 132 | onResize(opt, context) {}, 133 | }; 134 | } 135 | -------------------------------------------------------------------------------- /plugins/datart-chartjs/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { ChartJS } from "./experiment-chartjs"; 20 | 21 | export default ChartJS; 22 | -------------------------------------------------------------------------------- /plugins/datart-clustering/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] EChart 统计聚类图表 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ![时序图](./experiment-cluster-chart.png) 7 | -------------------------------------------------------------------------------- /plugins/datart-clustering/experiment-cluster-chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-clustering/experiment-cluster-chart.png -------------------------------------------------------------------------------- /plugins/datart-clustering/experiment-clustering-chart.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import Icon from "./icon.svg"; 20 | import SampleData from "./sample"; 21 | 22 | const DATART_TRANSLATE_HOLDER = "@global@"; 23 | 24 | export function ClusteringChart({ dHelper }) { 25 | return { 26 | config: { 27 | datas: [ 28 | { 29 | label: `${DATART_TRANSLATE_HOLDER}.xAxis`, 30 | key: "xAxis", 31 | type: "mixed", 32 | required: true, 33 | limit: [1, 1], 34 | }, 35 | { 36 | label: `${DATART_TRANSLATE_HOLDER}.yAxis`, 37 | key: "yAxis", 38 | type: "mixed", 39 | required: true, 40 | limit: [1, 1], 41 | }, 42 | ], 43 | settings: [ 44 | { 45 | label: "cluster.title", 46 | key: "cluster", 47 | comType: "group", 48 | rows: [ 49 | { 50 | label: "cluster.clusterCount", 51 | key: "clusterCount", 52 | default: 5, 53 | comType: "inputNumber", 54 | options: { 55 | min: 2, 56 | }, 57 | }, 58 | ], 59 | }, 60 | ], 61 | i18ns: [ 62 | { 63 | lang: "zh-CN", 64 | translation: { 65 | xAxis: "X 轴", 66 | yAxis: "Y 轴", 67 | cluster: { 68 | title: "统计分析", 69 | clusterCount: "K值", 70 | }, 71 | }, 72 | }, 73 | { 74 | lang: "en", 75 | translation: { 76 | xAxis: "X Axis", 77 | yAxis: "Y Axis", 78 | cluster: { 79 | title: "Clustering", 80 | clusterCount: "K Value", 81 | }, 82 | }, 83 | }, 84 | ], 85 | }, 86 | dependency: [ 87 | "https://fastly.jsdelivr.net/npm/echarts@5.4.1/dist/echarts.min.js", 88 | "https://fastly.jsdelivr.net/npm/echarts-stat@latest/dist/ecStat.min.js", 89 | ], 90 | meta: { 91 | id: "clustering-chart", 92 | name: "[Experiment] 统计聚类图表", 93 | icon: Icon, 94 | requirements: [ 95 | { 96 | group: null, 97 | aggregate: null, 98 | }, 99 | ], 100 | }, 101 | 102 | onMount(options, context) { 103 | if (options.containerId === undefined || !context.document) { 104 | return; 105 | } 106 | 107 | if ("echarts" in context.window && "ecStat" in context.window) { 108 | const echarts = context.window.echarts; 109 | this.chart = echarts.init( 110 | context.document.getElementById(options.containerId), 111 | "default" 112 | ); 113 | const ecStat = context.window.ecStat; 114 | echarts.registerTransform(ecStat.transform.clustering); 115 | } 116 | }, 117 | 118 | onUpdated(props) { 119 | if (!props.dataset || !props.dataset.columns || !props.config) { 120 | return; 121 | } 122 | if (!this.isMatchRequirement(props.config)) { 123 | this.chart?.clear(); 124 | return; 125 | } 126 | const newOptions = this.getOptions(props.dataset, props.config); 127 | this.chart?.setOption(Object.assign({}, newOptions), true); 128 | }, 129 | 130 | onUnMount() { 131 | this.chart?.dispose(); 132 | }, 133 | 134 | onResize(opt, context) { 135 | this.chart?.resize(context); 136 | }, 137 | 138 | getOptions(dataset, config) { 139 | const settingsConfigs = config.settings || []; 140 | const dataConfigs = config.datas || []; 141 | const data = dataset.rows?.map((row) => { 142 | return row?.map((col) => +col); 143 | }); 144 | const [clusterCount] = dHelper.getStyles( 145 | settingsConfigs, 146 | ["cluster"], 147 | ["clusterCount"] 148 | ); 149 | var CLUSTER_COUNT = clusterCount || 2; 150 | var DIENSIION_CLUSTER_INDEX = 2; 151 | var COLOR_ALL = [ 152 | "#37A2DA", 153 | "#e06343", 154 | "#37a354", 155 | "#b55dba", 156 | "#b5bd48", 157 | "#8378EA", 158 | "#96BFFF", 159 | ]; 160 | var pieces = []; 161 | for (var i = 0; i < clusterCount; i++) { 162 | pieces.push({ 163 | value: i, 164 | label: "cluster " + i, 165 | color: COLOR_ALL[i], 166 | }); 167 | } 168 | const option = { 169 | dataset: [ 170 | { 171 | source: data || SampleData, 172 | }, 173 | { 174 | transform: { 175 | type: "ecStat:clustering", 176 | // print: true, 177 | config: { 178 | clusterCount: CLUSTER_COUNT, 179 | outputType: "single", 180 | outputClusterIndexDimension: DIENSIION_CLUSTER_INDEX, 181 | }, 182 | }, 183 | }, 184 | ], 185 | tooltip: { 186 | position: "top", 187 | }, 188 | visualMap: { 189 | type: "piecewise", 190 | top: "middle", 191 | min: 0, 192 | max: CLUSTER_COUNT, 193 | left: 10, 194 | splitNumber: CLUSTER_COUNT, 195 | dimension: DIENSIION_CLUSTER_INDEX, 196 | pieces: pieces, 197 | }, 198 | grid: { 199 | left: 150, 200 | }, 201 | xAxis: {}, 202 | yAxis: {}, 203 | series: { 204 | type: "scatter", 205 | encode: { tooltip: [0, 1] }, 206 | symbolSize: 15, 207 | itemStyle: { 208 | borderColor: "#555", 209 | }, 210 | datasetIndex: 1, 211 | }, 212 | }; 213 | return option; 214 | }, 215 | }; 216 | } 217 | -------------------------------------------------------------------------------- /plugins/datart-clustering/icon.svg: -------------------------------------------------------------------------------- 1 | <svg t="1675067481541" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3340" width="16" height="16"><path d="M512 512m-160 0a160 160 0 1 0 320 0 160 160 0 1 0-320 0Z" fill="#2c2c2c" p-id="3341"></path><path d="M512 704c-105.888 0-192-86.112-192-192s86.112-192 192-192 192 86.112 192 192-86.112 192-192 192z m0-320c-70.592 0-128 57.408-128 128s57.408 128 128 128 128-57.408 128-128-57.408-128-128-128zM192 320c-70.592 0-128-57.408-128-128s57.408-128 128-128 128 57.408 128 128-57.408 128-128 128z m0-192c-35.296 0-64 28.704-64 64s28.704 64 64 64 64-28.704 64-64-28.704-64-64-64zM192 960c-70.592 0-128-57.408-128-128s57.408-128 128-128 128 57.408 128 128-57.408 128-128 128z m0-192c-35.296 0-64 28.704-64 64s28.704 64 64 64 64-28.704 64-64-28.704-64-64-64zM832 960c-70.592 0-128-57.408-128-128s57.408-128 128-128 128 57.408 128 128-57.408 128-128 128z m0-192c-35.296 0-64 28.704-64 64s28.704 64 64 64 64-28.704 64-64-28.704-64-64-64zM832 320c-70.592 0-128-57.408-128-128s57.408-128 128-128 128 57.408 128 128-57.408 128-128 128z m0-192c-35.296 0-64 28.704-64 64s28.704 64 64 64 64-28.704 64-64-28.704-64-64-64z" fill="#2c2c2c" p-id="3342"></path><path d="M259.392 796.64a31.968 31.968 0 0 1-22.624-54.624l139.488-139.456a31.968 31.968 0 1 1 45.248 45.248l-139.488 139.456a31.904 31.904 0 0 1-22.624 9.376zM640 416a31.968 31.968 0 0 1-22.624-54.624l124.128-124.096a31.968 31.968 0 1 1 45.248 45.248l-124.128 124.096A31.904 31.904 0 0 1 640 416zM764.192 796.192a31.904 31.904 0 0 1-22.624-9.376l-131.616-131.616a31.968 31.968 0 1 1 45.248-45.248l131.616 131.616a31.968 31.968 0 0 1-22.624 54.624z" fill="#2c2c2c" p-id="3343"></path><path d="M398.848 430.816a31.904 31.904 0 0 1-22.624-9.376L237.184 282.432a31.968 31.968 0 1 1 45.248-45.248l139.04 139.008a31.968 31.968 0 0 1-22.624 54.624z" fill="#2c2c2c" p-id="3344"></path></svg> -------------------------------------------------------------------------------- /plugins/datart-clustering/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { ClusteringChart } from "./experiment-clustering-chart"; 20 | 21 | export default ClusteringChart; 22 | -------------------------------------------------------------------------------- /plugins/datart-clustering/sample.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | [3.275154, 2.957587], 3 | [-3.344465, 2.603513], 4 | [0.355083, -3.376585], 5 | [1.852435, 3.547351], 6 | [-2.078973, 2.552013], 7 | [-0.993756, -0.884433], 8 | [2.682252, 4.007573], 9 | [-3.087776, 2.878713], 10 | [-1.565978, -1.256985], 11 | [2.441611, 0.444826], 12 | [-0.659487, 3.111284], 13 | [-0.459601, -2.618005], 14 | [2.17768, 2.387793], 15 | [-2.920969, 2.917485], 16 | [-0.028814, -4.168078], 17 | [3.625746, 2.119041], 18 | [-3.912363, 1.325108], 19 | [-0.551694, -2.814223], 20 | [2.855808, 3.483301], 21 | [-3.594448, 2.856651], 22 | [0.421993, -2.372646], 23 | [1.650821, 3.407572], 24 | [-2.082902, 3.384412], 25 | [-0.718809, -2.492514], 26 | [4.513623, 3.841029], 27 | [-4.822011, 4.607049], 28 | [-0.656297, -1.449872], 29 | [1.919901, 4.439368], 30 | [-3.287749, 3.918836], 31 | [-1.576936, -2.977622], 32 | [3.598143, 1.97597], 33 | [-3.977329, 4.900932], 34 | [-1.79108, -2.184517], 35 | [3.914654, 3.559303], 36 | [-1.910108, 4.166946], 37 | [-1.226597, -3.317889], 38 | [1.148946, 3.345138], 39 | [-2.113864, 3.548172], 40 | [0.845762, -3.589788], 41 | [2.629062, 3.535831], 42 | [-1.640717, 2.990517], 43 | [-1.881012, -2.485405], 44 | [4.606999, 3.510312], 45 | [-4.366462, 4.023316], 46 | [0.765015, -3.00127], 47 | [3.121904, 2.173988], 48 | [-4.025139, 4.65231], 49 | [-0.559558, -3.840539], 50 | [4.376754, 4.863579], 51 | [-1.874308, 4.032237], 52 | [-0.089337, -3.026809], 53 | [3.997787, 2.518662], 54 | [-3.082978, 2.884822], 55 | [0.845235, -3.454465], 56 | [1.327224, 3.358778], 57 | [-2.889949, 3.596178], 58 | [-0.966018, -2.839827], 59 | [2.960769, 3.079555], 60 | [-3.275518, 1.577068], 61 | [0.639276, -3.41284], 62 | ]; 63 | -------------------------------------------------------------------------------- /plugins/datart-jquery/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] 基于VUEJS的图表 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ![VUEJS](./vuejs-chart.png) 7 | 8 | ## 使用说明 9 | 10 | ### 数据区域配置 11 | 12 | ### 样式区域配置 13 | -------------------------------------------------------------------------------- /plugins/datart-jquery/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { JQueryEasyUIChart } from "./experiment-jquery-chart"; 20 | 21 | export default JQueryEasyUIChart; 22 | -------------------------------------------------------------------------------- /plugins/datart-jquery/jquery-vertical.svg: -------------------------------------------------------------------------------- 1 | <svg xmlns="http://www.w3.org/2000/svg" height="94" width="100"><g transform="matrix(.945094 0 0 .945094 6.301403 4.347014)"><path d="M20.44 13.78c-5.283 7.733-4.625 17.793-.6 26l.296.585.2.37c.037.072.08.143.118.213.07.13.14.255.2.383l.385.673.22.37.447.712.2.3c.2.32.426.638.648.952.005.008.012.017.018.025.035.05.074.1.1.15.192.27.4.536.6.8l.222.288.545.682.208.254a31.65 31.65 0 0 0 .76.884l.016.016c.01.013.02.02.03.033a23.73 23.73 0 0 0 .772.83l.248.254.617.616.252.244a34.49 34.49 0 0 0 .845.783l.16.14.767.66.318.258.64.5.342.265.978.715c.025.017.047.035.072.052.23.16.463.315.697.47l.302.205 1.092.68.302.173.82.468c.15.082.303.16.453.238l.586.3.135.066.24.118.93.438.197.1a32.93 32.93 0 0 0 1.084.459l.264.106 1.023.386.128.046a34.62 34.62 0 0 0 1.14.38l.275.084c.4.12.775.263 1.177.34C67.457 62.6 74.88 42.218 74.88 42.218c-6.233 8.27-17.296 10.45-27.778 8.023-.397-.1-.782-.217-1.17-.334l-.292-.1c-.378-.118-.754-.243-1.126-.373l-.155-.057a35.02 35.02 0 0 1-.993-.375l-.28-.112a31.57 31.57 0 0 1-1.072-.454l-.214-.096-.904-.43-.26-.128a30.9 30.9 0 0 1-.7-.363l-.467-.25a26.89 26.89 0 0 1-.838-.479l-.283-.16c-.368-.22-.732-.45-1.092-.68-.1-.065-.196-.134-.295-.2l-.777-.526-.25-.18-.735-.54-.326-.25-.663-.528-.296-.24-.825-.7c-.028-.025-.06-.05-.1-.077-.294-.263-.583-.533-.868-.804l-.244-.24-.624-.622-.244-.25a31.33 31.33 0 0 1-.765-.824c-.012-.014-.026-.027-.038-.04a31.49 31.49 0 0 1-.776-.9l-.203-.246-.56-.703-.205-.26-.645-.875c-5.82-8.085-7.9-19.235-3.26-28.393M36.84 7.264c-3.82 5.6-3.613 13.094-.633 19.016a24.87 24.87 0 0 0 1.69 2.873c.572.835 1.207 1.83 1.967 2.5.275.3.563.6.857.906.074.077.15.15.226.227a25.21 25.21 0 0 0 .876.829c.012.01.023.022.036.032a26.31 26.31 0 0 0 1.031.87l.232.184a25.13 25.13 0 0 0 1.07.796.6.6 0 0 0 .03.023c.16.113.325.22.488.328.078.052.152.107.23.156a21.65 21.65 0 0 0 .793.495l.112.066.7.4c.082.047.166.088.25.132l.5.258c.025.013.05.023.074.035.337.17.676.33 1.023.485.074.033.15.063.226.095.277.12.557.236.84.347l.36.134a26.33 26.33 0 0 0 .77.273l.348.113c.367.117.73.263 1.113.328 19.725 3.328 24.28-12.14 24.28-12.14-4.105 6.02-12.054 8.894-20.538 6.652a21.09 21.09 0 0 1-1.117-.33c-.113-.035-.224-.072-.336-.1a22.36 22.36 0 0 1-.781-.274l-.353-.134c-.283-.1-.563-.225-.84-.345-.076-.033-.152-.063-.227-.098a19.53 19.53 0 0 1-1.03-.487c-.174-.087-.345-.178-.516-.268l-.298-.156a20.05 20.05 0 0 1-.653-.375l-.156-.1a25.46 25.46 0 0 1-.79-.492c-.08-.052-.158-.1-.238-.162l-.512-.345a27.46 27.46 0 0 1-1.066-.794l-.24-.192c-3.713-2.986-6.657-7.066-8.056-11.693-1.467-4.8-1.15-10.185 1.4-14.556m10.648-.38c-2.252 3.376-2.473 7.568-.9 11.296 1.648 3.957 5.025 7.062 8.966 8.533.162.062.325.117.5.173l.216.07c.232.074.463.16.702.206 10.892 2.143 13.846-5.692 14.632-6.845-2.588 3.795-6.937 4.706-12.273 3.387-.42-.105-.885-.26-1.3-.406a15.62 15.62 0 0 1-1.533-.649 15.81 15.81 0 0 1-2.688-1.671C52.167 12.8 49.2 5.762 52.316.03" fill="#0868ac"/><g fill="#131b28"><path d="M26.576 74.06l-.738 2.616.738-2.615zm3.796 5.678l-.813-.005.813.005zm-.2 3.906l-4.872.018 4.872-.018zm1.02-3.9l-.814-.005.814.005zm-.582 3.568l.85-3.237-.85 3.237zm17.93-14.907l-1.58 7.433 1.58-7.433zm-4.065 0l-1.2 5.553 1.2-5.553z"/><path d="M48.26 68.07h-3.38c-.188 0-.374.15-.414.334l-2.4 11.107c-.04.183-.226.333-.413.333H39.26c-2.368 0-2.094-1.637-1.6-3.88l.015-.068.287-1.53.124-.63 1.092-5.332c.038-.184-.085-.335-.273-.335h-3.47a.44.44 0 0 0-.412.334l-1.563 7.414c-.86 3.924-.632 7.666 4.04 7.783l.135.003h7.332c.188 0 .373-.15.413-.334l3.162-14.866c.04-.184-.083-.334-.27-.334zm13.487 11.813c.188 0 .3.15.273.334l-.328 1.605m-.328 1.606l.328-1.606-.328 1.606zm-.412.338l-6.23.03 6.23-.03z"/><path d="M52.704 77.817c-.003-.176.197-.478.385-.478l-.422-.007c-.2 1.914.037.485.037.485zm2.326 5.978h-.065.065zm6.717-3.912c.188 0 .3.15.273.334l-.382 1.866M56.63 83.8h-.014.014zm-.83-.006h-.048.048zm-.253.001h-.08.08zm-.247 0h-.07.07zm.462-.001h-.205.205z"/><path d="M56.617 83.8l-.816.003.816-.003zm4.337-.025l-4.325.026 4.325-.026zm.4-.347l.275-1.344-.275 1.345zm-5.896.367H55.3h.178zm-.495 0h-.24.24zm.257 0h-.2.2zM5.76 77.857l.525-2.328-.6 2.66-.07.334.146-.668zm6.286-9.825H8.333a.45.45 0 0 0-.417.333l-.704 3.1a.26.26 0 0 0 .266.333h3.742c.188 0 .374-.15.414-.333l.68-3.107c.04-.183-.08-.333-.27-.333zm-.808 5.168l-1.1 5.038 1.1-5.038zM.452 89.895l3.062.024c-.904 0-2.397-.017-3.063-.025z"/><path d="M6.8 73.2l-.526 2.328L6.8 73.2zm4.17-.333H7.227a.45.45 0 0 0-.417.333l-1.05 4.656-.146.668-1 4.753a7.16 7.16 0 0 1-.18.657s-.7 2.08-1.874 2.057l-1.165-.022a.45.45 0 0 0-.42.326L.2 89.558a.26.26 0 0 0 .261.336l3.063.025c2.936 0 4.483-1.627 5.476-6.307l2.25-10.4c.04-.183-.082-.333-.27-.333zm53.162 10.738c-.188 0-.3-.15-.27-.334l2.815-13.186m1.367 13.185l1.14-5.628-1.14 5.628z"/><path d="M63.903 83.438c-.023-.092-.01-.317.03-.5l1.336-6.26-1.408 6.593c-.04.184.082.334.27.334h.342c-.188 0-.548-.075-.57-.167zm3.92.092c-.102.04-.34.075-.528.075h.342a.44.44 0 0 0 .41-.335l.068-.334c-.037.184-.2.553-.3.594zm.79-3.074l.503-2.484-.503 2.484zm11.108-9.488l.155.64c.043.183-.076.332-.263.333"/><path d="M68.112 82.936l.5-2.48-.5 2.48zM79.568 70.3l.153.656-.153-.656zm-10.452 7.672l.138-.664.537-2.515-.608 2.848-.067.33zm-2.393-8.104l-.117.55-1.336 6.26 1.408-6.593.045-.216z"/><path d="M79.877 71.608l-.155-.64-.23-1c-.304-1.18-1.196-1.863-3.134-1.863l-8.92-.006a.44.44 0 0 0-.412.334l-.138.653-.2.987-2.744 12.853c-.04.184-.053.4-.03.5s.383.167.57.167h2.82c.188 0 .425-.034.528-.075s.254-.4.3-.594l1.07-5.294 1.145-5.364c.04-.183.225-.332.412-.333l8.873-.004c.187 0 .306-.15.263-.333zM91.3 65.815l-.683.003h-2.84a.73.73 0 0 0-.534.282l-6.28 9.2c-.106.155-.227.132-.27-.05l-.462-2.027a.45.45 0 0 0-.417-.333h-4.037c-.188 0-.3.147-.248.328l1.8 6.338c.052.18.055.477.01.66l-.8 3.067a.25.25 0 0 0 .257.331h4c.188 0 .38-.15.426-.33l.8-3.067a2.04 2.04 0 0 1 .29-.604L92.518 66.08c.113-.15.052-.272-.136-.27l-1.07.007zm-32.076 7.937c-.024.2-.212.35-.4.35h-5.12c-.177 0-.267-.12-.24-.27l.004-.027.023-.087c.5-1.3 1.485-2.153 3.356-2.153 2.107 0 2.518 1.03 2.375 2.187zm-1.502-5.908c-6.57 0-8.127 3.988-9 8.013-.874 4.103-.798 7.94 6 7.94H55.8l.83-.003 4.326-.026a.44.44 0 0 0 .407-.335l.657-3.212c.038-.184-.085-.334-.273-.334h-6.112c-2.43 0-3.153-.646-2.887-2.545h9.77c.16-.003.305-.1.362-.252.01-.027.02-.056.024-.085 1.45-5.47 1.034-9.157-5.18-9.157zM26.668 73.73l-.092.327c0 .001-.738 2.616-.738 2.616l-.738 2.614a.48.48 0 0 1-.434.328H20.76c-2.962 0-3.683-2.317-2.962-5.734.72-3.495 2.135-5.668 5.05-5.888 3.984-.3 4.78 2.502 3.82 5.736zm2.678 5.685s1.84-4.47 2.26-7.053c.57-3.457-1.16-8.47-7.845-8.47-6.647 0-9.533 4.786-10.634 10-1.1 5.24.342 9.836 6.95 9.8l10.086-.037a.47.47 0 0 0 .427-.332l.85-3.238a.25.25 0 0 0-.255-.332l-1.627-.01c-.16-.001-.25-.104-.232-.24.004-.025.01-.05.02-.076z"/><path d="M62.25 76.424c0 .124-.1.224-.224.224s-.224-.1-.224-.224.1-.224.224-.224.224.1.224.224z"/></g></g></svg> -------------------------------------------------------------------------------- /plugins/datart-lottie/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] Lottie Animation Chart 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ![ZRender](./lottie-record.gif) 7 | 8 | ## 使用说明 9 | 10 | ## 资源 11 | 12 | https://lottiefiles.com/web-player 13 | 14 | https://lottiefiles.com/featured -------------------------------------------------------------------------------- /plugins/datart-lottie/experiment-lottie-chart.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import Icon from "./lottie-icon.svg"; 20 | import Data from './data.json'; 21 | 22 | export function LottieChart({}) { 23 | return { 24 | config: { 25 | datas: [ 26 | { 27 | label: "dimension", 28 | key: "dimension", 29 | required: true, 30 | type: "group", 31 | }, 32 | { 33 | label: "metrics", 34 | key: "metrics", 35 | required: true, 36 | type: "aggregate", 37 | }, 38 | ], 39 | styles: [ 40 | { 41 | label: "label.title", 42 | key: "label", 43 | comType: "group", 44 | rows: [ 45 | { 46 | label: "label.text", 47 | key: "text", 48 | default: "datart", 49 | comType: "input", 50 | }, 51 | { 52 | label: "label.fontLeft", 53 | key: "fontL", 54 | comType: "font", 55 | default: { 56 | fontFamily: "Lato", 57 | fontSize: 200, 58 | fontWeight: "bolder", 59 | fontStyle: "normal", 60 | color: "#0ff", 61 | }, 62 | }, 63 | { 64 | label: "label.fontRight", 65 | key: "fontR", 66 | comType: "font", 67 | default: { 68 | fontFamily: "Lato", 69 | fontSize: 200, 70 | fontWeight: "bolder", 71 | fontStyle: "normal", 72 | color: "#f0f", 73 | }, 74 | }, 75 | ], 76 | }, 77 | ], 78 | i18ns: [ 79 | { 80 | lang: "zh-CN", 81 | translation: { 82 | label: { 83 | title: "标签", 84 | text: "文本", 85 | fontLeft: "主字体", 86 | fontRight: "副字体", 87 | }, 88 | }, 89 | }, 90 | ], 91 | }, 92 | isISOContainer: "experiment-lottie-chart", 93 | dependency: [ 94 | "https://cdnjs.cloudflare.com/ajax/libs/lottie-web/5.9.6/lottie.min.js", 95 | ], 96 | meta: { 97 | id: "experiment-lottie-chart", 98 | name: "[Experiment] Lottie Chart", 99 | icon: Icon, 100 | requirements: [ 101 | { 102 | group: null, 103 | aggregate: null, 104 | }, 105 | ], 106 | }, 107 | 108 | onMount(options, context) { 109 | if (options.containerId === undefined || !context.document) { 110 | return; 111 | } 112 | 113 | const { bodymovin } = context.window; 114 | if (!bodymovin) { 115 | return; 116 | } 117 | 118 | var animation = bodymovin.loadAnimation({ 119 | container: context.document.getElementById(options.containerId), 120 | animType: "svg", 121 | loop: true, 122 | animationData: Data, 123 | // path: 'https://labs.nearpod.com/bodymovin/demo/markus/halloween/markus.json'; 124 | }); 125 | }, 126 | 127 | onUpdated(props, context) {}, 128 | 129 | onUnMount() {}, 130 | }; 131 | } 132 | -------------------------------------------------------------------------------- /plugins/datart-lottie/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { LottieChart } from "./experiment-lottie-chart"; 20 | 21 | export default LottieChart; 22 | -------------------------------------------------------------------------------- /plugins/datart-lottie/lottie-icon.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" standalone="no"?> 2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" 3 | "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> 4 | <svg version="1.0" xmlns="http://www.w3.org/2000/svg" 5 | width="192.000000pt" height="192.000000pt" viewBox="0 0 192.000000 192.000000" 6 | preserveAspectRatio="xMidYMid meet"> 7 | 8 | <g transform="translate(0.000000,192.000000) scale(0.100000,-0.100000)" 9 | fill="#000000" stroke="none"> 10 | <path d="M795 969 c-227 -33 -374 -136 -420 -293 -42 -143 36 -289 175 -331 11 | 24 -7 24 -7 7 12 -23 26 -22 56 3 78 20 18 20 18 -15 42 -121 82 -64 262 109 12 | 338 82 36 150 47 329 52 l167 6 0 53 0 54 -147 -1 c-82 -1 -175 -5 -208 -10z"/> 13 | <path d="M1230 925 l0 -55 105 0 105 0 0 55 0 55 -105 0 -105 0 0 -55z"/> 14 | <path d="M1510 928 l0 -55 46 -7 c26 -3 84 -6 130 -6 l84 0 0 55 0 55 -62 0 15 | c-35 0 -93 3 -130 7 l-68 6 0 -55z"/> 16 | </g> 17 | </svg> 18 | -------------------------------------------------------------------------------- /plugins/datart-lottie/lottie-record.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-lottie/lottie-record.gif -------------------------------------------------------------------------------- /plugins/datart-luckysheet/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] 基于LuckySheet的图表 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ![LuckySheet](./experiment-luckysheet-demo.png) 7 | 8 | ## 使用说明 9 | 10 | 请参考官方文档: https://mengshukeji.github.io/LuckysheetDocs/guide/#steps-for-usage 11 | 12 | ### 数据区域配置 13 | 14 | ### 样式区域配置 15 | -------------------------------------------------------------------------------- /plugins/datart-luckysheet/experiment-luckysheet-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-luckysheet/experiment-luckysheet-demo.png -------------------------------------------------------------------------------- /plugins/datart-luckysheet/experiment-luckysheet.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import config from "./config"; 20 | import icon from "./luckysheet-logo.svg"; 21 | import { IChart } from "../../core/datart"; 22 | 23 | /** 24 | * @summary LuckySheet 25 | * Document Link: https://mengshukeji.github.io/LuckysheetDocs/guide/#steps-for-usage 26 | * @param {*} { dHelper }, Datart Helper Utils 27 | * @return {*} void 28 | */ 29 | export function LuckySheetChart({ dHelper }): IChart & any { 30 | return { 31 | isISOContainer: "luckysheet-chart", 32 | chart: null, 33 | config, 34 | dependency: [ 35 | "https://cdn.jsdelivr.net/npm/luckysheet/dist/plugins/css/pluginsCss.css", 36 | "https://cdn.jsdelivr.net/npm/luckysheet/dist/plugins/plugins.css", 37 | "https://cdn.jsdelivr.net/npm/luckysheet/dist/css/luckysheet.css", 38 | "https://cdn.jsdelivr.net/npm/luckysheet/dist/assets/iconfont/iconfont.css", 39 | "https://cdn.jsdelivr.net/npm/luckysheet/dist/plugins/js/plugin.js", 40 | "https://cdn.jsdelivr.net/npm/luckysheet/dist/luckysheet.umd.js", 41 | ], 42 | geoMap: null, 43 | meta: { 44 | id: "experiment-luckysheet-chart", 45 | name: "chartName", 46 | icon: icon, 47 | requirements: [ 48 | { 49 | group: 0, 50 | aggregate: 0, 51 | }, 52 | ], 53 | }, 54 | 55 | onMount(options, context) { 56 | if (options.containerId === undefined || !context.document) { 57 | return; 58 | } 59 | if (context.window.luckysheet) { 60 | context.window.luckysheet.create({ 61 | container: options.containerId, 62 | }); 63 | } 64 | 65 | // this.chart = context.window.echarts.init( 66 | // context.document.getElementById(options.containerId), 67 | // "default" 68 | // ); 69 | // this._mouseEvents?.forEach((event) => { 70 | // this.chart.on(event.name, event.callback); 71 | // }); 72 | }, 73 | 74 | onUpdated(props, context) { 75 | if (!props.dataset || !props.dataset.columns || !props.config) { 76 | return; 77 | } 78 | if (!this.isMatchRequirement(props.config)) { 79 | // this.chart?.clear(); 80 | return; 81 | } 82 | }, 83 | 84 | onUnMount() { 85 | // this.chart?.dispose(); 86 | }, 87 | 88 | onResize(opt, context) { 89 | // this.chart?.resize(context); 90 | }, 91 | }; 92 | } 93 | -------------------------------------------------------------------------------- /plugins/datart-luckysheet/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { LuckySheetChart } from "./experiment-luckysheet"; 20 | 21 | export default LuckySheetChart; 22 | -------------------------------------------------------------------------------- /plugins/datart-luckysheet/luckysheet-logo.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> 3 | <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="64px" height="64px" viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve"> <image id="image0" width="64" height="64" x="0" y="0" 4 | href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAABGdBTUEAALGPC/xhBQAAACBjSFJN 5 | AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABfVBMVEUAAAAugPkvgfktgPgt 6 | fvgtf/otf/ktfvgtfvctfvctf/gtgPdAgP8ugvougfougPktgPougPktgPkziP8ugPotgPotgPkt 7 | fvgtfvgufvkuf/kxhP8ugPotgPougPosf/ksfvgsfvgugPg5gP8tgPotgPougPktgfsugPougPot 8 | h/8ugPovgPozgP8tgPkxgP8tgfwugPotgPkvgfsugPougPozg/8tgPougvs3gP8tgPkugPn///+A 9 | gP8tgPkvgPkugfotgPpAgP8ugPstgPougPovgPktgPovgPstgPkugPsugPotgPkugPotgPktgPou 10 | gPkwgvosfvkugPotgPo1gP8vgPkugPkvgvktgPsugPktgPovgPs1hP8tgPkvgfotgPkugPougPk5 11 | jv8ugfwugPotgPsvgP8ugPktgPktgfpVqv8tgPktgfwvgPpVgP8tgPougP8ugPotgPoxgvotgPou 12 | gPougPougPktgPktgPoui/8ugPktf/n///8DvKdEAAAAfXRSTlMAgHe6wLuBccbCjXwEN2OKqbe1 13 | D2Tz4d7n5c8foPfU8/Po2hKN+Lh375ERvGgo2ypJ8OdB+5sj7T0O1doBArRWX8oIdO7qg/k84kKQ 14 | h89a/uU18vydGFyzKz6EwHgdymeuoYsJTV5EJt+CZQPWT58GxRai/S+ejL6G1/ELtlt5DTMAAAAB 15 | YktHRDynamHPAAAAB3RJTUUH5gcfCDAmtcsrUAAAAp5JREFUWMPtlu1XEkEUh2+GmIigiKSsmCiI 16 | gqa5SaCspkZSpECallJqhYrv76Y2/3u8CO7MnWUZPtU5/b5w9t59njNnd/YO8Khi6kA3/wX3gscG 17 | jdQbjcaGKgSGJxppNJlMTX+rwNxssba02moUtNlt7SQfh0rwtAOn0+l0GhAudbnIfbpVgo5nOD1u 18 | t7uXwfs8XlJOv7DA7BsgqgyKCvwBQmVIUDD8nObJiJhg9AXDj4GQQH7J8GRcSBB8xfIkJCIITyB+ 19 | MiIgUKYQT6ZBQPAa8zMRAcGsAwtkEBDMYd4GAgL/G8RHJRHBW8TPx0BAoLxDAguICN4jPg5CAg/L 20 | f1DEBAs07lrkDdUKgnCC4pMp1Rdel099Yy6dPTgfi4KUGl9a/oSmpDE3fE1ONz85wYqKX/3MmdJ6 21 | Al+JTgS+cA8JPcFagfaup7/yDxloaMrF0MvPN4CNza3v9tgP+AcTTq341jYAfqYz2zuisCJ7Fgr7 22 | ZxMgnf/djcvm6nF/tvz9bQFkSltwb786fHZONT+sANvli4PDahafoeafHWBHdXl0rPvkmPmdnzy7 23 | quuT08p8kDk/vPn9E1dXHMFKvMyeX+uFKlWaCGvzo+j8TOfL5iRVm1K0+GH2/CaJ4vezR1ezWm+f 24 | /f9ASKDY2T+gH4zE5c0BxJPS939Il8+4Ah/mV8vNI6p+fsHh+wYQv/Qwv45PqM4lR+DBC1hWtU+p 25 | /RnFL0LyIj5JzV96i4WQoAvxrhR9B7XJr1i+zYUEi+w9SvZhldds0474X5znJJ2d33dv2JaN5eP8 26 | /XpxGS20b9lN1E7j8xbQihK6ur65JXd0tZnmozHQyR2zQAvF/5b0eBSrCp+RhXGAljI+OR2pgYfW 27 | Ij02HqoJz71FR3f/4NCIMPcHwF9SIaiLWngAAABEZVhJZk1NACoAAAAIAAGHaQAEAAAAAQAAABoA 28 | AAAAAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAECgAwAEAAAAAQAAAEAAAAAARlFCsAAAACV0RVh0 29 | ZGF0ZTpjcmVhdGUAMjAyMi0wNy0zMVQwODo0ODozOCswMDowMNFtR7MAAAAldEVYdGRhdGU6bW9k 30 | aWZ5ADIwMjItMDctMzFUMDg6NDg6MzgrMDA6MDCgMP8PAAAAEXRFWHRleGlmOkNvbG9yU3BhY2UA 31 | MQ+bAkkAAAASdEVYdGV4aWY6RXhpZk9mZnNldAAyNlMbomUAAAAXdEVYdGV4aWY6UGl4ZWxYRGlt 32 | ZW5zaW9uADY0HLg2ZwAAABd0RVh0ZXhpZjpQaXhlbFlEaW1lbnNpb24ANjTBLu/iAAAAAElFTkSu 33 | QmCC" /> 34 | </svg> 35 | -------------------------------------------------------------------------------- /plugins/datart-pivot/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] 阿里AntV S2 透视表 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ## 使用说明 7 | 8 | ### 数据区域配置 9 | 10 | - 维度: 地理信息数据字段 11 | - 指标: 根据指标决定【视觉映射】颜色深浅 12 | - 大小: 根据指标决定气泡大小,并且可以在样式配置区域更改相对半径值 13 | - 过滤: 过滤不需要的数据,可以是维度条件,也可以是指标条件 14 | 15 | ### 样式区域配置 16 | - 可切换`省级`和`地市级`,对应`维度`区域的地区设置,**目前可能没有那么完善,基于内置的区域名称和维度值名称匹配** 17 | 18 | -------------------------------------------------------------------------------- /plugins/datart-pivot/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { PivotTableChart } from "./experiment-pivot-chart"; 20 | 21 | export default PivotTableChart; 22 | -------------------------------------------------------------------------------- /plugins/datart-scroll/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] 滚动图表 2 | 3 | - [x] datart version: **1.0.0-beta.1** 4 | - [x] status: **experimental** 5 | 6 | ![滚动图表](./scroll-table-chart.png) 7 | 8 | ## 使用说明 9 | 10 | ### 数据区域配置 11 | None 12 | ### 样式区域配置 13 | - 可设置`开始延迟`、`运动方向`、`持续时间`、`间隔`、`悬停时暂停`、`是否连续`、`是否起点显示` 14 | -------------------------------------------------------------------------------- /plugins/datart-scroll/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { ScrollChart } from "./experiment-scroll-chart"; 20 | 21 | export default ScrollChart; 22 | -------------------------------------------------------------------------------- /plugins/datart-scroll/scroll-table-chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-scroll/scroll-table-chart.png -------------------------------------------------------------------------------- /plugins/datart-scroll/scroll-table.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1644896851300" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1980" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M341.333333 640H42.666667V426.666667h298.666666z m341.333334 42.666667v256h245.333333a53.393333 53.393333 0 0 0 53.333333-53.333334v-202.666666z m0-42.666667h298.666666V426.666667h-298.666666z m298.666666-256V181.333333a53.393333 53.393333 0 0 0-53.333333-53.333333H96a53.393333 53.393333 0 0 0-53.333333 53.333333v202.666667z m-640 298.666667H42.666667v202.666666a53.393333 53.393333 0 0 0 53.333333 53.333334h245.333333z m42.666667 256h256v-256H384z m0-298.666667h256V426.666667H384z" p-id="1981"></path></svg> -------------------------------------------------------------------------------- /plugins/datart-sovit-sample/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] 数维3D场景集成示例 2 | 3 | - [x] datart version: **1.0.0-beta.1** 4 | - [x] status: **experimental** 5 | 6 | ![滚动图表](./scroll-soivt-sample.png) 7 | 8 | ## 使用说明 9 | -------------------------------------------------------------------------------- /plugins/datart-sovit-sample/experiment-sovit-sample.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import config from "./config"; 20 | import icon from "./sovit-logo.svg"; 21 | import { IChart } from "../../core/datart"; 22 | 23 | /** 24 | * @summary 25 | * Integrate with amap echart extions, more detail please check https://www.sovitjs.com/document-new-api-zzmefu.html 26 | * @param {*} { dHelper }, Datart Helper Utils 27 | * @return {*} void 28 | */ 29 | export function SovitChart({ dHelper }): IChart & any { 30 | return { 31 | isISOContainer: "sovit-sample", 32 | chart: null, 33 | config, 34 | dependency: [ 35 | "https://admin.sovitjs.com/static/sovitjs/jquery-ui.css", 36 | "https://admin.sovitjs.com/static/sovitjs/SovitChartPaser.min.js", 37 | ], 38 | meta: { 39 | id: "experiment-sovit-smaple", 40 | name: "chartName", 41 | icon: icon, 42 | requirements: [ 43 | { 44 | group: 1, 45 | aggregate: [1, 2], 46 | }, 47 | ], 48 | }, 49 | 50 | onMount(options, context) { 51 | if (options.containerId === undefined || !context.document) { 52 | return; 53 | } 54 | 55 | if ("SovitChartPaser" in context.window) { 56 | const SovitChartPaser = context.window.SovitChartPaser; 57 | const sceneChartMain = new SovitChartPaser.SceneMain({ 58 | apiurl: "https://admin.sovitjs.com/restapi", 59 | publishType: 1, //1为在线引用组件 60 | }); 61 | 62 | sceneChartMain.initChart( 63 | options.containerId, 64 | { 65 | pageId: '3221068859372994564', 66 | }, 67 | function (comId, eventType, reData) { 68 | console.log( 69 | `comId, eventType, reData ---> `, 70 | comId, 71 | eventType, 72 | reData 73 | ); 74 | } 75 | ); 76 | } 77 | }, 78 | 79 | onUpdated(props, context) { 80 | if (!props.dataset || !props.dataset.columns || !props.config) { 81 | return; 82 | } 83 | if (!this.isMatchRequirement(props.config)) { 84 | this.chart?.clear(); 85 | return; 86 | } 87 | 88 | // Node: especially clear before map dispose 89 | this.chart?.clear(); 90 | const newOptions = this.getOptions(props.dataset, props.config); 91 | this.chart?.setOption(Object.assign({}, newOptions), true); 92 | }, 93 | 94 | onUnMount() { 95 | this.chart?.dispose(); 96 | }, 97 | 98 | onResize(opt, context) { 99 | this.chart?.resize(context); 100 | }, 101 | 102 | getOptions(dataset, config) { 103 | const styleConfigs = config.styles; 104 | const dataConfigs = config.datas || []; 105 | const groupConfigs = dataConfigs 106 | .filter((c) => c.type === "group") 107 | .flatMap((config) => config.rows || []); 108 | const aggregateConfigs = dataConfigs 109 | .filter((c) => c.type === "aggregate") 110 | .flatMap((config) => config.rows || []); 111 | const sizeConfigs = dataConfigs 112 | .filter((c) => c.type === "size") 113 | .flatMap((config) => config.rows || []); 114 | 115 | const chartDataSet = dHelper.transformToDataSet( 116 | dataset.rows, 117 | dataset.columns, 118 | dataConfigs 119 | ); 120 | const theme = dHelper.getValue(styleConfigs, ["map", "theme"]); 121 | return null; 122 | }, 123 | }; 124 | } 125 | -------------------------------------------------------------------------------- /plugins/datart-sovit-sample/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { SovitChart } from "./experiment-sovit-sample"; 20 | 21 | export default SovitChart; 22 | -------------------------------------------------------------------------------- /plugins/datart-sovit-sample/sovit-logo.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" standalone="no"?> 2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" 3 | "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> 4 | <svg version="1.0" xmlns="http://www.w3.org/2000/svg" 5 | width="378.000000pt" height="386.000000pt" viewBox="0 0 378.000000 386.000000" 6 | preserveAspectRatio="xMidYMid meet"> 7 | 8 | <g transform="translate(0.000000,386.000000) scale(0.100000,-0.100000)" 9 | fill="#000000" stroke="none"> 10 | <path d="M945 3409 c-506 -241 -924 -444 -929 -452 -5 -8 -7 -21 -4 -28 3 -8 11 | 93 -56 199 -106 107 -51 522 -248 923 -438 401 -190 736 -345 745 -343 8 2 17 12 | 11 19 20 2 12 -20 27 -85 58 -559 261 -1332 635 -1326 640 4 4 319 154 698 13 | 334 380 181 700 334 713 342 22 14 22 18 22 202 0 192 -4 213 -39 211 -9 -1 14 | -430 -198 -936 -440z"/> 15 | <path d="M3565 2705 c-60 -30 -447 -215 -860 -412 -734 -351 -789 -380 -742 16 | -399 8 -3 64 18 123 47 247 118 1220 581 1232 586 9 4 12 -143 12 -713 l1 17 | -719 42 -20 c23 -11 117 -60 210 -108 l167 -88 0 921 c0 616 -3 928 -10 941 18 | -17 30 -55 22 -175 -36z"/> 19 | <path d="M24 2735 c-4 -9 -3 -20 2 -25 5 -4 395 -191 867 -416 l857 -408 0 20 | -733 c0 -403 -1 -733 -3 -733 -2 0 -377 178 -833 395 -456 218 -841 398 -856 21 | 402 -37 7 -39 -7 -36 -210 l3 -168 870 -415 c478 -228 876 -413 885 -412 13 3 22 | 15 105 15 956 l0 953 -860 410 c-473 225 -870 412 -882 415 -16 4 -25 1 -29 23 | -11z"/> 24 | </g> 25 | </svg> 26 | -------------------------------------------------------------------------------- /plugins/datart-thingjs-sample/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] Thing JS 3D场景示例 2 | 3 | - [x] datart version: **1.0.0-beta.1** 4 | - [x] status: **experimental** 5 | 6 | ![滚动图表](./scroll-thingjs-sample.png) 7 | 8 | ## 使用说明 9 | -------------------------------------------------------------------------------- /plugins/datart-thingjs-sample/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { ThingChart } from "./experiment-thingjs-sample"; 20 | 21 | export default ThingChart; 22 | -------------------------------------------------------------------------------- /plugins/datart-thingjs-sample/thingjs-logo.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" standalone="no"?> 2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" 3 | "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> 4 | <svg version="1.0" xmlns="http://www.w3.org/2000/svg" 5 | width="378.000000pt" height="386.000000pt" viewBox="0 0 378.000000 386.000000" 6 | preserveAspectRatio="xMidYMid meet"> 7 | 8 | <g transform="translate(0.000000,386.000000) scale(0.100000,-0.100000)" 9 | fill="#000000" stroke="none"> 10 | <path d="M945 3409 c-506 -241 -924 -444 -929 -452 -5 -8 -7 -21 -4 -28 3 -8 11 | 93 -56 199 -106 107 -51 522 -248 923 -438 401 -190 736 -345 745 -343 8 2 17 12 | 11 19 20 2 12 -20 27 -85 58 -559 261 -1332 635 -1326 640 4 4 319 154 698 13 | 334 380 181 700 334 713 342 22 14 22 18 22 202 0 192 -4 213 -39 211 -9 -1 14 | -430 -198 -936 -440z"/> 15 | <path d="M3565 2705 c-60 -30 -447 -215 -860 -412 -734 -351 -789 -380 -742 16 | -399 8 -3 64 18 123 47 247 118 1220 581 1232 586 9 4 12 -143 12 -713 l1 17 | -719 42 -20 c23 -11 117 -60 210 -108 l167 -88 0 921 c0 616 -3 928 -10 941 18 | -17 30 -55 22 -175 -36z"/> 19 | <path d="M24 2735 c-4 -9 -3 -20 2 -25 5 -4 395 -191 867 -416 l857 -408 0 20 | -733 c0 -403 -1 -733 -3 -733 -2 0 -377 178 -833 395 -456 218 -841 398 -856 21 | 402 -37 7 -39 -7 -36 -210 l3 -168 870 -415 c478 -228 876 -413 885 -412 13 3 22 | 15 105 15 956 l0 953 -860 410 c-473 225 -870 412 -882 415 -16 4 -25 1 -29 23 | -11z"/> 24 | </g> 25 | </svg> 26 | -------------------------------------------------------------------------------- /plugins/datart-threejs-bingdundun/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] Three.js BingDunDun Sample 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ![ThreeJS](./bigndundun.png) 7 | 8 | ## 使用说明 9 | 10 | ### 数据区域配置 11 | 12 | ### 样式区域配置 13 | 14 | 15 | -------------------------------------------------------------------------------- /plugins/datart-threejs-bingdundun/bigndundun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-threejs-bingdundun/bigndundun.png -------------------------------------------------------------------------------- /plugins/datart-threejs-bingdundun/bingdundun.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-threejs-bingdundun/bingdundun.glb -------------------------------------------------------------------------------- /plugins/datart-threejs-bingdundun/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { BingDunDun } from "./experiment-threejs-bingdundun"; 20 | 21 | export default BingDunDun; 22 | -------------------------------------------------------------------------------- /plugins/datart-threejs-bingdundun/threejs-icon.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <svg version="1.1" viewBox="0 0 226.77 226.77" xmlns="http://www.w3.org/2000/svg"> 3 | <g transform="translate(8.964 4.2527)"> 4 | <path d="m63.02 200.61-43.213-174.94 173.23 49.874z"/> 5 | <path d="m106.39 50.612 21.591 87.496-86.567-24.945z"/> 6 | <path d="m84.91 125.03-10.724-43.465 43.008 12.346z"/> 7 | <path d="m63.458 38.153 10.724 43.465-43.008-12.346z"/> 8 | <path d="m149.47 62.93 10.724 43.465-43.008-12.346z"/> 9 | <path d="m84.915 125.06 10.724 43.465-43.008-12.346z"/> 10 | </g> 11 | </svg> 12 | -------------------------------------------------------------------------------- /plugins/datart-threejs-industry/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] Three.js Industry Sample 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ![ThreeJS](./callada.gif) 7 | 8 | ## 使用说明 9 | https://github.com/mrdoob/three.js/blob/master/examples/webgl_loader_ifc.html -------------------------------------------------------------------------------- /plugins/datart-threejs-industry/callada.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-threejs-industry/callada.gif -------------------------------------------------------------------------------- /plugins/datart-threejs-industry/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { ThreeJSWebGLIndustry } from "./experiment-threejs-industry"; 20 | 21 | export default ThreeJSWebGLIndustry; 22 | -------------------------------------------------------------------------------- /plugins/datart-threejs-industry/sample.js: -------------------------------------------------------------------------------- 1 | const mockData = [ 2 | { 3 | Year: 2016, 4 | "Number of incidents": "13,488", 5 | Deaths: "34,676", 6 | Injuries: "39,851", 7 | }, 8 | { 9 | Year: 2015, 10 | "Number of incidents": "14,852", 11 | Deaths: "38,464", 12 | Injuries: "43,960", 13 | }, 14 | { 15 | Year: 2014, 16 | "Number of incidents": "16,860", 17 | Deaths: "43,566", 18 | Injuries: "41,061", 19 | }, 20 | { 21 | Year: 2013, 22 | "Number of incidents": "11,996", 23 | Deaths: "22,234", 24 | Injuries: "37,666", 25 | }, 26 | { 27 | Year: 2012, 28 | "Number of incidents": "8,500", 29 | Deaths: "15,436", 30 | Injuries: "25,486", 31 | }, 32 | { 33 | Year: 2011, 34 | "Number of incidents": "5,071", 35 | Deaths: "8,228", 36 | Injuries: "14,652", 37 | }, 38 | { 39 | Year: 2010, 40 | "Number of incidents": "4,822", 41 | Deaths: "7,727", 42 | Injuries: "15,860", 43 | }, 44 | { 45 | Year: 2009, 46 | "Number of incidents": "4,719", 47 | Deaths: "9,271", 48 | Injuries: "19,128", 49 | }, 50 | { 51 | Year: 2008, 52 | "Number of incidents": "4,803", 53 | Deaths: "9,135", 54 | Injuries: "18,984", 55 | }, 56 | { 57 | Year: 2007, 58 | "Number of incidents": "3,241", 59 | Deaths: "12,858", 60 | Injuries: "22,453", 61 | }, 62 | { 63 | Year: 2006, 64 | "Number of incidents": "2,749", 65 | Deaths: "9,362", 66 | Injuries: "15,551", 67 | }, 68 | { 69 | Year: 2005, 70 | "Number of incidents": "2,009", 71 | Deaths: "6,313", 72 | Injuries: "12,769", 73 | }, 74 | { 75 | Year: 2004, 76 | "Number of incidents": "1,162", 77 | Deaths: "5,718", 78 | Injuries: "11,817", 79 | }, 80 | { 81 | Year: 2003, 82 | "Number of incidents": "1,262", 83 | Deaths: "3,278", 84 | Injuries: "7,091", 85 | }, 86 | { 87 | Year: 2002, 88 | "Number of incidents": "1,332", 89 | Deaths: "4,799", 90 | Injuries: "7,103", 91 | }, 92 | { 93 | Year: 2001, 94 | "Number of incidents": "1,907", 95 | Deaths: "7,743", 96 | Injuries: "21,151", 97 | }, 98 | { 99 | Year: 2000, 100 | "Number of incidents": "1,813", 101 | Deaths: "4,402", 102 | Injuries: "5,869", 103 | }, 104 | { 105 | Year: 1999, 106 | "Number of incidents": "1,395", 107 | Deaths: "3,388", 108 | Injuries: "5,341", 109 | }, 110 | { 111 | Year: 1998, 112 | "Number of incidents": 933, 113 | Deaths: "4,688", 114 | Injuries: "8,183", 115 | }, 116 | { 117 | Year: 1997, 118 | "Number of incidents": "3,200", 119 | Deaths: "10,928", 120 | Injuries: "9,174", 121 | }, 122 | { 123 | Year: 1996, 124 | "Number of incidents": "3,056", 125 | Deaths: "6,965", 126 | Injuries: "10,781", 127 | }, 128 | { 129 | Year: 1995, 130 | "Number of incidents": "3,081", 131 | Deaths: "6,094", 132 | Injuries: "14,288", 133 | }, 134 | { 135 | Year: 1994, 136 | "Number of incidents": "3,458", 137 | Deaths: "7,691", 138 | Injuries: "7,573", 139 | }, 140 | { 141 | Year: 1993, 142 | "Number of incidents": 747, 143 | Deaths: "2,669", 144 | Injuries: "5,600", 145 | }, 146 | { 147 | Year: 1992, 148 | "Number of incidents": "5,073", 149 | Deaths: "9,745", 150 | Injuries: "9,927", 151 | }, 152 | { 153 | Year: 1991, 154 | "Number of incidents": "4,683", 155 | Deaths: "8,429", 156 | Injuries: "7,591", 157 | }, 158 | { 159 | Year: 1990, 160 | "Number of incidents": "3,887", 161 | Deaths: "7,148", 162 | Injuries: "6,128", 163 | }, 164 | { 165 | Year: 1989, 166 | "Number of incidents": "4,323", 167 | Deaths: "8,136", 168 | Injuries: "5,512", 169 | }, 170 | { 171 | Year: 1988, 172 | "Number of incidents": "3,720", 173 | Deaths: "7,189", 174 | Injuries: "6,860", 175 | }, 176 | { 177 | Year: 1987, 178 | "Number of incidents": "3,184", 179 | Deaths: "6,476", 180 | Injuries: "5,769", 181 | }, 182 | { 183 | Year: 1986, 184 | "Number of incidents": "2,860", 185 | Deaths: "4,976", 186 | Injuries: "5,814", 187 | }, 188 | { 189 | Year: 1985, 190 | "Number of incidents": "2,915", 191 | Deaths: "7,094", 192 | Injuries: "5,130", 193 | }, 194 | { 195 | Year: 1984, 196 | "Number of incidents": "3,495", 197 | Deaths: "10,450", 198 | Injuries: "5,291", 199 | }, 200 | { 201 | Year: 1983, 202 | "Number of incidents": "2,870", 203 | Deaths: "9,444", 204 | Injuries: "4,047", 205 | }, 206 | { 207 | Year: 1982, 208 | "Number of incidents": "2,545", 209 | Deaths: "5,135", 210 | Injuries: "3,342", 211 | }, 212 | { 213 | Year: 1981, 214 | "Number of incidents": "2,585", 215 | Deaths: "4,851", 216 | Injuries: "3,337", 217 | }, 218 | { 219 | Year: 1980, 220 | "Number of incidents": "2,662", 221 | Deaths: "4,391", 222 | Injuries: "3,645", 223 | }, 224 | { 225 | Year: 1979, 226 | "Number of incidents": "2,661", 227 | Deaths: "2,100", 228 | Injuries: "2,502", 229 | }, 230 | { 231 | Year: 1978, 232 | "Number of incidents": "1,526", 233 | Deaths: "1,459", 234 | Injuries: "1,600", 235 | }, 236 | { 237 | Year: 1977, 238 | "Number of incidents": "1,319", 239 | Deaths: 456, 240 | Injuries: 518, 241 | }, 242 | { 243 | Year: 1976, 244 | "Number of incidents": 923, 245 | Deaths: 672, 246 | Injuries: 755, 247 | }, 248 | { 249 | Year: 1975, 250 | "Number of incidents": 740, 251 | Deaths: 617, 252 | Injuries: 617, 253 | }, 254 | { 255 | Year: 1974, 256 | "Number of incidents": 580, 257 | Deaths: 542, 258 | Injuries: 763, 259 | }, 260 | { 261 | Year: 1973, 262 | "Number of incidents": 473, 263 | Deaths: 370, 264 | Injuries: 495, 265 | }, 266 | { 267 | Year: 1972, 268 | "Number of incidents": 496, 269 | Deaths: 566, 270 | Injuries: 408, 271 | }, 272 | { 273 | Year: 1971, 274 | "Number of incidents": 470, 275 | Deaths: 173, 276 | Injuries: 82, 277 | }, 278 | { 279 | Year: 1970, 280 | "Number of incidents": 651, 281 | Deaths: 171, 282 | Injuries: 192, 283 | }, 284 | ]; 285 | 286 | export default mockData; 287 | -------------------------------------------------------------------------------- /plugins/datart-threejs-industry/threejs-icon.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <svg version="1.1" viewBox="0 0 226.77 226.77" xmlns="http://www.w3.org/2000/svg"> 3 | <g transform="translate(8.964 4.2527)"> 4 | <path d="m63.02 200.61-43.213-174.94 173.23 49.874z"/> 5 | <path d="m106.39 50.612 21.591 87.496-86.567-24.945z"/> 6 | <path d="m84.91 125.03-10.724-43.465 43.008 12.346z"/> 7 | <path d="m63.458 38.153 10.724 43.465-43.008-12.346z"/> 8 | <path d="m149.47 62.93 10.724 43.465-43.008-12.346z"/> 9 | <path d="m84.915 125.06 10.724 43.465-43.008-12.346z"/> 10 | </g> 11 | </svg> 12 | -------------------------------------------------------------------------------- /plugins/datart-threejs-webgl/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] Three.js Sample 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ![ThreeJS](./callada.gif) 7 | 8 | ## 使用说明 9 | 10 | ### 数据区域配置 11 | 12 | ### 样式区域配置 13 | 14 | 15 | -------------------------------------------------------------------------------- /plugins/datart-threejs-webgl/callada.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-threejs-webgl/callada.gif -------------------------------------------------------------------------------- /plugins/datart-threejs-webgl/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { ThreeJSWebGL } from "./experiment-threejs-webgl"; 20 | 21 | export default ThreeJSWebGL; 22 | -------------------------------------------------------------------------------- /plugins/datart-threejs-webgl/threejs-icon.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <svg version="1.1" viewBox="0 0 226.77 226.77" xmlns="http://www.w3.org/2000/svg"> 3 | <g transform="translate(8.964 4.2527)"> 4 | <path d="m63.02 200.61-43.213-174.94 173.23 49.874z"/> 5 | <path d="m106.39 50.612 21.591 87.496-86.567-24.945z"/> 6 | <path d="m84.91 125.03-10.724-43.465 43.008 12.346z"/> 7 | <path d="m63.458 38.153 10.724 43.465-43.008-12.346z"/> 8 | <path d="m149.47 62.93 10.724 43.465-43.008-12.346z"/> 9 | <path d="m84.915 125.06 10.724 43.465-43.008-12.346z"/> 10 | </g> 11 | </svg> 12 | -------------------------------------------------------------------------------- /plugins/datart-time/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] EChart 人均寿命演变图 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ![时序图](./time-series-chart.png) 7 | 8 | ## 使用说明 9 | 10 | ### 数据区域配置 11 | None 12 | ### 样式区域配置 13 | None 14 | -------------------------------------------------------------------------------- /plugins/datart-time/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { LifeExpectancyChart } from "./experiment-time-chart"; 20 | 21 | export default LifeExpectancyChart; 22 | -------------------------------------------------------------------------------- /plugins/datart-time/time-series-chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-time/time-series-chart.png -------------------------------------------------------------------------------- /plugins/datart-time/time.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1642129456592" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2098" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M852.335286 971.272293h-71.409378V803.137255v-85.900767a231.687639 231.687639 0 0 0-125.01006-205.498381 231.687639 231.687639 0 0 0 125.01006-205.49838V52.378517h71.409378a26.189258 26.189258 0 0 0 0-52.378517h-680.920716a26.189258 26.189258 0 0 0 0 52.378517h71.409377v254.035805a231.687639 231.687639 0 0 0 125.01006 205.49838 231.687639 231.687639 0 0 0-125.01006 205.323786v254.384995H171.41457a26.189258 26.189258 0 0 0 0 52.378517h680.920716a26.189258 26.189258 0 0 0 0-52.378517zM728.547391 52.378517v254.035805a178.959932 178.959932 0 0 1-2.79352 30.204945c-39.458483 12.047059-132.168457 32.998465-209.514067-5.587042-82.059676-41.204433-171.277749-26.887639-220.862745-13.094629V52.378517zM306.900333 369.093947c41.379028-11.872464 118.200853-25.490878 186.467519 8.729753a279.352089 279.352089 0 0 0 125.883035 27.586019 412.044331 412.044331 0 0 0 84.678602-9.253538 179.309122 179.309122 0 0 1-154.865815 89.567263h-74.552088a179.309122 179.309122 0 0 1-167.611253-116.629497z m167.611253 168.833419h11.174083v50.807161a26.189258 26.189258 0 0 0 52.378517 0v-50.807161h11.174084a179.483717 179.483717 0 0 1 179.309121 179.309122v66.520716c-32.649275 10.126513-109.4711 28.633589-180.705882 7.332992a192.054561 192.054561 0 0 1-31.07792-12.047059 244.433078 244.433078 0 0 0-36.490366-14.491389 333.127366 333.127366 0 0 0-185.070759 1.39676v-48.71202a179.483717 179.483717 0 0 1 179.309122-179.309122zM295.202464 971.272293V820.59676c8.031373-2.618926 18.856266-5.761637 31.7763-8.729752a310.953794 310.953794 0 0 1 73.679113-7.856778 234.131969 234.131969 0 0 1 55.346633 7.507588 195.371867 195.371867 0 0 1 37.188747 13.967604 242.687127 242.687127 0 0 0 28.109804 11.872464 295.240239 295.240239 0 0 0 98.122421 15.88815 422.170844 422.170844 0 0 0 109.121909-15.18977v132.692242z" p-id="2099"></path><path d="M511.874928 708.157545a26.189258 26.189258 0 0 0 26.189258-26.189259v-13.793009a26.189258 26.189258 0 0 0-52.378517 0v13.793009a26.189258 26.189258 0 0 0 26.189259 26.189259z" p-id="2100"></path></svg> -------------------------------------------------------------------------------- /plugins/datart-uml/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] 基于Mermaid的UML图 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ![时序图](./experiment-uml-chart.png) 7 | 8 | ## 使用说明 9 | 10 | 关于UML图插件的API使用,请参考Mermaid[官方文档和示例](https://mermaid-js.github.io/mermaid/#/) 11 | 12 | ### 数据区域配置 13 | 14 | ### 样式区域配置 15 | - 代码设置:直接以Text文本的形式编辑数据,后期可以使用Monaco Code作为数据编辑器,目前是纯文本框。 16 | - 水印设置:增加水印 17 | 18 | -------------------------------------------------------------------------------- /plugins/datart-uml/experiment-mermaid-uml-chart.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import icon from "./icon.svg"; 20 | 21 | export function MermaidUMLChart({ dHelper }) { 22 | const mockData = { 23 | code: `%%{config: { 'fontFamily': 'Menlo', 'fontSize': 12, 'fontWeight': 400} }%% 24 | %%{init: { 'logLevel': 'debug', 'theme': '' } }%% 25 | 26 | sequenceDiagram 27 | participant A as 项目主入口 28 | participant C as 图表管理器 29 | participant V as 可视化模块 30 | participant S as 后端服务 31 | 32 | A->>C: 初始化 Chart Manager 33 | C->>S: 请求插件图表路径集合 34 | S-->>C: 返回插件图表路径集合 35 | Note right of S: 服务端将从'custom-chart-plugins'文件夹读取自定义组件 36 | loop 插件集合 37 | C->>S: 下载插件图表 38 | S-->>C: 返回插件图表路文件 39 | C-->>C: 检查及加载插件图表文件 40 | end 41 | C->>C: 加载默认图表集合 42 | C-->>A: 完成图表初始化 43 | A->>V: 切换到可视化模块开始制作自定义图表 44 | V->>S: 保存制作完成的图表 45 | `, 46 | watermark: `Powered by Datart`, 47 | }; 48 | 49 | return { 50 | config: { 51 | datas: [], 52 | styles: [ 53 | { 54 | label: "code.title", 55 | key: "code", 56 | comType: "group", 57 | rows: [ 58 | { 59 | label: "code.area", 60 | key: "area", 61 | comType: "text", 62 | options: {}, 63 | }, 64 | ], 65 | }, 66 | { 67 | label: "watermark.title", 68 | key: "watermark", 69 | comType: "group", 70 | rows: [ 71 | { 72 | label: "watermark.area", 73 | key: "area", 74 | comType: "text", 75 | options: {}, 76 | }, 77 | ], 78 | }, 79 | ], 80 | settings: [], 81 | i18ns: [ 82 | { 83 | lang: "zh-CN", 84 | translation: { 85 | code: { 86 | title: "代码设置", 87 | area: "编辑区", 88 | }, 89 | watermark: { 90 | title: "水印设置", 91 | area: "编辑区", 92 | }, 93 | }, 94 | }, 95 | { 96 | lang: "en", 97 | translation: { 98 | code: { 99 | title: "Code Setting", 100 | area: "Editor Block", 101 | }, 102 | watermark: { 103 | title: "Watermark Setting", 104 | area: "Editor Block", 105 | }, 106 | }, 107 | }, 108 | ], 109 | }, 110 | isISOContainer: "experiment-mermaid-uml-chart", 111 | dependency: [ 112 | "https://cdnjs.cloudflare.com/ajax/libs/mermaid/8.13.3/mermaid.min.js", 113 | ], 114 | meta: { 115 | id: "experiment-mermaid-uml-chart", 116 | name: "[Experiment] Mermaid UML", 117 | icon: icon, 118 | requirements: [ 119 | { 120 | group: null, 121 | aggregate: null, 122 | }, 123 | ], 124 | }, 125 | _containerId: null, 126 | 127 | onMount(options, context) { 128 | this._containerId = options.containerId; 129 | if ("mermaid" in context.window) { 130 | this.chart = context.window.mermaid.mermaidAPI; 131 | this.chart.initialize({ 132 | startOnLoad: false, 133 | }); 134 | } 135 | }, 136 | 137 | onUpdated(options, context) { 138 | const styles = options.config.styles; 139 | const code = 140 | dHelper.getValue(styles, ["code", "area"]) || mockData.code; 141 | const watermark = 142 | dHelper.getValue(styles, ["watermark", "area"]) || 143 | mockData.watermark; 144 | var outputDiv = context.document.getElementById(this._containerId); 145 | 146 | if (this.chart && outputDiv) { 147 | this.chart.render("theGraph", code, function (svgCode) { 148 | outputDiv.style.position = "relative"; 149 | outputDiv.style.overflow = "hidden"; 150 | outputDiv.style.margin = "20px"; 151 | outputDiv.innerHTML = svgCode; 152 | }); 153 | this.addWatermark(outputDiv, watermark, context); 154 | } 155 | }, 156 | 157 | onUnMount() { 158 | // this.chart && this.chart.dispose(); 159 | }, 160 | 161 | onResize(opt, context) { 162 | // this.chart && this.chart.resize(context); 163 | }, 164 | 165 | addWatermark(targetEle, watermark, context) { 166 | if (!watermark) { 167 | return; 168 | } 169 | const watermarkDiv = context.document.createElement("div"); 170 | watermarkDiv.style.position = "absolute"; 171 | watermarkDiv.style.left = "-50%"; 172 | watermarkDiv.style.top = "-50%"; 173 | watermarkDiv.style.width = "200%"; 174 | watermarkDiv.style.height = "200%"; 175 | watermarkDiv.style.color = "#f1f1f1"; 176 | watermarkDiv.style["line-height"] = "90px"; 177 | watermarkDiv.style["z-index"] = 1; 178 | watermarkDiv.style["font-size"] = "18px"; 179 | watermarkDiv.style["-webkit-transform"] = "rotate(-45deg)"; 180 | watermarkDiv.style["-webkit-transform"] = "rotate(-45deg)"; 181 | watermarkDiv.innerHTML = ` 182 | <p>${Array(Math.ceil((1 / watermark.length) * 2000)) 183 | .fill(`${watermark}`) 184 | .join(Array(20).fill(" ").join(" "))}</p> 185 | `; 186 | targetEle.appendChild(watermarkDiv); 187 | }, 188 | }; 189 | } 190 | -------------------------------------------------------------------------------- /plugins/datart-uml/experiment-uml-chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-uml/experiment-uml-chart.png -------------------------------------------------------------------------------- /plugins/datart-uml/icon.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1639279995753" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5363" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M149.33 517.97h341.34v106.65h42.66V517.97h341.34v127.97h42.67V475.3h-384v-85.33h-42.67v85.33h-384v170.65h42.67V517.97z m85.34 170.65H21.33A21.33 21.33 0 0 0 0 709.94v170.67c0 11.775 9.544 21.33 21.33 21.33h213.34c11.776 0 21.33-9.555 21.33-21.33V709.95c0-11.777-9.564-21.33-21.33-21.33z m384 0H405.33A21.33 21.33 0 0 0 384 709.94v170.67c0 11.775 9.544 21.33 21.33 21.33h213.34c11.776 0 21.33-9.555 21.33-21.33V709.95c0-11.777-9.564-21.33-21.33-21.33z m384 0H789.33A21.33 21.33 0 0 0 768 709.94v170.67c0 11.775 9.544 21.33 21.33 21.33h213.34c11.776 0 21.33-9.555 21.33-21.33V709.95c0-11.777-9.564-21.33-21.33-21.33zM341.33 325.98h341.34c11.776 0 21.33-9.554 21.33-21.34V133.98a21.34 21.34 0 0 0-21.33-21.34H341.33A21.33 21.33 0 0 0 320 133.98v170.66c0 11.776 9.544 21.34 21.33 21.34z" p-id="5364"></path></svg> -------------------------------------------------------------------------------- /plugins/datart-uml/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { MermaidUMLChart } from "./experiment-mermaid-uml-chart"; 20 | 21 | export default MermaidUMLChart; 22 | -------------------------------------------------------------------------------- /plugins/datart-vue-carousel/demo-vue-carousel.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import svgIcon from "./vue-carousel.svg"; 20 | 21 | export function DemoVueCarousel({ dHelper }) { 22 | return { 23 | config: { 24 | datas: [ 25 | { 26 | label: "dimension", 27 | key: "dimension", 28 | type: "group", 29 | }, 30 | { 31 | label: "filter", 32 | key: "filter", 33 | type: "filter", 34 | allowSameField: true, 35 | }, 36 | ], 37 | styles: [ 38 | { 39 | label: "carousel.title", 40 | key: "carousel", 41 | comType: "group", 42 | rows: [ 43 | { 44 | label: "carousel.interval", 45 | key: "interval", 46 | comType: "inputNumber", 47 | default: 3000, 48 | options: { 49 | min: 0, 50 | step: 1, 51 | }, 52 | }, 53 | ], 54 | }, 55 | ], 56 | settings: [ 57 | { 58 | label: "viz.palette.setting.paging.title", 59 | key: "paging", 60 | comType: "group", 61 | rows: [ 62 | { 63 | label: "viz.palette.setting.paging.pageSize", 64 | key: "pageSize", 65 | default: 1000, 66 | comType: "inputNumber", 67 | options: { 68 | needRefresh: true, 69 | step: 1, 70 | min: 0, 71 | }, 72 | }, 73 | ], 74 | }, 75 | ], 76 | i18ns: [ 77 | { 78 | lang: "zh-CN", 79 | translation: { 80 | chartName: "[Experiment] 用户自定义Vue跑马灯", 81 | carousel: { 82 | title: "跑马灯", 83 | interval: "切换间隔(毫秒)", 84 | }, 85 | }, 86 | }, 87 | { 88 | lang: "en-US", 89 | translation: { 90 | chartName: "[Experiment] Vue Carousel", 91 | carousel: { 92 | title: "Carousel", 93 | interval: "Interval(MS)", 94 | }, 95 | }, 96 | }, 97 | ], 98 | }, 99 | isISOContainer: "demo-customize-line-chart", 100 | dependency: ["https://cdn.jsdelivr.net/npm/vue@2.6.14"], 101 | meta: { 102 | id: "demo-vue-carousel", 103 | name: "chartName", 104 | icon: svgIcon, 105 | requirements: [ 106 | { 107 | group: 1, 108 | }, 109 | ], 110 | }, 111 | chartId: "vueCarousel", 112 | 113 | onMount(options, context) { 114 | if ("Vue" in context.window) { 115 | context.document.getElementById( 116 | options.containerId 117 | ).innerHTML = `<div id='${this.chartId}'></div>`; 118 | const Vue = context.window.Vue; 119 | this.chart = new Vue({ 120 | el: `#${this.chartId}`, 121 | template: this.getTemplate(), 122 | data: { 123 | nowIndex: 0, 124 | list: [], 125 | btnStyle: { 126 | display: "inline-block", 127 | margin: "0 20px", 128 | width: "10px", 129 | height: "10px", 130 | border: "1px solid #000", 131 | borderRadius: "50%", 132 | }, 133 | actionBtnStyle: { 134 | display: "inline-block", 135 | margin: "0 20px", 136 | width: "10px", 137 | height: "10px", 138 | border: "1px solid #000", 139 | borderRadius: "50%", 140 | background: "#000", 141 | }, 142 | setTime: 3000, 143 | timer: null, 144 | }, 145 | methods: { 146 | onClickBtn(index) { 147 | this.nowIndex = index; 148 | this.initInterval(); 149 | }, 150 | initInterval(time = this.setTime) { 151 | if (this.timer) { 152 | clearInterval(this.timer); 153 | } 154 | if (time) { 155 | this.timer = setInterval(() => { 156 | this.nowIndex += 1; 157 | if (this.nowIndex >= this.list.length) { 158 | this.nowIndex = 0; 159 | } 160 | }, time); 161 | } 162 | }, 163 | getImage(path) { 164 | return path; 165 | }, 166 | }, 167 | watch: { 168 | setTime: function (val) { 169 | this.initInterval(val); 170 | }, 171 | list: { 172 | handler: function (list) { 173 | if (list.length) { 174 | this.nowIndex = 0; 175 | this.initInterval(); 176 | } 177 | }, 178 | deep: true, 179 | }, 180 | }, 181 | mounted: function () { 182 | if (this.list.length) { 183 | this.initInterval(); 184 | } 185 | }, 186 | }); 187 | } 188 | }, 189 | 190 | onUpdated(props) { 191 | if (!props.dataset || !props.dataset.columns || !props.config) { 192 | return; 193 | } 194 | const dataConfigs = props.config.datas || []; 195 | const groupConfigs = dataConfigs 196 | .filter((c) => c.type === "group") 197 | .flatMap((config) => config.rows || []); 198 | const styleConfigs = props.config.styles || []; 199 | const chartDataSet = dHelper.transformToDataSet( 200 | props.dataset.rows, 201 | props.dataset.columns, 202 | dataConfigs 203 | ); 204 | 205 | const [interval] = dHelper.getStyles( 206 | styleConfigs, 207 | ["carousel"], 208 | ["interval"] 209 | ); 210 | this.chart.$data.list = chartDataSet.map((row) => 211 | row.getCell(groupConfigs[0]) 212 | ); 213 | this.chart.$data.setTime = interval !== void 0 ? interval : 3000; 214 | }, 215 | 216 | onUnMount() { 217 | if (this.chart.$data.timer) { 218 | clearInterval(this.chart.$data.timer); 219 | } 220 | this.chart = null; 221 | }, 222 | 223 | onResize() {}, 224 | 225 | getTemplate() { 226 | return ` 227 | <div style='padding-top: 2.5%;'> 228 | <div 229 | v-if='list.length' 230 | v-show='index === nowIndex' 231 | v-for='(item, index) in list' 232 | style='text-align: center; height: 80%; width: 100%;' 233 | > 234 | <img :src='getImage(item)' style='max-height: 100%; max-width: 100%;' /> 235 | </div> 236 | <div style='text-align: center; width: 100%; margin-top: 5%;' 237 | > 238 | <div 239 | v-if='list.length' 240 | v-for='(item, index) in list' 241 | :style='index === nowIndex ? actionBtnStyle : btnStyle' 242 | @click='onClickBtn(index)' 243 | /> 244 | </div> 245 | </div> 246 | `; 247 | }, 248 | }; 249 | } 250 | -------------------------------------------------------------------------------- /plugins/datart-vue-carousel/images/1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-vue-carousel/images/1.jpeg -------------------------------------------------------------------------------- /plugins/datart-vue-carousel/images/2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-vue-carousel/images/2.jpeg -------------------------------------------------------------------------------- /plugins/datart-vue-carousel/images/3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-vue-carousel/images/3.jpeg -------------------------------------------------------------------------------- /plugins/datart-vue-carousel/images/4.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-vue-carousel/images/4.jpeg -------------------------------------------------------------------------------- /plugins/datart-vue-carousel/images/5.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-vue-carousel/images/5.jpeg -------------------------------------------------------------------------------- /plugins/datart-vue-carousel/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { DemoVueCarousel } from "./demo-vue-carousel.js"; 20 | 21 | export default DemoVueCarousel; 22 | -------------------------------------------------------------------------------- /plugins/datart-vue-carousel/vue-carousel-csv.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-vue-carousel/vue-carousel-csv.xlsx -------------------------------------------------------------------------------- /plugins/datart-vue-carousel/vue-carousel.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-vue-carousel/vue-carousel.gif -------------------------------------------------------------------------------- /plugins/datart-vue-carousel/vue-carousel.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1647421818069" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2510" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" p-id="2511"></path><path d="M706.048 719.872h-389.12V292.864h389.12v427.008z m-330.752-57.856h272.384V350.72H375.296v311.296z" p-id="2512"></path><path d="M757.248 377.856h126.976v316.928h-126.976zM138.752 376.832h126.976v316.928H138.752z" p-id="2513"></path></svg> -------------------------------------------------------------------------------- /plugins/datart-vuejs/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] 基于VUEJS的图表 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ![VUEJS](./vuejs-chart.png) 7 | 8 | ## 使用说明 9 | 10 | ### 数据区域配置 11 | 12 | ### 样式区域配置 13 | -------------------------------------------------------------------------------- /plugins/datart-vuejs/experiment-vue-dynamic-chart.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import VueJSIcon from "./vuejs.svg"; 20 | 21 | export function VueDynamicChart({ dHelper }) { 22 | const getCode = () => { 23 | return ` 24 | \`\`\`js 25 | import Chart from 'app/pages/ChartWorkbenchPage/models/Chart'; 26 | import { getStyleValueByGroup } from 'app/utils/chart'; 27 | import Config from './config'; 28 | 29 | class VueJSChart extends Chart { 30 | constructor() { 31 | super('vue-chart', 'DEMO - VueJS Chart', 'star'); 32 | } 33 | 34 | isISOContainer = 'vue-chart-container'; 35 | config = Config; 36 | dependency = [ 37 | 'https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js', 38 | 'https://cdn.jsdelivr.net/npm/vue-markdown@2.2.4/dist/vue-markdown.js', 39 | 'https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/4.0.0/github-markdown.min.css', 40 | ]; 41 | chart: any = null; 42 | nodeId = 'vue'; 43 | 44 | onMount(options, context): void { 45 | const node = context.document.createElement('div'); 46 | node.setAttribute('id', this.nodeId); 47 | context.document.getElementById(options.containerId).appendChild(node); 48 | 49 | const Vue = context.window.Vue; 50 | Vue.use(context.window.VueMarkdown); 51 | this.chart = new Vue({ 52 | el: \`#\${this.nodeId}\`, 53 | data: { vue: 'Hello', person: { name: 'Stephen' }, content: getCode() }, 54 | template: this.getTemplate(), 55 | methods: { 56 | greet: function (event) { 57 | alert('Hello My Friends ~ this.me'); 58 | }, 59 | }, 60 | }); 61 | } 62 | 63 | onUpdated(options, context): void { 64 | if (!this.isMatchRequirement(options.config)) { 65 | return; 66 | } 67 | 68 | const name = this.getInfo(options?.config?.styles); 69 | this.chart.$set(this.chart.person, 'name', name); 70 | } 71 | 72 | onUnMount(): void {} 73 | 74 | private getInfo(styleConfigs) { 75 | const name = getStyleValueByGroup(styleConfigs, 'label', 'name'); 76 | return name; 77 | } 78 | 79 | private getTemplate() { 80 | return \` 81 | <div class="markdown-body"> 82 | <a-collapse :accordion="true" default-active-key="2" :bordered="false"> 83 | <a-collapse-panel key="1" name="Welcom~"> 84 | <p>{{ vue }} {{ person.name }} ,</p> 85 | <p>Welcome to VueJS Chart Demo ~ <button v-on:click="greet">Greet</button></p> 86 | </a-collapse-panel> 87 | <a-collapse-panel key="3" name="code bloks"> 88 | <vue-markdown> 89 | {{content}} 90 | </vue-markdown> 91 | </a-collapse-panel> 92 | </a-collapse> 93 | </div> 94 | \`; 95 | } 96 | } 97 | \`\`\` 98 | `; 99 | }; 100 | 101 | return { 102 | config: { 103 | styles: [ 104 | { 105 | label: "label", 106 | key: "label", 107 | comType: "group", 108 | rows: [ 109 | { 110 | label: "name", 111 | key: "name", 112 | default: "Friends", 113 | comType: "input", 114 | }, 115 | { 116 | label: "font", 117 | key: "font", 118 | comType: "font", 119 | default: { 120 | fontFamily: "PingFang SC", 121 | fontSize: "24", 122 | fontWeight: "normal", 123 | fontStyle: "normal", 124 | color: "yellow", 125 | }, 126 | }, 127 | ], 128 | }, 129 | ], 130 | i18ns: [ 131 | { 132 | lang: "zh-CN", 133 | translation: { 134 | label: "标签", 135 | name: "你的姓名", 136 | }, 137 | }, 138 | { 139 | lang: "en-US", 140 | translation: { 141 | label: "Label", 142 | name: "Your Name", 143 | }, 144 | }, 145 | ], 146 | }, 147 | isISOContainer: "experiment-vue-dynamic-chart", 148 | dependency: [ 149 | "https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js", 150 | "https://cdn.jsdelivr.net/npm/vue-markdown@2.2.4/dist/vue-markdown.js", 151 | "https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/4.0.0/github-markdown.min.css", 152 | ], 153 | meta: { 154 | id: "experiment-vue-dynamic-chart", 155 | name: "[Experiment] VUEJS Chart", 156 | icon: VueJSIcon, 157 | requirements: [ 158 | { 159 | group: null, 160 | aggregate: null, 161 | }, 162 | ], 163 | }, 164 | 165 | onMount(options, context) { 166 | const node = context.document.createElement("div"); 167 | node.setAttribute("id", this.nodeId); 168 | context.document.getElementById(options.containerId).appendChild(node); 169 | 170 | const Vue = context.window.Vue; 171 | Vue.use(context.window.VueMarkdown); 172 | this.chart = new Vue({ 173 | el: `#${this.nodeId}`, 174 | data: { vue: "Hello", person: { name: "Stephen" }, content: getCode() }, 175 | template: this.getTemplate(), 176 | methods: { 177 | greet: function (event) { 178 | alert("Hello My Friends ~ this.me"); 179 | }, 180 | }, 181 | }); 182 | }, 183 | 184 | onUpdated(options, context) { 185 | if (!this.isMatchRequirement(options.config)) { 186 | return; 187 | } 188 | 189 | const name = this.getInfo(options?.config?.styles); 190 | this.chart.$set(this.chart.person, "name", name); 191 | }, 192 | 193 | onUnMount() { 194 | // this.chart && this.chart.dispose(); 195 | }, 196 | 197 | onResize(opt, context) { 198 | // this.chart && this.chart.resize(context); 199 | }, 200 | 201 | getInfo(styleConfigs) { 202 | const name = dHelper.getValue(styleConfigs, ["label", "name"]); 203 | return name; 204 | }, 205 | 206 | getTemplate() { 207 | return ` 208 | <div class="markdown-body"> 209 | <a-collapse :accordion="true" default-active-key="2" :bordered="false"> 210 | <a-collapse-panel key="1" name="Welcom~"> 211 | <p>{{ vue }} {{ person.name }} ,</p> 212 | <p>Welcome to VueJS Chart Demo ~ <button v-on:click="greet">Greet</button></p> 213 | </a-collapse-panel> 214 | <a-collapse-panel key="3" name="code bloks"> 215 | <vue-markdown> 216 | {{content}} 217 | </vue-markdown> 218 | </a-collapse-panel> 219 | </a-collapse> 220 | </div> 221 | `; 222 | }, 223 | }; 224 | } 225 | -------------------------------------------------------------------------------- /plugins/datart-vuejs/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { VueDynamicChart } from "./experiment-vue-dynamic-chart"; 20 | 21 | export default VueDynamicChart; 22 | -------------------------------------------------------------------------------- /plugins/datart-vuejs/vuejs-chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-vuejs/vuejs-chart.png -------------------------------------------------------------------------------- /plugins/datart-vuejs/vuejs.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1642129750527" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2648" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M777.8 128.6H624l-112 177.2-96-177.2H64L512 896 960 128.6h-182.2z m-602.4 64h107.6L512 589 740.8 192.6h107.6L512 769 175.4 192.6z" p-id="2649"></path></svg> -------------------------------------------------------------------------------- /plugins/datart-zrender/README.md: -------------------------------------------------------------------------------- 1 | ## [Experimental] ZRender Chart 2 | 3 | - [x] datart version: **1.0.0** 4 | - [x] status: **experimental** 5 | 6 | ![ZRender](./experiment-zrender-chart.png) 7 | 8 | ## 使用说明 9 | 10 | ### 数据区域配置 11 | 12 | ### 样式区域配置 13 | 14 | 15 | -------------------------------------------------------------------------------- /plugins/datart-zrender/experiment-zrender-chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-zrender/experiment-zrender-chart.png -------------------------------------------------------------------------------- /plugins/datart-zrender/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Datart 3 | * 4 | * Copyright 2021 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | import { ZRenderChart } from "./experiment-zrender-chart"; 20 | 21 | export default ZRenderChart; 22 | -------------------------------------------------------------------------------- /plugins/datart-zrender/zrender-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/running-elephant/datart-extension-charts/71c8619a32982b3b0397798143d0c3f2d332cbaa/plugins/datart-zrender/zrender-logo.png -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import json from "@rollup/plugin-json"; 2 | import { terser } from "rollup-plugin-terser"; 3 | import svg from "rollup-plugin-svg"; 4 | import progress from "rollup-plugin-progress"; 5 | import typescript from "@rollup/plugin-typescript"; 6 | import { nodeResolve } from '@rollup/plugin-node-resolve'; 7 | 8 | const fs = require("fs"); 9 | 10 | const pluginFolders = (assetFileNames) => { 11 | const dir = fs.readdirSync(`./plugins`); 12 | if (assetFileNames) { 13 | return dir.filter((f) => f.match(assetFileNames)); 14 | } 15 | return dir.filter((f) => f.match(/^datart*/)); 16 | }; 17 | 18 | export default (commandLineArgs) => { 19 | const assetFileNames = commandLineArgs?.assetFileNames; 20 | const plugins = pluginFolders(assetFileNames); 21 | const config = (plugins || []).map((name) => { 22 | return { 23 | input: `plugins/${name}/index.js`, 24 | output: { 25 | file: `dist/${name}.iife.js`, 26 | format: "iife", 27 | }, 28 | plugins: [ 29 | nodeResolve(), 30 | progress({ 31 | clearLine: false, 32 | }), 33 | json(), 34 | svg({ base64: false }), 35 | terser({ 36 | compress: { 37 | defaults: false, 38 | }, 39 | }), 40 | typescript(), 41 | ], 42 | watch: { 43 | include: "plugins/**", 44 | exclude: "node_modules/**", 45 | }, 46 | }; 47 | }); 48 | return config; 49 | }; 50 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "noImplicitAny": false, 4 | "target": "es5", 5 | "lib": ["es5", "es6", "dom"], 6 | "module": "esnext", 7 | "removeComments": true, 8 | "preserveConstEnums": true, 9 | "esModuleInterop": true, 10 | "moduleResolution": "node", 11 | "isolatedModules": true, 12 | "noEmit": true, 13 | "strict": true, 14 | "skipLibCheck": true, 15 | "resolveJsonModule": true 16 | }, 17 | "include": ["plugins/**/*", "index.d.ts"], 18 | "exclude": ["node_modules", "**/*.spec.ts"] 19 | } 20 | --------------------------------------------------------------------------------