谷歌可视化饼图文本锚问题 [英] Google Visualization Pie Chart text anchor issue
问题描述
我正在绘制Google饼图,但数值已被截断。任何建议发生了什么?任何帮助将不胜感激。
I am drawing google pie chart but values cut off. Any suggestion what is going on? Any help will be appreciated.
推荐答案
您正在隐藏div中绘制图表(div idcontrol_search_resultshasdisply:无通过类隐藏)。这会扰乱API中的维度检测算法,这就是您的标签关闭的原因。您需要在绘制图表之前取消隐藏div。
You are drawing the charts inside a hidden div (div id "control_search_results" has "disply:none" via class "hidden"). This messes up the dimension detection algorithms in the API, which is why your labels are off. You need to unhide the div prior to drawing the charts.
请注意,这可以解决大多数浏览器的问题,但您仍然可能遇到类似的问题由于我在上面的评论中提到的浏览器错误。
Be aware that this will fix the problem in most browsers, but you could still run into a similar issue in Chrome due to the browser bug I mentioned in the comments above.
这篇关于谷歌可视化饼图文本锚问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!