Introduction • Demo • Tutorial • API• Cross-Platform
![](https://github.com/visactor/vchart/actions/workflows/bug-server.yml/badge.svg) ![](https://github.com/visactor/vchart/actions/workflows/unit-test.yml/badge.svg) [![npm Version](https://img.shields.io/npm/v/@visactor/vchart.svg)](https://www.npmjs.com/package/@visactor/vchart) [![npm Download](https://img.shields.io/npm/dm/@visactor/vchart.svg)](https://www.npmjs.com/package/@visactor/vchart) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/VisActor/VChart/blob/main/CONTRIBUTING.md#your-first-pull-request) ![](https://img.shields.io/badge/language-TypeScript-red.svg) [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/visactor/vchart/blob/main/LICENSE)VChart is a charting component library in VisActor visualization system. It wraps the charting logic based on visual grammar library VGrammar and the component encapsulation based on visual rendering engine VRender. The core capabilities are as follows:
This repository includes the following packages:
vchart
: The core code repository of VChartreact-vchart
: The VChart component encapsulated based on Reacttaro-vchart
: The VChart component encapsulated based on Tarolark-vchart
: The VChart component encapsulated based on Lark miniAPPtt-vchart
: The VChart component encapsulated based on TikTok miniAPPblock-vchart
: The VChart component encapsulated based on Lark Blockwx-vchart
:The VChart component encapsulated based on Wx miniAPPdocs
: VChart site source code, and also contains all Chinese and English documents, chart sample codes, etc. of the site.# npm
$ npm install @visactor/vchart
# yarn
$ yarn add @visactor/vchart
import VChart from '@visactor/vchart';
const spec = {
type: 'bar',
data: [
{
id: 'barData',
values: [
{ month: 'Monday', sales: 22 },
{ month: 'Tuesday', sales: 13 },
{ month: 'Wednesday', sales: 25 },
{ month: 'Thursday', sales: 29 },
{ month: 'Friday', sales: 38 }
]
}
],
xField: 'month',
yField: 'sales',
crosshair: {
xField: { visible: true }
}
};
// 'chart' is the id of your dom container, such as <div id="chart"></chart>
const vchart = new VChart(spec, { dom: 'chart' });
vchart.renderAsync();
First of all, please install @microsoft/rush
$ npm i --global @microsoft/rush
Then clone locally:
# clone
$ git clone git@github.com:VisActor/VChart.git
$ cd VChart
# install dependencies
$ rush update
# start vchart development server
$ rush start
# start react-vchart development server
$ rush react
# start site development server
$ rush docs
After installation & clone & update, run docs to preview documents locally.
# start vchart document server
$ rush docs
Project | Description |
---|---|
React-VChart | React interface for @VisActor/VChart |
OpenInula-VChart | OpenInula VChart Components |
OMI | Web Components Framework |
If you would like to contribute, please read the Code of Conduct and our contributing guide first。
Small streams converge to make great rivers and seas!