Git Product home page Git Product logo

taro-f2-sample's Introduction

taro-f2-sample

taro集成f2图表的示例

基于taro3, f2 3.7.7, 支持h5 微信小程序

F2图表具体使用方法请参考: https://github.com/antvis/f2

直接克隆代码 可查阅示例

没有使用npm安装f2,直接引入dist文件:https://unpkg.com/@antv/[email protected]/dist/f2-all.min.js

使用方式:

1.将src/f2拷贝到工程目录中 2.微信小程序需要在page的config文件中加入component引用:

  usingComponents: {
     "f2": "{path to f2}/f2-weapp/index",
   }

3.在页面中使用F2Chart组件:

  <F2Chart chartId='col-chart' init={this.colChart} className='f2-chart' />

  chartId: canvas的id
  init: f2图表的初始化函数
  className: 应用到canvas上面的class

ps: 获取点击的图表数据请参见示例页面

taro-f2-sample's People

Contributors

zhangwuh avatar

Stargazers

 avatar CongTao avatar huanlirui avatar

Watchers

 avatar

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.