GithubHelp home page GithubHelp logo

huandzh / superset-ui-plugins-echarts-basic Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 3.0 467 KB

A plugin supporting Echarts basic radar chart for Superset

Home Page: https://echarts-basic.iamhd.top

License: Apache License 2.0

JavaScript 26.47% TypeScript 72.94% CSS 0.60%
superset plugin echarts

superset-ui-plugins-echarts-basic's Introduction

@dmicros/superset-ui-preset-chart-echarts-basic πŸ”ŒπŸ’‘

WIP.

The initial purpose of this repo is to support Echarts radar in Superset. You can also use it as a reference on how to support other visualizations of Echarts.

Available chart

Echarts Radar Chart

Snapshot in Superset:

Echarts Radar in Superset

See also:

Demo (Storybook)

Current master: http://echarts-basic.iamhd.top

Note: You have to customize your own netlify to use this.

Packages

Package Version Note
@dmicros/superset-ui-preset-chart-echarts-basic Version README

See README to use

Contribution and development guide

Please read the contributing guidelines which include development environment setup and other things you should know about coding in this repo.

Note: This repo is created with template at https://github.com/apache-superset/superset-ui-plugins-template .

Tips on developing new plugin

The following is a typical plugin class:

export default class EchartsBasicRadarPlugin extends ChartPlugin {
  constructor() {
    super({
      controlPanel,
      loadChart: () => import('../EchartsBase'),
      metadata,
      transformProps,
    });
  }
}

Let's break it down:

  • metadata - define the name and thumbnail displayed when user select a chart type to create
  • controlPanel - define control panel shown on left side when user edit a chart
  • loadChart - load react componet of a chart
  • transformProps - transform form data and query data into chart props, which includes visual settings and data in proper format

License

Apache-2.0

superset-ui-plugins-echarts-basic's People

Contributors

huandzh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

superset-ui-plugins-echarts-basic's Issues

How to install on superset

Hi,

Could you please explain how to install this plugin on superset ?

I have installed superset using OS dependencies, using Ubuntu.

Once installed, I do not have the folder superset/assets/src/setup nor the file superset/assets/src/setup/setupPluginsExtra.js.

More over, when I do yarn build, there is no build.

Can you please explain, step by step how to install your plugin ?

Thank you.

Can not start storybook

Describe the bug
Story book can not be started after following setup procedures in README.md

To Reproduce
Steps to reproduce the behavior:

  1. yarn install && yarn build
  2. cd packages/superset-ui-plugins-demo
  3. yarn storybook
  4. See error

Expected behavior
Storybook server started.

Screenshots

Stdout for last command:

yarn run v1.13.0
$ cd ../../ && yarn build && cd - && yarn storybook:run
$ yarn build:cjs && yarn build:esm && yarn run type:dts && yarn build:assets
$ NODE_ENV=production beemo babel --extensions=".js,.jsx,.ts,.tsx" ./src --out-dir lib/ --delete-dir-on-start --minify --workspaces="@superset-ui/!(plugins-demo)"
[1/2] CONFIG Creating config files
[2/2] DRIVER Running Babel v7.6.4 driver

πŸ€–  Powered by Beemo v1.0.6
$ NODE_ENV=production beemo babel --extensions=".js,.jsx,.ts,.tsx" ./src --out-dir esm/ --delete-dir-on-start --esm --minify --workspaces="@superset-ui/!(plugins-demo)"
[1/2] CONFIG Creating config files
[2/2] DRIVER Running Babel v7.6.4 driver

πŸ€–  Powered by Beemo v1.0.6
$ NODE_ENV=production beemo typescript --workspaces="@superset-ui/((preset|plugin)-*)" --emitDeclarationOnly
[1/2] CONFIG Creating config files
[2/2] DRIVER Running TypeScript v3.6.4 driver

πŸ€–  Powered by Beemo v1.0.6
$ node ./buildAssets.js
Copy packages/superset-ui-preset-chart-dummies/src/Watermelon/images/thumbnail.png
=> to packages/superset-ui-preset-chart-dummies/lib/Watermelon/images/thumbnail.png
Copy packages/superset-ui-plugin-chart-dummy/src/images/thumbnail.png
=> to packages/superset-ui-plugin-chart-dummy/esm/images/thumbnail.png
Copy packages/superset-ui-preset-chart-dummies/src/Watermelon/images/thumbnail.png
=> to packages/superset-ui-preset-chart-dummies/esm/Watermelon/images/thumbnail.png
Copy packages/superset-ui-plugin-chart-dummy/src/images/thumbnail.png
=> to packages/superset-ui-plugin-chart-dummy/lib/images/thumbnail.png
/Users/huandi/Dev/superset-ui-plugins-echarts-radar/packages/superset-ui-plugins-demo
$ start-storybook -p 9001
/bin/sh: start-storybook: command not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Environment (please complete the following information):

  • superset-ui version: [v0.12.0]
  • Node version: v10.15.3
  • npm version: 6.4.1

Support radar chart

Is your feature request related to a problem? Please describe.
Radar chart, which is very helpful for compare ratings, is not available yet.

Describe the solution you'd like
Build a plugin to support radar chart using echarts library.

Class constructor h cannot be invoked without 'new'

Describe the bug
A clear and concise description of what the bug is.
After installing the plugin, pages do not run and I see in console "Class constructor h cannot be invoked without 'new'".

It makes reference to the following line:
Capture d’écran 2020-03-22 aΜ€ 23 06 27

Please advise

Thank you.

Support settings on max in radar chart

Is your feature request related to a problem? Please describe.
In radar chart, the max of indictors can be customized.

Describe the solution you'd like
Add control panel section and modify transformProps

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.