小编Dam*_*ien的帖子

设置 vue 应用程序时出现其他警告 ECONNRESET

我正在尝试通过 vue-cli 设置 vue 应用程序。一切都很顺利,直到我打字

npm install 
Run Code Online (Sandbox Code Playgroud)

安装依赖项。https 出现错误,所以我将其更改为 http,但随后我收到以下日志:

npm WARN registry Unexpected warning for http://registry.npmjs.org/: Miscellaneous Warning ECONNRESET: request to http://registry.npmjs.org/debug failed, reason: socket hang up
npm WARN registry Using stale package data from http://registry.npmjs.org/ due to a request error during revalidation.
Run Code Online (Sandbox Code Playgroud)

我也用过

npm config rm proxy
npm config rm https-proxy
Run Code Online (Sandbox Code Playgroud)

并且仍然有同样的问题。

node.js npm vue.js

3
推荐指数
1
解决办法
6989
查看次数

Chart.js 更新数据

我想添加到我的图表 setTimeout 函数来更新数据。下面列出了代码,但控制台说Uncaught TypeError: Cannot read property 'data' of undefined" how to access data array? and put my mew values? error is logging at the end of this code. in var ChartLine。或者也许如果你有任何其他想法如何动态更新数据请分享您的答案

 var ctx = document.getElementById('chart').getContext("2d");

    var myChart = new Chart(ctx, {
        type: 'line',
        data: {
            labels: ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL"],
            datasets: [{
                label: "Data",
                borderColor: gradientStroke,
                pointBorderColor: gradientStroke,
                pointBackgroundColor: gradientStroke,
                pointHoverBackgroundColor: gradientStroke,
                pointHoverBorderColor: gradientStroke,
                pointBorderWidth: 5,
                pointHoverRadius: 5,
                pointHoverBorderWidth: 1,
                pointRadius: 3,
                fill: true,
                backgroundColor: …
Run Code Online (Sandbox Code Playgroud)

javascript charts chart.js

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

chart.js ×1

charts ×1

javascript ×1

node.js ×1

npm ×1

vue.js ×1