Git Product home page Git Product logo

weex-chart's Introduction

简介

图表插件是通过g2-mobile依赖gcanvas插件实现的

如何用weexpack命令安装使用

目前图表和gcanvas插件已经上传weex插件市场,可以通过weexpack plugin命令安装使用

1.安装weexpack

npm install -g weexpack

2.创建工程,比如myproj

weexpack create myproj

3.创建运行平台

cd myproj & weexpack platform add ios (需要android 则 weexpack platform add android)

4.添加图表插件

weexpack plugin add weex-chart (会检测到依赖插件并自动添加)

5.编译和运行demo

把demo文件(位于本repo的 examples/下的所有文件 你可以clone一下)拷贝到项目工程目录的src下,然后:

然后使用命令:weexpack run ios (android) 可在模拟器或者device上运行

用法及说明

<chart id="c1" width="750" height="400"></chart>
var G2=require('weex-chart')('g2');//使用g2这个chart 目前只支持g2-mobile
module.exports={
        ready:function(){
            var chart = new GM.Chart({
                    id: 'c1'
            });
            ...
            chart.render()
        }
}

G2-mobile语法请参照 g2-mobile 不支持内容 由于g2-mobile是给浏览器页面设计的 weex环境与浏览器环境有较大差异 因此一些g2-mobile的功能暂时无法支持,主要如下

  • animate 动画
  • guide 辅助线

如果您发现有别的特性或者api 无法支持 或者支持不好 请提交issue 谢谢

changelog

支持weex sdk 0.10.0

weex-chart's People

Contributors

kfeagle avatar exolution avatar littleseven avatar marywu avatar

Stargazers

Shaojun Dou 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.