在我的项目中,我使用chart.js和Django在图表中显示数据。我需要不同类型的图表。但是在chart.js文档中,我无法找到我所附的图表类型。
var chart = new Chart(ctx, {
type: 'bar', # here shows ber type
data: data,
});
我要写哪种字体来显示图表?
我试图在NodeJS上使用NodeJS,但它不起作用。我安装了npm install chart.js --save,并创建了最简单的测试,如下所示,但是显示了错误Chart is not defined。我已经尝试将文件"chart.js“复制到同一个目录,我已经尝试指向node_modules/chart.js/....目录,但无法使其工作。此外,我也不能指向文件https://cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.min.js,因为系统应该“独立”工作。
<html>
<head>
我得到了这个错误: ERROR RangeError: Maximum call stack size exceeded
at ChartElement.update (Chart.js:11474)
at fitBoxes (Chart.js:7127)
at fitBoxes (Chart.js:7145)
at fitBoxes (Chart.js:7145)
at fitBoxes (Chart.js:7145)
at fitBoxes (Chart.js:7145)
at fitBoxes (Chart.js:7145)
我正在做我的第一个Cordova项目,并尝试使用Chart.js。文档指出,Chart.js应该包含如下内容:
<script src="Chart.js"></script>
<script>
var myChart = new Chart({...})
</script>
我使用bower安装库,它现在位于www/lib/chart.js下。当我加载Chart.js或lib/chart.js时,Chrome会给我Failed to load resource: the server responded with a s
如何在chartjs中使用NodeJs创建饼图?我想使用chartjs创建不同类型的图表,但当我尝试运行代码时显示“无法设置宽度的属性” TypeError: Cannot set property 'width' of undefined
at ni.resize (node_modules\chart.js\dist\Chart.min.js:7:93312)
at ni.initialize (node_modules\chart.js\dist\Chart.min.js:7:92818)
at ni.construct (node_module