@dz-web/quote-chart

quote-chart

Usage no npm install needed!

<script type="module">
  import dzWebQuoteChart from 'https://cdn.skypack.dev/@dz-web/quote-chart';
</script>

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,
  },
});

DOCs