highcharts 如何在角形图中添加组织结构图?

e5njpo68  于 2022-11-10  发布在  Highcharts
关注(0)|答案(1)|浏览(246)

我试图添加组织结构图的Angular ,但得到错误时,尝试加载脚本,当我使用导入得到以下错误:

请帮助我如何解决这个错误,并添加组织结构图的Angular 。任何帮助将不胜感激。谢谢!

s8vozzvw

s8vozzvw1#

组织系列类型是在Highcharts v7.1.0中添加的,因此请确保您使用的是较新的版本。另外,此系列需要Sankey模块。

import { Component } from "@angular/core";
import * as Highcharts from "highcharts";
import HCSankey from "highcharts/modules/sankey";
import HCOrganization from "highcharts/modules/organization";

HCSankey(Highcharts);
HCOrganization(Highcharts);

@Component({
  selector: "my-app",
  templateUrl: "./app.component.html",
  styleUrls: ["./app.component.css"]
})

现场演示:https://stackblitz.com/edit/highcharts-angular-line-yzjnxb?file=src%2Fapp%2Fapp.component.ts
API引用:https://api.highcharts.com/highcharts/series.organization
**更改日志:**https:www.highcharts.com/blog/changelog/#highcharts-v7.1.0

相关问题