Giter Site home page Giter Site logo

ryancui92 / echarts-composables Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 0.0 478 KB

Using ECharts in composable way

Home Page: https://echarts.ryancui.com/

License: MIT License

JavaScript 1.12% HTML 0.61% TypeScript 71.75% CSS 0.73% Vue 24.84% Dockerfile 0.95%

echarts-composables's People

Contributors

ryancui92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

echarts-composables's Issues

make more examples on docs

  1. write a documentation markdown inside the repo, using git's vcs to keep different versions docs
  2. keep only playground, no need for vitepress docs

a toy playground

  1. use pre-defined mock data or upload your own data or from API
  2. define the dimensions, metrics, meta, addons on visualized interface (dnd)
  3. code generated

Support multiple keys in metric and dimension definitions

Currently, when we want to declare multiple Bar metrics, we have:

const metrics = [
  {
    key: 'data1',
    visual: MetricType.Bar,
  },
  {
    key: 'data2',
    visual: MetricType.Bar,
  },
  {
    key: 'data3',
    visual: MetricType.Bar,
  },
]

It's a bit long-winded, so we introduce multiple key definitions:

const metrics = [
  {
    key: ['data1', 'data2', 'data3'],
    visual: MetricType.Bar,
  }
]

Same in dimension, which can accepted multiple key in some specific dimension type, like DimensionType.Series

const dimensions = [
  {
    key: ['type', 'time'],
    visual: DimensionType.Series,
  }
]

The case would generate a combined dimension from type and time as type-time. All datum would be joined with -.

The feature would be released with new major version.

split CategoryAxis into XAxis and YAxis

CategoryAxis is vague and useYAxisAsDimension is not intuitive. Since we don't usually 'rotate' the gragh once the requirement is determined, so the dimension axis should be set up earlier.

We decide to introduce DimensionType.XAxis and DimensionType.YAxis to let user determine how a graph should be show instead of assuming xAxis is dimension axis and then apply a hook to 'rotate' it. It would be much easier to understand and to implement too.

CategoryAxis would be preserved but labeled as deprecated, same to useYAxisAsDimension hook. The features would be released as a new major version.

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.