span").each(function (index, item) {
$(item).css("color", colors[index]);
});
$("#dvLegend").show();
DrawChart();
});
function LegendClicked(oa) {
$(oa).next("label").toggleClass("nosel");
DrawChart();
}
function DrawChart() {
var dv = $("#dvChart");
if ($("#dvLegend input:checked").length == 0) {
dv.html("");
return;
}
var mins = [], maxs = [];
mydata = [];
var ix;
$("#dvLegend input:checked").each(function (index, item) {
ix = $val.ToInt($(item).val());
mins.push(Math.min.apply(null, icData[ix].value));
maxs.push(Math.max.apply(null, icData[ix].value));
mydata.push(icData[ix]art">
相关报告
ix = $val.ToInt($(item).val());
mins.push(Math.min.apply(null, icData[ix].value));
maxs.push(Math.max.apply(null, icData[ix].value));
mydata.push(icData[ix] value: v3,
color: colors[2],
}
];
$("#dvLegend > span").each(function (index, item) {
$(item).css("color", colors[index]);
});
$("#dvLegend").show();
DrawChart();
});
function LegendClicked(oa) {
$(oa).next("label").toggleClass("nosel");
DrawChart();
}
function DrawChart() {
var dv = $("#dvChart");
if ($("#dvLegend input:checked").length == 0) {
dv.html("");
return;
}
var mins = [], maxs = [];
mydata = [];
var ix;
$("#dvLegend input:checked").each(function (index, item) {
ix = $val.ToInt($(item).val());
mins.push(Math.min.apply(null, icData[ix].value));
maxs.push(Math.max.apply(null, icData[ix].value));
mydata.push(icData[ix]);
});
var min = Math.min.apply(null, mins)
var max = Math.max.apply(null, maxs)
if (max >= 10) {
min = Math.floor(min);
max = Math.ceil(max);
}
else {
if (max >= 2) {
min = Math.floor(min * 10) / 10;
max = Math.ceil(max * 10) / 10;
}
else {
min = Math.floor(min * 100) / 100;
max = Math.ceil(max * 100) / 100;
}
}
new iChart.LineBasic2D({
render: 'dvChart',
data: mydata,
border: { enable: false, },
width: chartWidth,
height: chartHeight,
tip: {
enable: true,
shadow: true,
showType: "fixed",
listeners: {
parseText: function (tip, name, value, text, index) {
var msg = keys[index];
var i;
for (i = 0; i < mydata.length; i++) {
msg += "
" + mydata[i].name + ":" + mydata[i].value[index];
}
return msg;
}
}
},
legend: {
enable: false,
},
crosshair: {
enable: true,
line_color: '#62bce9'
},
sub_option: {
label: false,
hollow_inside: false,
point_size: 0,
},
coordinate: {
axis: {
enable: true,
width: [0, 0, 1, 1],
},
grids: {
vertical: {
way: 'share_alike',
value: 1
}
},
scale: [{
position: 'left',
start_scale: min,
end_scale: max,
scale_space: 50,
label: { fontsize: 12 },
scale_color: '#9f9f9f'
}, {
position: 'bottom',
scale_enable: false,
label: { fontsize: 9 },
labels: labels,
}]
},
}).draw();
setTimeout(function () {
dv.children("div").children("div:gt(1)").hide();
}, 500);
}
{"InnerBanner":null,"MbPageUrl":null,"PageTitle":null,"Redirect":null,"Data":null,"UserInfo":{"ID":0,"UName":null,"Face":null}}