angular - Angular Highcharts 径向条形图未按预期工作
问题描述
您好,我有一个应用程序在一个项目中使用 highcharts 我想显示一个图表,但它并没有达到我的预期。我的演示在这里我想要径向条形图,它是链接 但给出了正常的极坐标图。这是我的图表选项
chartOptions = {
chart: {
type: "column",
inverted: true,
polar: true,
backgroundColor: null,
plotShadow: false,
plotBorderWidth: null,
plotBackgroundColor: null
},
pane: { size: "85%", innerSize: "20%", endAngle: 270 },
xAxis: { categories: ["Coorparate", "Plant1", "Plant2"] },
title: "",
plotOptions: {
column: {
stacking: "normal",
borderWidth: 0,
pointPadding: 0,
groupPadding: 0.15
}
},
series: [
{
name: "ISCI",
type: "column",
data: [
{ y: 7, name: "", info: "" },
{ y: 28, name: "", info: "" },
{ y: 14, name: "", info: "" }
]
},
{
name: "ISVEREN",
type: "column",
data: [
{ y: 0, name: "", info: "" },
{ y: 0, name: "", info: "" },
{ y: 0, name: "", info: "" }
]
}
]
};
解决方案
您使用了 Highcharts v7.1.1,而径向条形图是在 v8.0.0 中添加的。更新 Highcharts 版本解决了这个问题。
现场演示: https ://stackblitz.com/edit/angular7-playground-nvw5jr?file=src/app/app.component.ts
变更日志: https ://www.highcharts.com/blog/changelog/#highcharts-v8.0.0
推荐阅读
- pycharm - 你能在你的电脑上同时安装 Pycharm Community 和 Professional 吗?
- jvm-arguments - 最大 Java 堆内存分配大小 - 有限制吗?
- c# - ListView 和 CollectionView 占用的空间超出了 Xamarin Forms 中所需的空间
- azure - 自定义策略:IdentityExperienceFramework 与 ProxyIdentityExperienceFramework
- reactjs - 无法在反应中使用 this.ref.current.value 获取输入字段的值
- sparql - 如何将多个谓词值绑定到 sparql 中的一个变量?
- sql - 使用新数据更新映射表并添加警报
- sql - RODBC - 无法从查询中选择(但可以选择表)
- mariadb - 在 WSL2 中安装 MariaDB 时出错
- prisma - 两个棱镜模型之间的一对多和可能对多关系