Визуализации:
импортировать
npm install gojs --save
Вытащите код по адресу git, адрес компонента карты — src\components\fishboneDiagram.
Адрес Git с открытым исходным кодом нелегко поддерживать https://gitee.com/yongchaolu/echarts-map
Компоненты можно использовать непосредственно в проектах
Класс устанавливает размер компонента диаграммы «рыбья кость» по умолчанию на 100%.
Передать параметр json в формат объекта
json: {
'text': 'Incorrect Deliveries', 'size': 18, 'weight': 'Bold', 'causes': [
{
'text': 'Skills', 'size': 14, 'weight': 'Bold', 'causes': [
{
'text': 'knowledge', 'weight': 'Bold', 'causes': [
{
'text': 'procedures', 'causes': [
{ 'text': 'documentation' }
]
},
{ 'text': 'products' }
]
},
{ 'text': 'literacy', 'weight': 'Bold' }
]
},
{
'text': 'Procedures', 'size': 14, 'weight': 'Bold', 'causes': [
{
'text': 'manual', 'weight': 'Bold', 'causes': [
{ 'text': 'consistency' }
]
},
{
'text': 'automated', 'weight': 'Bold', 'causes': [
{ 'text': 'correctness' },
{ 'text': 'reliability' }
]
}
]
},
{
'text': 'Communication', 'size': 14, 'weight': 'Bold', 'causes': [
{ 'text': 'ambiguity', 'weight': 'Bold' },
{
'text': 'sales staff', 'weight': 'Bold', 'causes': [
{
'text': 'order details', 'causes': [
{ 'text': 'lack of knowledge' }
]
}
]
},
{
'text': 'telephone orders', 'weight': 'Bold', 'causes': [
{ 'text': 'lack of information' }
]
},
{
'text': 'picking slips', 'weight': 'Bold', 'causes': [
{ 'text': 'details' },
{ 'text': 'legibility' }
]
}
]
},
{
'text': 'Transport', 'size': 14, 'weight': 'Bold', 'causes': [
{
'text': 'information', 'weight': 'Bold', 'causes': [
{ 'text': 'incorrect person' },
{
'text': 'incorrect addresses', 'causes': [
{
'text': 'customer data base', 'causes': [
{ 'text': 'not up-to-date' },
{ 'text': 'incorrect program' }
]
}
]
},
{ 'text': 'incorrect dept' }
]
},
{
'text': 'carriers', 'weight': 'Bold', 'causes': [
{ 'text': 'efficiency' },
{ 'text': 'methods' }
]
}
]
}
]
}
Если после успешного импорта в верхнем левом углу есть водяной знак gojs
Как удалить водяной знак:
Перейдите к файлу node_modules/gojs/release/go-module.js.
Найдите a.charCodeAt(g)^b[(b[c]+b[d])%256]
И добавить перед возвратом f
if(f.indexOf('GoJS 2.1 evaluation')>-1
|| f.indexOf('(c) 1998-2021 Northwoods Software')>-1
|| f.indexOf('Not for distribution or production use')>-1
|| f.indexOf('gojs.net')>-1
){undefined
return '';
}else{undefined
return f
};
может