# mithril-node-linechart

> Line chart component for Mithril NodeJS

Latest version **1.0.0** (published 2016-07-08) · 0 weekly downloads

## Install

```sh
npm install mithril-node-linechart
pnpm add mithril-node-linechart
yarn add mithril-node-linechart
bun add mithril-node-linechart
```

## 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 | 1.0.0 |
| Published | 2016-07-08 |
| First published | 2016-07-08 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Maintainers | juju013 |
| Keywords | mithril, nodejs, linechart |

## Links

- npm: https://www.npmjs.com/package/mithril-node-linechart
- Repository: https://github.com/mithril-components/mithril-node-linechart
- Homepage: https://github.com/mithril-components/mithril-node-linechart#readme
- Issues: https://github.com/mithril-components/mithril-node-linechart/issues
- npm.io page: https://npm.io/package/mithril-node-linechart

## Dependencies (1)

- [mithril](https://npm.io/package/mithril.md) ^0.2.0

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-07-08

## README

node-mithril-linechart
======================

A simple SVG line chart component for Mithril and NodeJS.

![Line chart screenshot](screenshot.png)

Usage
=====
Add `linechart` to your dependencies on `package.json` file then:

    const linechart = require("linechart");
    const model = {
        "lines": [
            {
                "title": "A",
                "color": "#ff33ee",
                "data": [
                    {
                        "label": "Sample label",
                        "value": 100,
                        "tooltip": "More details"
                    },
                    ...
                ]
            },
            {
                "title": "B",
                "color": "#2233ee",
                "data": [
                    {
                        "label": "Some label",
                        "value": 130,
                        "tooltip": "More details"
                    },
                    ...
                ]
            },
            ...
        ]
    };
    const ctrl = linechart.controller(model);
    const view = linechart.view(ctrl);

Options
=======

* **lines**: Define the lines of the line chart.
    * **title**: Define the title of the line.
    * **color**: Define the color of the line.
    * **data**: Define values to draw the line chart.
        * **label**: X value of the point.
        * **value**: Y value of the point.

Test
====

Setup [mithril-component-tools](https://github.com/mithril-components/mitthril-components-tools) first. Then:

    npm install
    mct test .

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