Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/382.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Zing图表的十字线特征是CPU泄漏_Javascript_Angular_Zingchart - Fatal编程技术网

Javascript Zing图表的十字线特征是CPU泄漏

Javascript Zing图表的十字线特征是CPU泄漏,javascript,angular,zingchart,Javascript,Angular,Zingchart,当我在图表中启用十字线功能时,Chrome 56中的一切都正常,但当我将Chrome升级到57(甚至现在的Chrome 58和ZingChart 2.6.0)时,当悬停图表以查看十字线时,CPU使用率始终高于25%。当我有两个图表时,CPU使用率会上升到99%,浏览器会很快变慢并崩溃 我尝试禁用所有功能以查看导致此问题的原因,当我禁用十字线时,CPU使用率再次正常。如果我禁用除十字线功能以外的所有功能,就会观察到同样的CPU占用效应 释放资源的唯一方法是终止选项卡 这是我的密码: var dat

当我在图表中启用十字线功能时,Chrome 56中的一切都正常,但当我将Chrome升级到57(甚至现在的Chrome 58和ZingChart 2.6.0)时,当悬停图表以查看十字线时,CPU使用率始终高于25%。当我有两个图表时,CPU使用率会上升到99%,浏览器会很快变慢并崩溃

我尝试禁用所有功能以查看导致此问题的原因,当我禁用十字线时,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%",
}

所以我们倾向于相信这可能是一个铬和角的问题。要确认这一点,您可以将zingchart版本还原为较旧的版本,如v2.2.2。您可以通过以下链接通过cdn访问此版本

根目录:

ZingChart.min:

模块:


如果问题仍然存在,这是一个浏览器和角度问题,我们知道在哪里集中精力。如果问题消失了,这直接是ZingChart的问题。

您是否有机会问过?哦,没关系,我看到他们使用堆栈溢出来提供支持-好的luckalready给他们发张票:)谢谢@JaromandaXAll good。他们声称如何获得支持也是如此,所以我想他们会很快相处的嘿,你可以直接发电子邮件到support@zingchart.com,我们总是在24小时或更短的时间内回复@我们通过多个渠道直接提供支持。堆栈溢出,我们的网站,推特,电子邮件。我们总是喜欢和我们的用户交谈。你能在plnkr.co上复制并在这里发布链接吗?另外,您是否使用System.js加载zingchart?哦,zingchart 2.2.2非常好,不再泄漏CPU,谢谢:)所以我将使用版本2.2.2,直到你们更新zingchart的新版本。非常感谢:)谢谢你的确认。因此,我们在2.4.0及更高版本中更新了十字光标。我们将不得不看看为什么新版本的chrome会引发这个问题。我不确定我们改变了什么,但我会给你发电子邮件了解更多细节。这篇文章对遇到问题的其他人来说更具信息性。