當我使十字線功能在我的圖表,一切都在Chrome 56工程確定,但是當我升級Chrome瀏覽器57(甚至鍍58和ZingChart 2.6.0現在),CPU使用率在盤旋圖表以查看十字準線時總是高於25%。當我有2個圖表時,CPU使用率高達99%,瀏覽器速度變慢,並在不久之後崩潰。十字準線的特點是泄漏CPU
我嘗試禁用所有功能,看看有什麼是這個問題的原因,當我禁用的十字線,CPU使用率恢復正常。如果我禁用除了十字準線功能以外的所有內容,則會觀察到相同的CPU佔用效應。
以釋放資源的唯一方法是通過終止選項卡。
這裏是我的代碼:
var dataChart = {
id: "ShSDbePYhAxC",
data: {
type: "area",
"crosshair-x": {
"plot-label": {
text: "The %t Series has a value of %v."
}
},
gui: {
behaviors: [
{
id: "Reload",
enabled: "none"
}
],
contextMenu: {
customItems: [
{
function: "zingAlert()",
id: "zingAlert",
text: "zing Alert"
}
]
}
},
item: {
angle: -30
},
legend: {
"background-color": "white",
"border-color": "black",
"border-radius": "5px",
"border-width": 2,
layout: "1xauto",
padding: "10%",
x: "12%",
y: "90%"
},
plot: {
alphaArea: 1,
aspect: "spline",
"bar-width": "15px",
"contour-on-top": false,
lineWidth: "2px",
stacked: true,
marker: {
visible: false
},
tooltip: {
visible: false
}
},
plotarea: {
"margin-bottom": "23%",
"margin-left": "dynamic"
},
"scale-x": {
item: {
angle: -30
},
labels: [
"Name0", "Name1", "Name2", "Name3", "Name4"
]
},
"scale-y": {
label: {
"font-size": "15%",
text: "Number Of Visitors"
}
},
series: [
{
text: "Text A",
values: [11111, 222222, 3333333, 444444, 55555]
},
{
text: "Text B",
values: [6666, 777777, 88888, 99999, 12121212]
}
]
},
height: 550,
output: "canvas",
width: "100%",
}
你問[這裏](https://www.zingchart.com/support/)每個機會呢?唉,別提了,我看到他們使用的堆棧溢出的有支持 - 好運 –
已經發送了票給他們:)謝謝@JaromandaX –
都很好。他們聲稱SO是如何獲得支持的,所以我猜他們很快就會跟上 –