空饼图呈现没有错误。
出现错误:
ReferenceError: Highcharts is not defined
https://github.com/highcharts/highcharts/blob/decfc3ab47ec88e28472f065fd2454b46c9f1fd1/js/parts/PieSeries.js#L789
https://codesandbox.io/s/highcharts-vue-demo-ye65e
8.1.1
全部
所有初始化为空并稍后填充数据的动态饼图,异步,从 8.1.0 更新到 8.1.1 被破坏
嗨@pablolmedorado和@clemeno
感谢您报告问题!
看起来问题仅与最新版本有关,并且与所有包装器有关。 实际上它已经在master
分支上修复了,因为在将master
的最新版本放入代码和框示例中,并替换 Highcharts 版本后,问题似乎消失了。
总之,我们需要在未来几天发布新版本,这个问题会自动解决。
实例: https :
亲切的问候!
这个问题似乎仍然存在于 8.1.2 的发布版本中,至少在发布到 npm 的版本中是这样。
重开问题。
@bre1470 - 你能检查一下吗? #13681 已关闭,但似乎Highcharts
命名空间也在核心中使用,而不仅仅是在模块中。 演示: https :
在 8.1.2 中确认这对我来说仍然是一个问题
https://stackblitz.com/edit/angular-ivy-udtk3a?file=package.json
在两种情况下,它被重现:
对解决方法感到好奇,直到修复完成。 使用@pawelfus 的 repro链接并将 highcharts 版本修改为 8.1.0 _appears_ 来解决此问题。 这是目前建议的解决方法吗?
对解决方法感到好奇,直到修复完成。 使用@pawelfus 的 repro链接并将 highcharts 版本修改为 8.1.0 _appears_ 来解决此问题。 这是目前建议的解决方法吗?
在我们的例子中,问题是通过创建一个没有数据的图表,然后再添加数据来触发的。 碰巧的是,我们当时已经有了数据,因此可以用数据创建图表,从而避免了这个问题。 如果这对您来说是一个选择,那么值得一看。
@kennyjwilli如果您希望利用自drawEmpty
方法:
// Workaround for https://github.com/highcharts/highcharts/issues/13710
(function(H) {
H.seriesTypes.pie.prototype.drawEmpty = function() {
var centerX,
centerY,
start = this.startAngleRad,
end = this.endAngleRad,
options = this.options;
// Draw auxiliary graph if there're no visible points.
if (this.total === 0) {
centerX = this.center[0];
centerY = this.center[1];
if (!this.graph) {
this.graph = this.chart.renderer
.arc(centerX, centerY, this.center[1] / 2, 0, start, end)
.addClass("highcharts-empty-series")
.add(this.group);
}
this.graph.attr({
d: H.SVGRenderer.prototype.symbols.arc(
centerX,
centerY,
this.center[2] / 2,
0,
{
start: start,
end: end,
innerR: this.center[3] / 2
}
)
});
if (!this.chart.styledMode) {
this.graph.attr({
"stroke-width": options.borderWidth,
fill: options.fillColor || "none",
stroke: options.color || "#cccccc"
});
}
} else if (this.graph) {
// Destroy the graph object.
this.graph = this.graph.destroy();
}
}
})(Highcharts);
否则我们建议现在使用 8.1.0。
猜猜修复 #13770 没有解决 #13722
已经提供了一个演示来重现 #13722 中的问题
以下行是此问题的根源。
https://github.com/highcharts/highcharts/blob/c7e1976467a3b0e1620d44a414af2470716732b9/js/parts/ColumnSeries.js#L571
这在 2.7.0 中仍然发生在我身上
嗨@Crocsx - 此修复程序未发布。 下一个版本定于下个月。 现在您需要降级或使用此处发布的 workaorund: https :
PS:当前 Highcharts 版本是 v8.1.2
啊对了,对不起,我对 highchart-angular 更新感到困惑,没有看到这个 highchart 还在 8.1.2 中,抱歉
嗨@Crocsx - 此修复程序未发布。 下一个版本定于下个月。 现在,您需要降级或使用此处发布的workaorund :
PS:当前 Highcharts 版本是 v8.1.2
@pawelfus你有下一个版本的日期吗?
我们下周的目标是@felipemfp
我遇到了类似的问题。 点击图例后,其他数据为0。谢谢!
"highcharts": "^8.2.0",
嗨@the-gc - 我无法在 v8.2.0 中重现这个问题,看看: https :
我可以确认更新到 highcharts 8.2.0 已经为我们解决了这个问题。
谢谢!
同样在这里,效果很好
嗨@pawelfus - 今天重建了项目,问题已经解决,非常感谢!
谢谢确认!
这也发生在我身上,因为我的yarn.lock
文件中有多个版本的 highcharts。 一旦整合(在 8.2.0 上),崩溃就消失了。
最有用的评论
在 8.1.2 中确认这对我来说仍然是一个问题
https://stackblitz.com/edit/angular-ivy-udtk3a?file=package.json