@dz-web/quote-chart
v0.2.20
Published
quote-chart
Downloads
62
Readme
Install
npm install @dz-web/quote-chart
Or
yarn add @dz-web/quote-chart
Usage
import { QuoteChart, LineChart } from '@dz-web/quote-chart';
var time = [2, 24, 234, 234];
var ma5 = [2, 24, 234, 234];
var chart = new QuoteChart({
selector: '#quote-chart-container',
categoryAxis: {
data: [time],
},
grids: [
{
id: 'k-line',
precision: 2,
header: {
options: {
title: 'MA',
showCloseBtn: false,
showZoomInBtn: true,
showZoomOutBtn: true,
},
},
valueAxis: {
boundaryGap: [0, 0],
splitNumber: 3,
},
series: [
{
generator: LineChart,
type: 'main-auxiliary',
options: {
lineStyle: {
color: '#f58f24',
},
},
data: ma5,
},
],
},
],
categoryAxis: {
splitNumber: 5,
gap: [0, 1, 0, 1],
data: time,
},
});