# qchart-core

> The core of the qchart

Latest version **0.0.2** (published 2019-02-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install qchart-core
pnpm add qchart-core
yarn add qchart-core
bun add qchart-core
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2019-02-20 |
| First published | 2019-02-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 519.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | dpxr |
| Maintainers | justemit |

## Links

- npm: https://www.npmjs.com/package/qchart-core
- npm.io page: https://npm.io/package/qchart-core

## Dependencies (1)

- [sprite-extend-shapes](https://npm.io/package/sprite-extend-shapes.md) ^0.1.57

## Recent versions

- 0.0.2 (latest) — 2019-02-20
- 0.0.1 — 2019-02-20

## README

# qchart

创建 Chart 的方式如下：

```javascript
new qchart.Chart()
```

创建一个 chart 实例，返回一个 Chart 对象。

`new qchart.Chart()` 的流程如图。

<p align="center"><img src="http://dpxr-graph-bed.oss-cn-beijing.aliyuncs.com/chart-flow.png" alt="chart-flow"></p>

## 图表结构与交互

<p align="center"><img src="http://dpxr-graph-bed.oss-cn-beijing.aliyuncs.com/chart-structure.png" alt="chart-structure" height="400"></p>

## 绘制图表

绘制指定类型的图表的使用方法为：`chart.<visualType>()`。如绘制饼图：

```javascript
chart
  .pie({
    radius: 0.6,
    innerRadius: 0.2
  })
  .source() /* 数据 */
  .setDataFields(/* 数据处理方式 */)
```

在 `qchart` 中将传统的图表类型（如：`pie` 和 `line`）区分为 `visual`，意为一种可视类型。可以在一个 `chart` 上连续多次调用 `chart.<visualType>()`。

可以使用 `qchart.Chart.supportedVisuals()` 查看已支持的可视类型。

## plugin 插件

当需要使用额外的辅助组件时，`Chart` 提供了相应的插件机制应用辅助组件，方法签名为：`addPlugin(plugin)`。

```javascript
chart.addPlugin(/* some plugin */)
```

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