juijs-chart

2.6.12 • Public • Published

Installation

NPM

npm install juijs-chart

Browser

<script src="../dist/vendors.js"></script>
<script src="../dist/jui-chart.js"></script>

ES Modules

The difference with the existing method is that you need to add the module directly using the 'use' function.

import graph from 'juijs-chart'
import BarBrush from 'juijs-chart/src/brush/bar.js'
import ColumnBrush from 'juijs-chart/src/brush/column.js'
import TitleWidget from 'juijs-chart/src/widget/title.js'

graph.use(BarBrush, ColumnBrush, TitleWidget);

Usage

<div id="chart"></div>

The UI component creation code is the same as the existing one.

graph.ready([ "chart.builder" ], function(builder) {
    var obj = builder("#chart", {
        width: 600,
        height : 600,
        theme : "classic",
        axis : {
            x : {
                type : "block",
                domain : "quarter",
                line : true
            },
            y : {
                type : "range",
                domain : function(d) { return [d.sales, d.profit ]; },
                step : 3,
                line : true,
                orient : "right"
            },
            data : [
                { quarter : "1Q", sales : 1, profit : 3 },
                { quarter : "2Q", sales : 3, profit : 2 },
                { quarter : "3Q", sales : 10, profit : 1 },
                { quarter : "4Q", sales : 0.49, profit : 4}
            ]
        },
        brush : [{
            type : "column",
            target : [ "sales", "profit" ]
        }],
        widget : [{
            type: "title",
            text: "hihi"
        }]
    });
});

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.6.12290latest

Version History

VersionDownloads (Last 7 Days)Published
2.6.12290
2.6.110
2.6.100
2.6.9441
2.6.80
2.6.70
2.6.60
2.6.50
2.6.41
2.6.32
2.6.20
2.6.10
2.6.02
2.5.230
2.5.222
2.5.211
2.5.201
2.5.190
2.5.182
2.5.171
2.5.160
2.5.150
2.5.140
2.5.130
2.5.121
2.5.110
2.5.100
2.5.90
2.5.80
2.5.70
2.5.60
2.5.50
2.5.41
2.5.30
2.5.20
2.5.10
2.5.00
2.4.52
2.4.41
2.4.30
2.4.21
2.4.11
2.3.12-es60
2.3.11-es60
2.3.10-es61
2.3.9-es61
2.3.8-es60
2.3.7-es60
2.3.6-es60
2.3.5-es60
2.3.4-es60
2.3.3-es60
2.3.2-es60
2.3.1-es61
2.3.0-es60
2.2.6-es60
2.2.5-es62
2.2.4-es60
2.2.3-es61
2.2.2-es60
2.2.1-es61
2.2.0-es60
2.1.10-es60
2.1.9-es60
2.1.8-es60
2.1.7-es63
2.1.6-es60
2.1.5-es60
2.1.4-es60
2.1.3-es60
2.1.2-es61
2.1.1-es60
0.0.1-es61
2.1.10
2.1.0-rc.121
2.1.0-rc.110
2.1.0-rc.100
2.1.0-rc.91
2.1.0-rc.80
2.1.0-webpack1
2.1.0-rc.71
2.1.0-rc.60
2.1.0-rc.50
2.1.0-rc.41
2.1.0-rc.30
2.1.0-rc.20
2.1.0-rc.10

Package Sidebar

Install

npm i juijs-chart

Weekly Downloads

767

Version

2.6.12

License

MIT

Unpacked Size

4.35 MB

Total Files

129

Last publish

Collaborators

  • seogi1004