You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Anychart fromJson:绘制图表后设置Line Marker出现报错问题

LineMarkers NaN Errors on Hover: JSON Initialization Order Bug?

Hey folks,

I’ve been troubleshooting a frustrating issue with AnyChart’s lineMarkers for a while now: whenever I hover over series data points, my console gets flooded with NaN errors. After testing different setup flows, I’ve tracked down what’s causing it:

  • If I initialize a chart from a JSON config, then call chart.draw() before configuring lineMarkers, the NaN errors pop up on hover.
  • But if I build the exact same chart using direct API calls, the order of chart.draw() and lineMarkers setup doesn’t affect anything—no errors at all.

I put together side-by-side test cases to demonstrate the difference (same chart structure, just different initialization methods). The JSON-based one with the wrong order throws errors, while the API-built version works perfectly.

I’ve already got a workaround: when using JSON, I just set up the lineMarkers first, then call chart.draw() afterward, and the errors go away. But I’m wondering—is this a legitimate bug in AnyChart’s JSON initialization handling, or is there some intended behavior I’m missing here?

Thanks for any insight you can provide!

内容的提问来源于stack exchange,提问作者Synapticon

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.08 07:57:45