1.1.7 • Published 3 years ago

@topnet/base-charts v1.1.7

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

topnet-base-echarts 基础图表类库

一、安装

npm i @topnet/base-charts

二、使用

import { Tcharts } from "@topnet/base-charts";

var bar = Tcharts.init("", {
    element: document.getElementById("bar"),
    options: {
        title: {
        text: "k线图堆叠",
        },
        xAxis: {
        data: [
            "2017-10-24",
            "2017-10-25",
            "2017-10-26",
            "2017-10-27",
            "2017-10-25",
            "2017-10-26",
            "2017-10-27",
            "2017-10-25",
            "2017-10-26",
            "2017-10-27",
            "2017-10-25",
            "2017-10-26",
            "2017-10-27",
            "2017-10-25",
            "2017-10-26",
            "2017-10-27",
        ],
        },
        yAxis: {},
        series: [
        {
            type: "k",
            data: [
            [50, 34, 60, 20],
            [10, 35, 15, 50],
            [16, 38, 53, 44],
            [28, 35, 5, 32],
            [28, 35, 5, 32],
            [28, 35, 5, 32],
            [28, 35, 5, 32],
            [50, 34, 60, 20],
            [10, 35, 15, 50],
            [16, 38, 53, 44],
            [28, 35, 5, 32],
            [28, 35, 5, 32],
            [28, 35, 5, 32],
            [28, 35, 5, 32],
            ],
        },
        ],
        animationEasing: "elasticOut",
        animationDelayUpdate: function (idx) {
        return idx * 500;
        },
        animationDelay: function (idx) {
        return idx * 100 + 100;
        },
    },
});