我们如何创建Highcharts树图框布局在角?

rsl1atfo  于 2023-08-05  发布在  Highcharts
关注(0)|答案(2)|浏览(129)

找不到模块“channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/channels/ch
10从'highcharts/modules/treegraph'导入HCTree;~~~
我检查了文档,但没有找到正确的方法来实现Highcharts Treegraph框布局它在角。
我要这张病历
enter image description here

zzoitvuj

zzoitvuj1#

这是因为您需要在treegraph之前加载treemap模块。

import * as Highcharts from 'highcharts';
import treemap from 'highcharts/modules/treemap';
import treegraph from 'highcharts/modules/treegraph';

treemap(Highcharts);
treegraph(Highcharts);

字符串

现场演示:https://stackblitz.com/edit/highcharts-angular-line-kagqjy
文档:https://www.highcharts.com/docs/chart-and-series-types/treegraph-chart

3z6pesqy

3z6pesqy2#

需要添加最新支持版本的HighChart进行树形图。

不确定你使用的是哪个版本的HighChart,它不在10.2.1中,但如果你更新到最新版本,它会工作
出发地:

"highcharts": "10.2.1", 
import HCTree from 'highcharts/modules/treegraph';
/*Cannot find module 'highcharts/modules/treegraph' or its corresponding 
type declarations.*/

字符串
收件人:

"highcharts": "11.1.0" 
import HCTree from 'highcharts/modules/treegraph'; // wokring fine

相关问题