highcharts-gantt实现项目进度管理甘蔗图时间表图表代码

代码语言:html

所属分类:图表

代码描述:highcharts-gantt实现项目进度管理甘蔗图时间表图表代码,可导出各种格式图片。

代码标签: highcharts-gantt 项目 进度 管理 甘蔗图 图表

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

<!DOCTYPE HTML>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">


    <style type="text/css">
        #container {
            max-width: 800px;
            margin: 1em auto;
        }
    </style>
</head>

<body>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/highcharts-gantt.js"></script>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/exporting.js"></script>

    <div id="container"></div>



    <script type="text/javascript">
        var today = new Date(),
            day = 1000 * 60 * 60 * 24,
            // Utility functions
            dateFormat = Highcharts.dateFormat,
            defined = Highcharts.defined,
            isObject = Highcharts.isObject,
            reduce = Highcharts.reduce;
        
        // Set to 00:00:00:000 today
        today.setUTCHours(0);
        today.setUTCMinutes(0);
        today.setUTCSeconds(0);
        today.setUTCMilliseconds(0);
        today = today.getTime();
        
        Highcharts.ganttChart('container', {
            series: [{
                name: 'Offices',
                data: [{
                    name: 'New offices',
                    id: 'new_offices',
                    owner: 'Peter'
                }, {
                    name: 'Prepare office building',
                    id: 'prepare_building',
                    parent: 'new_offices',
                    start: today - (2 * day),
                    end: today + (6 * day),
                    completed: {
                        amount: 0.2
                    },
                    owner: 'Linda'
                }, {
                    name: 'Inspect building',
                    id: 'inspect_building',
                    dependency: 'prepare_building',
                    parent: 'new_offices',
                    start: today + 6 * day,
                    end: today + 8 * day,
                    owner: 'Ivy'
                }, {
                    name: 'Passed inspection',
                    id: 'passed_inspection',
                    dependency: 'inspect_building',
                    parent: 'new_offices',
                    start: today + 9.5 * day,
                    milestone: true,
                    owner: 'Peter'
                }, {
                    name: 'Relocate',
                    id: 'relocate',
                    dependency: 'passed_inspection',
                    parent: 'new_offices',
                    owner: 'Josh'
                }, {
                    name: 'Relocate staff',
                    id: 'relocate_staff',
                    parent: 'relocate',
                    start: today + 10 * day,
                    end: today + 11 * day,
                    owner: 'Mark'
                }, {
                    name: 'Relocate test facility',
                    dependency: 'relocate_staff',
                    parent: 'relocate',
                    start: today + 11 * day,
                    end: today + 13 * day,
                    owner: 'Anne'
                }, {
                    name: 'Relocate cantina',
                    dependency: 'relocate_staff',
                    parent: 'relocate',
                    start: today + 11 * day,
                    end: today + 14 * day
                }]
            }, {
                name: 'Product',
        .........完整代码请登录后点击上方下载按钮下载查看

网友评论0