Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何动态更改饼图的颜色。我想更改隐藏变量assignedvalueZoom中每个切片的颜色。有人可以帮忙吗?
您可以像这样定义数据数组中每个点的颜色:
for(j=0;j<name.length;j++) { var temp = { x:name[j], y:value[j], color:color[j] }; dataArrayFinal[j] = temp; }
这明确地设置了每个数据点的 x、y 和颜色属性。
http://jsfiddle.net/xktj3/