forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unfinished changes on 2.1. Commiting just in case
- Loading branch information
1 parent
9bab31a
commit 3121a5f
Showing
10 changed files
with
78,051 additions
and
65,362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,3 +33,4 @@ esm/ | |
lib/ | ||
tmp/ | ||
storybook-static/ | ||
plugins/funnel-chart-plugin/* |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# supersetx-funnel-chart-plugin | ||
|
||
This is the Supersetx Funnel Chart Plugin Superset Chart Plugin. | ||
|
||
### Usage | ||
|
||
To build the plugin, run the following commands: | ||
|
||
``` | ||
npm ci | ||
npm run build | ||
``` | ||
|
||
Alternatively, to run the plugin in development mode (=rebuilding whenever changes are made), start the dev server with the following command: | ||
|
||
``` | ||
npm run dev | ||
``` | ||
|
||
To add the package to Superset, go to the `superset-frontend` subdirectory in your Superset source folder (assuming both the `supersetx-funnel-chart-plugin` plugin and `superset` repos are in the same root directory) and run | ||
``` | ||
npm i -S ../../supersetx-funnel-chart-plugin | ||
``` | ||
|
||
After this edit the `superset-frontend/src/visualizations/presets/MainPreset.js` and make the following changes: | ||
|
||
```js | ||
import { SupersetxFunnelChartPlugin } from 'supersetx-funnel-chart-plugin'; | ||
``` | ||
|
||
to import the plugin and later add the following to the array that's passed to the `plugins` property: | ||
```js | ||
new SupersetxFunnelChartPlugin().configure({ key: 'supersetx-funnel-chart-plugin' }), | ||
``` | ||
|
||
After that the plugin should show up when you run Superset, e.g. the development server: | ||
|
||
``` | ||
npm run dev-server | ||
``` |
64 changes: 64 additions & 0 deletions
64
superset-frontend/plugins/funnel-chart-plugin/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"name": "funnel-chart-plugin", | ||
"version": "0.1.1", | ||
"description": "Funnel Chart Plugin", | ||
"sideEffects": false, | ||
"main": "dist/lib.js", | ||
|
||
"files": [ | ||
"dist" | ||
], | ||
"private": true, | ||
"scripts": { | ||
"build": "npm run build-cjs && npm run build-esm && npm run ts-types", | ||
"build-cjs": "babel src --extensions \".ts,.tsx,.js,.jsx\" --copy-files --out-dir lib", | ||
"build-clean": "npm run clean && npm run build", | ||
"build-esm": "BABEL_OUTPUT=esm babel src --extensions \".ts,.tsx,.js,.jsx\" --copy-files --out-dir esm", | ||
"dev": "BABEL_OUTPUT=esm babel src --extensions \".ts,.tsx,.js,.jsx\" --watch --copy-files --out-dir esm", | ||
"prebuild": "rimraf {lib,esm,tsconfig.tsbuildinfo,dist}", | ||
"postbuild": "npm run test", | ||
"ts-types": "tsc --build", | ||
"test": "jest" | ||
}, | ||
"author": "Aldrin Rayen", | ||
"license": "Apache-2.0", | ||
|
||
"dependencies": { | ||
"@babel/plugin-syntax-dynamic-import": "^7.8.3", | ||
"@babel/plugin-transform-runtime": "^7.21.0", | ||
"@babel/preset-react": "^7.18.6", | ||
"crypto-browserify": "^3.12.0", | ||
"echarts": "^5.4.1", | ||
"echarts-for-react": "^3.0.2", | ||
"file-loader": "^6.2.0" | ||
}, | ||
"peerDependencies": { | ||
"@superset-ui/chart-controls": "*", | ||
"@superset-ui/core": "*", | ||
"react": "^16.13.1" | ||
}, | ||
"devDependencies": { | ||
"@airbnb/config-babel": "^2.0.1", | ||
"@babel/cli": "^7.16.0", | ||
"@babel/core": "^7.21.0", | ||
"@babel/preset-env": "^7.20.2", | ||
"@types/jest": "^26.0.4", | ||
"babel-cli": "^6.26.0", | ||
"babel-core": "^6.26.3", | ||
"babel-loader": "^9.1.2", | ||
"babel-plugin-transform-object-rest-spread": "^6.26.0", | ||
"babel-plugin-transform-react-jsx": "^6.24.1", | ||
"babel-preset-env": "^1.7.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-preset-react": "^6.24.1", | ||
"babel-preset-stage-0": "^6.24.1", | ||
"babelify": "^10.0.0", | ||
"browserify": "^17.0.0", | ||
"jest": "^26.6.3", | ||
"rimraf": "^3.0.2", | ||
"typescript": "^4.1.2", | ||
"webpack": "^5.75.0", | ||
"webpack-cli": "^5.0.1", | ||
"webpack-node-externals": "^3.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters