# juijs-chart

> SVG-based JUI chart that can be used in the browser and Node.js. Support many types of charts. (Dashboard, Map, Topology, Full 3D)

Latest version **2.6.12** (published 2021-08-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install juijs-chart
pnpm add juijs-chart
yarn add juijs-chart
bun add juijs-chart
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.6.12 |
| Published | 2021-08-24 |
| First published | 2018-06-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 60 |
| Author | seogi1004 |
| Maintainers | seogi1004 |
| Keywords | HTML5, NodeJS, CSS, JS, JavaScript, SVG, Chart, Framework, Web development, free, MIT |

## Links

- npm: https://www.npmjs.com/package/juijs-chart
- Repository: https://github.com/juijs/jui-chart
- Homepage: https://github.com/juijs/jui-chart#readme
- Issues: https://github.com/juijs/jui-chart/issues
- npm.io page: https://npm.io/package/juijs-chart

## Dependencies (1)

- [juijs-graph](https://npm.io/package/juijs-graph.md) 1.1.4

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.6.12 (latest) — 2021-08-24
- 2.6.11 — 2020-12-15
- 2.6.10 — 2020-12-15
- 2.6.9 — 2019-11-18
- 2.6.8 — 2019-11-13
- 2.6.7 — 2019-11-13
- 2.6.6 — 2019-11-12
- 2.6.5 — 2019-11-11
- 2.6.4 — 2019-11-11
- 2.6.3 — 2019-10-15
- 2.6.2 — 2019-08-30
- 2.6.1 — 2019-07-10
- 2.6.0 — 2019-07-09
- 2.5.23 — 2019-07-08
- 2.5.22 — 2019-05-29
- … 72 more at https://npm.io/package/juijs-chart/versions

## README

## Installation

### NPM
```bash
npm install juijs-chart
```

### Browser

```html
<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.

```js
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

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

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

```js
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"
        }]
    });
});
```

---
_Source: https://npm.io/package/juijs-chart · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
