# line-chart

> Line Chart

Latest version **2.0.4** (published 2014-12-08) · 0 weekly downloads

## Install

```sh
npm install line-chart
pnpm add line-chart
yarn add line-chart
bun add line-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.0.4 |
| Published | 2014-12-08 |
| First published | 2014-10-14 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ocean |
| Maintainers | ocean |
| Keywords | line, chart, d3 |

## Links

- npm: https://www.npmjs.com/package/line-chart
- Repository: https://github.com/eHanlin/line-chart
- Issues: https://github.com/eHanlin/line-chart/issues
- npm.io page: https://npm.io/package/line-chart

## 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

- 2.0.4 (latest) — 2014-12-08
- 2.0.3 — 2014-12-02
- 2.0.2 — 2014-10-20
- 2.0.1 — 2014-10-19
- 2.0.0 — 2014-10-19
- 1.0.6 — 2014-10-15
- 1.0.5 — 2014-10-14
- 1.0.4 — 2014-10-14
- 1.0.3 — 2014-10-14
- 1.0.2 — 2014-10-14
- 1.0.1 — 2014-10-14
- 1.0.0 — 2014-10-14

## README

## Line Chart

## 說明
1.依賴於 D3.js

### 安裝 Install
1. sudo npm install d3

### 資料結構 Data structure
```
var data = [
           	{title: "寫作能力",	tTitle: "精熟平均", bTitle: "基礎平均", rightRate: 0.2, basicRate:0.5, skilledRate: 0.7}, 
           	{title: "形音義",		tTitle: "精熟平均", bTitle: "基礎平均", rightRate: 0.8, basicRate:0.6, skilledRate: 0.9}, 
           	{title: "詞句成語",	tTitle: "精熟平均", bTitle: "基礎平均", rightRate: 0.7, basicRate:0.5, skilledRate: 0.8},
           	{title: "java",		tTitle: "精熟平均", bTitle: "基礎平均", rightRate: 0.01, basicRate:0.5, skilledRate: 0.8},
           	{title: "java",		tTitle: "精熟平均", bTitle: "基礎平均", rightRate: 0.02, basicRate:0.5, skilledRate: 0.5},
           	{title: "java", 	tTitle: "精熟平均", bTitle: "基礎平均", rightRate: 1, basicRate:0.5, skilledRate: 0.8}
           ];

```

### 範例 examp
```html
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<title>radar chart</title>
	<meta name="author" content="ocean">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
	<link rel="stylesheet" href="./src/line-chart.css"/>
	<style>
		#box{
			width: 100%;
			height: 610px;
		}
	</style>
</head>
<body>
	<div id="lineBox"></div>
</body>

<script src="./node_modules/d3/d3.min.js"></script>
<script src="./src/line-chart.js"></script>

<script>
var data = [
           	{title: "寫作能力",  tTitle: "精熟平均", bTitle: "基礎平均", rightRate: 0.2, basicRate:0.5, skilledRate: 0.7}, 
           	{title: "形音義",	   tTitle: "精熟平均", bTitle: "基礎平均", rightRate: 0.8, basicRate:0.6, skilledRate: 0.9}, 
           	{title: "詞句成語",  tTitle: "精熟平均", bTitle: "基礎平均", rightRate: 0.7, basicRate:0.5, skilledRate: 0.8},
           	{title: "詞句成語2", tTitle: "精熟平均", bTitle: "基礎平均", rightRate: 1, basicRate:0.5, skilledRate: 0.8}
           ];
window.LineChart.draw("#lineBox", data);
window.LineChart.draw("#lineBox", data);

</script>
</html>

```



### 設定 Configure
```javascript
```

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