饼图:鼠标放置在饼图的分块区上显示信息 新手请指导
如在js在哪里添加鼠标放置在分块上显示信息,需要做什么修改。谢谢
$(function () {
var i;
for(i=0;i<9;i++)
{
if(i==0)
{
var data = [
{ name: 'A', value: <%=East%>, color: '#4572a7' },
{ name: 'B', value: <%=West%>, color: '#aa4643' },
{ name: 'C', value: <%=South%>, color: '#89a54e' },
{ name: 'D', value: <%=North%>, color: '#80699b' }
];
var chart = new iChart.Donut2D({
render: 'ThisYearPosition',
data: data,
title: {
text: '今年工程类别比列',
color: '#3e576f'
},
sub_option: {
label: {
background_color: null,
sign: false, //设置禁用label的小图标
padding: '0 4',
border: {
enable: false,
color: '#666666'
},
fontsize: 11,
fontweight: 600,
color: '#4572a7'
},
border: {
width: 2,
color: '#ffffff'
}
},
shadow: true,
shadow_blur: 6,
shadow_color: '#aaaaaa',
shadow_offsetx: 0,
shadow_offsety: 0,
background_color: '#fefefe',
offset_angle: -120, //逆时针偏移120度
showpercent: true,
decimalsnum: 2,