apexcharts实现带负数显示的区域曲线图效果代码

代码语言:html

所属分类:图表

代码描述:apexcharts实现带负数显示的区域曲线图效果代码

代码标签: apexcharts 负数 区域 曲线图

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />

    <style>
        #chart{max-width:650px;margin:35px auto}
    </style>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/apexcharts.js"></script>
</head>

<body>

    <div id="chart"></div>
    <script>
        var options = {
            series: [{
                name: 'north',
                data: [{
                    x: 1996,
                    y: 322
                }, {
                    x: 1997,
                    y: 324
                }, {
                    x: 1998,
                    y: 329
                }, {
                    x: 1999,
                    y: 342
                }, {
                    x: 2000,
                    y: 348
                }, {
                    x: 2001,
                    y: 334
                }, {
                    x: 2002,
                    y: 325
                }, {
                    x: 2003,
                    y: 316
                }, {
                    x: 2004,
                    y: 318
                }, {
                    x: 2005,
                    y: 330
                }, {
                    x: 2006,
                    y: 355
                }, {
                    x: 2007,
                    y: 366
                }, {
                    x: 2008,
                    y: 337
                }, {
                    x: 2009,
                    y: 352
                }, {
                    x: 2010,
                    y: 377
                }, {
                    x: 2011,
                    y: 383
                }, {
                    x: 2012,
                    y: 344
                }, {
                    x: 2013,
                    y: 366
                }, {
                    x: 2014,
                    y: 389
                }, {
                    x: 2015,
                    y: 334
                }]
            }, {
                name: 'south',
                data: [{
                    x: 1996,
                    y: 162
                }, {
                    x: 1997,
                    y: 90
                }, {
                    x: 1998,
                    y: 50
                }, {
                    x: 1999,
                    y: 77
                }, {
                    x: 2000,
                    y: 35
                }, {
                    x: 2001,
                    y: -45
                }, {
                    x: 2002,
                    y: -88
                }, {
                    x: 2003,
       .........完整代码请登录后点击上方下载按钮下载查看

网友评论0