【问题标题】:How Can I add sections of categories in gantt highcharts?如何在甘特图高图中添加类别部分?
【发布时间】:2021-11-02 09:02:28
【问题描述】:

我在我的角度应用程序中使用甘特图。 在甘特图表中,我需要添加以红色突出显示的类别部分(一般流程和产品)。 尝试了许多解决方案,但没有得到解决方案。 请帮忙。

【问题讨论】:

    标签: highcharts gantt-chart highcharts-gantt


    【解决方案1】:

    在数据集的开头,您只能插入带有名称属性的点。

    Highcharts.ganttChart('container', {
        series: [{
            name: 'Offices',
            data: [{
                name: 'Section 1'
            }, {
                name: 'New offices',
                id: 'new_offices',
                owner: 'Peter'
            }, ...]
        }, {
            name: 'Product',
            data: [{
                name: 'Section 2'
            }, {
                name: 'New product launch',
                id: 'new_product',
                owner: 'Peter'
            }, ...]
        }],
        ...
    });
    

    现场演示: https://jsfiddle.net/BlackLabel/3knLtr8g/

    【讨论】:

    • 谢谢,很有帮助!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-17
    • 2016-07-22
    相关资源
    最近更新 更多