Closed Ahsan-zaman closed 4 years ago
I solved the issue....the problem was I had to also import Sankey Module [ "Which is not mentioned in the docs"]. Imports :
import Highcharts from 'highcharts'
import Exporting from 'highcharts/modules/exporting';
import Sankey from 'highcharts/modules/sankey'
import Organization from 'highcharts/modules/organization'
Init in mounted hook :
mounted(){
Exporting(Highcharts)
Sankey(Highcharts)
Organization(Highcharts)
Highcharts.chart('conatiner',{
chart: {
inverted: true
},
title: {
text: 'Nexo HR Organization Chart'
},
series: [{
type: 'organization',
name: 'Highsoft',
keys: ['from', 'to'],
data: [
['Shareholders', 'Board'],
['Board', 'CEO'],
['CTO', 'Web'],
['CSO', 'Sales'],
['CMO', 'Market']
],
levels: [{
level: 0,
color: 'silver',
dataLabels: {
color: 'black'
},
height: 25
}, {
level: 1,
color: 'silver',
dataLabels: {
color: 'black'
},
height: 25
}, {
level: 2,
color: '#980104'
}, {
level: 4,
color: '#359154'
}],
nodes: [{
id: 'Shareholders'
}, {
id: 'Board'
}, {
id: 'CEO',
title: 'CEO',
name: 'Grethe Hjetland',
image: 'https://wp-assets.highcharts.com/www-highcharts-com/blog/wp-content/uploads/2018/11/12132317/Grethe.jpg'
}, {
id: 'HR',
title: 'HR/CFO',
name: 'Anne Jorunn Fjærestad',
color: '#007ad0',
image: 'https://wp-assets.highcharts.com/www-highcharts-com/blog/wp-content/uploads/2018/11/12132314/AnneJorunn.jpg',
column: 3,
offset: '75%'
}, {
id: 'Sales',
name: 'Sales team'
}, {
id: 'Market',
name: 'Marketing team'
}],
colorByPoint: false,
color: '#007ad0',
dataLabels: {
color: 'white'
},
borderColor: 'white',
nodeWidth: 65
}],
tooltip: {
outside: true
},
exporting: {
allowHTML: true,
sourceWidth: 800,
sourceHeight: 600
}
})
}
Thanks! Your post helped me a lot, thanks again!
I'm trying to use Organization module in my vue app. But this error is showing up ERROR
My App.js
In the component :
Versions using :