Coder Social home page Coder Social logo

bizgoblin's Introduction

Document

API

Installation

npm

The NPM way is only install by shell:

# latest stable
$ npm install goblin-base

React Version

In react version, You mush repare react version greater then 15, and support 16 certainly.

npm

The NPM way is only install by shell:

# latest stable
$ npm install bizgoblin

Demo

To examine the demos in your local build, open to demo directory, and execute

$ npm run postinstall
$ cd ./demo && npm install
$ npm run start

and then browse to http://localhost:3000

License

MIT

bizgoblin's People

Contributors

raulzuo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bizgoblin's Issues

如何手动触发chart.clean()?

同一份数据源,切换数据展示类型(y轴),两份图表都被渲染出来。
image

在goblin中有commonChart类,希望可以暴露出clear方法

改变图表类型,会出现两个图表.

文档示例地址
修改如下:

class Demo extends React.Component {
  state = {
    type: 'interval',
  };
  onClick = () => {
    let { type } = this.state;
    type === 'interval' ? type = 'line' : type = 'interval';
    this.setState({ type });
  };
  render() {
    return (
      <div>
        <Chart height={300} width="100%" data={data} defs={defs} animate={{ type: 'scaley' }} pixelRatio={pixelRatio}>
          <Axis dataKey="year" label={{ fontSize: 8 }}/>
          <Axis dataKey="sales"/>
          <Tooltip showItemMarker={false} onShow={onShowTooltip}/>
          <Geom geom={this.state.type} position="year*sales"/>
          <Legend/>
        </Chart>
        <button onClick={this.onClick}>改变</button>
      </div>
    );
  }
}

confused data

const data = [
  { amount: 20, ratio: 0.1, memo: '学习', const: 'const' },
  { amount: 100, ratio: 0.5, memo: '睡觉', const: 'const' },
  { amount: 10, ratio: 0.05, memo: '吃饭', const: 'const' },
  { amount: 30, ratio: 0.15, memo: '讲礼貌', const: 'const' },
  { amount: 10, ratio: 0.05, memo: '其他', const: 'const' },
  { amount: 20, ratio: 0.1, memo: '运动', const: 'const' },
  { amount: 10, ratio: 0.05, memo: '暂无备注', const: 'const' }
]

In the demo, the const key seems needless, is there any reason to add it?

If so, users must to do an extra convert from origin data.

function convertData(data) {
  return data.map(value => {
    return {
      ...value,
      const: 'const'
    }
  })
}

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.