我正在与ionic一起工作,并在页面中包含图表,但在导航器上该图表可以完美显示,但不能在手机上显示。有人可以帮忙吗?
这是我的代码。 (我在android和ios上进行了测试)
showShart () {
if (this.lineChartData.length != 0) {
this.chartVar = new Chart(this.chartCanvas.nativeElement, {
type: 'line',
data: {
datasets: [{
data: this.lineChartData,
backgroundColor: '',
borderColor: '#1DE9B6',
pointBackgroundColor: '#1DE9B6',
pointBorderColor: '#fff',
pointHoverBackgroundColor: '#fff',
pointHoverBorderColor: 'rgba(148,159,177,0.8)'
}],
labels: this.dates
},
options: {
legend: {
display: false
},
title: {
display: true,
text: "Evolution de votre pression systolique",
fontColor: "#12b0bc",
fontSize: 18,
fontStyle: 'normal',
fontFamily: "'Quicksand'"
},
scales: {
xAxes: [{
scaleLabel: {
display: true,
labelString: "Date"
}
}],
yAxes: [{
scaleLabel: {
display: true,
labelString: "Pression systolique"
},
ticks: {
beginAtZero: false,
}
}]
},
responsive: true
}
})
}
}