【问题标题】:Drilldown issue in Orgchart Highcharts - Formating LinksOrgchart Highcharts 中的向下钻取问题 - 形成链接
【发布时间】:2022-08-18 18:22:30
【问题描述】:

我开始探索highcharts。创建了具有组织层次结构的报表,并进行了细化。 无法格式化钻取报告中的链接,它们看起来像三角形而不是像主组织结构图中的直线,并且当钻取中的层次结构获得多个节点时会变得混乱。

在下面的示例中,单击 Div.2,查看下钻链接。除了linkLineWidth等之外,我们必须控制这些三角形svg形状的图表选项是什么。

Links with Triangle Shape

jsfiddle Test Case

Highcharts.chart(\'容器\', { 图表: { 身高:600, 宽度:600, 倒置:真, 类型:\'组织\' },

title: {
    text: \'Highcharts Org Chart\'
},
series: [{
    name: \'Highsoft\',
     data: [{
            from: \"CO\",
            to: \"DIV01\",
        },
        {
            from: \'CO\',
            to: \'DIV02\'
        } 
    ],
    nodes: [{
            id: \'DIV01\',
            title: \'Div Hd 1\',
            name: \'Div. 1\',
            drilldown: \"DIV01\"
        },
        {
            id: \'DIV02\',
            title: \'Div Hd 2\',
            name: \'Div. 2\',
            drilldown: \'DIV02\'
        } 
    ]
}],
drilldown: { 
    activeDataLabelStyle: {
        color: \'contrast\'
    },
     layout: \'hanging\',
    series: [{
            id: \"DIV01\",
            name: \"DIV01\",
            keys: [\'from\', \'to\'],
            data: [
                [\'DIV01\', \'DEP01\']
            ],
            nodes: [{
                id: \'DEP01\',
                title: \'Dept Hd 1\',
                name: \'Dept. 1\' 
            }]
        },
        {
            id: \"DIV02\",
            name: \"DIV02\",
            keys: [\'from\', \'to\'], 
            data: [
                 [\'DIV02\', \'DEP02\'],
                 [\'DEP02\', \'DEP03\'],
                 [\'DEP02\', \'DEP04\'], 
                 [\'DEP04\', \'DEP05\'],
                 [\'DEP04\', \'DEP06\'] ,
                 [\'DEP04\', \'DEP08\'] ,
                 [\'DEP06\', \'DEP07\'] 
            ],
            nodes: [{
                id: \'DEP02\'   
            }]
        } 
    ]
} 

});

    标签: highcharts drilldown orgchart


    【解决方案1】:

    这是一个错误,您可以在Github issue 中找到更多信息,解决方法您可以通过 CSS fill: none 更改补丁颜色。

    .highcharts-series path {
        fill: none;
    }
    

    演示:https://jsfiddle.net/BlackLabel/ay1czgxp/

    【讨论】:

      猜你喜欢
      • 2023-03-11
      • 1970-01-01
      • 2023-04-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多