博主在开发微信小程序(程序员实用资源)的1.0.6版本的时候报错了,报错信息如下
WAServiceMainContext.js?t=wechat&s=1675476283751&v=2.30.0:1 TypeError: Cannot read property 'replace' of undefined
at hexToRgb (u-charts.js?t=wechat&s=1675476283751&v=30a9ccd41640acc350e3b6d9a66923c4:70)
at drawFunnelDataPoints (u-charts.js?t=wechat&s=1675476283751&v=30a9ccd41640acc350e3b6d9a66923c4:5832)
at Object.onProcess (u-charts.js?t=wechat&s=1675476283751&v=30a9ccd41640acc350e3b6d9a66923c4:6221)
at Animation.step (u-charts.js?t=wechat&s=1675476283751&v=30a9ccd41640acc350e3b6d9a66923c4:6041)
at Function.<anonymous> (u-charts.js?t=wechat&s=1675476283751&v=30a9ccd41640acc350e3b6d9a66923c4:6026)
at :36242/appservice/<setTimeout callback function>
at WASubContext.js?t=wechat&s=1675476283751&v=2.30.0:1
at r.<anonymous> (WASubContext.js?t=wechat&s=1675476283751&v=2.30.0:1)
at Function.<anonymous> (WASubContext.js?t=wechat&s=1675476283751&v=2.30.0:1)
at p (WAServiceMainContext.js?t=wechat&s=1675476283751&v=2.30.0:1)
因为1.0.5版本也用了ucharts插件没问题,1.0.6新加图的时候,就报错了,就很莫名其妙
报错示意图:
博主下面这些灰色的部分数据本来设置了,想说数据太多了,先显示一部分
"show":false
后续渲染出来图点击下面隐藏的色块就报错了
先直接别用"show":false,这个应该是组件bug、
他没点击一次color,canvas是重新渲染的,但是色块没拾取到颜色
但是不碍事,问题不大,还是要感谢秋云带来这么好的统计图插件ucharts