Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    g2-mobilepublic

    g2-mobile

    the mobile version of g2

    G2-mobile 是G2的一个子集,提供了常规图表满足移动端需求。它更轻量、更简洁。

    G2-mobile is a subset of G2, provides a regular graph to meet the needs of mobile terminal.It is more lightweight and more concise.

    Want to learn more? See the tutorial.

    For examples, see the demo gallery.

    Install

    npm install g2-mobile

    Usage

    var GM = require('g2-mobile');

    Example

    image

    GM.Global.pixelRatio = 2;
     
    var data = [
        {"tem":10,"city":"tokyo"},
        {"tem":4,"city":"newYork"},
        {"tem":3,"city":"berlin"}
      ];
     
    var chart = new GM.Chart({
      id: 'c1'
    });
     
    chart.source(data, {
        tem: {
            tickCount: 5
        }
    });
     
    chart.axis('city', {
        label:{
            font:'14px'
        },
      grid: null
    });
     
    chart.axis('tem', {
        label:{
            font:'14px'
        }
    });
     
    chart.interval().position('city*tem').color('city');
    chart.render();

    More details at G2 site.

    Keywords

    install

    npm i g2-mobile

    Downloadslast 7 days

    148

    version

    2.2.0-beta.3

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar
    • avatar
    • avatar