简体   繁体   中英

High Charts - Organizational Chart

I want to use the high charts organizational chart but could not remove the top level parent "shareholders". The test chart looks like:

在此处输入图像描述

The example at high charts has a jsfiddle here .

I tried to remove share holders from the link series:

    series: [{
    type: 'organization',
    name: 'Highsoft',
    keys: ['from', 'to'],
    data: [
        ['Shareholders', 'Board'], // deleted this line
        ['Board', 'CEO'],
        ['CEO', 'CTO'],
        ['CEO', 'CPO'],
        ['CEO', 'CSO'],
        ['CEO', 'HR'],
        ['CTO', 'Product'],
        ['CTO', 'Web'],
        ['CSO', 'Sales'],
        ['HR', 'Market'],
        ['CSO', 'Market'],
        ['HR', 'Market'],
        ['CTO', 'Market']
    ],

And also deleted shareholders from nodes:

        }],
    nodes: [{
        id: 'Shareholders' // deleted this line and { } above/below
    }, {
        id: 'Board'
    }, { 

But then the chart didn't render at all. How do I remove shareholders?

Since you removed the data Shareholders , you might want to change the column for Market

{
      id: 'Market',
      name: 'Marketing team',
      column: 4
    }

Working Example:

https://codepen.io/johnsonsamuel/pen/WNRVdRB

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM