0
그래서 우리 시스템에서 미해결 문제의 개수를 세는 누적 막 대형 차트를 설계했습니다. 그러나이 문제가 너무 오랫동안 열려있을 때는 2 개의 빨간 격자 선을 배치해야합니다.ChartJS 색상 별 그리드 선
옵션 :
OrderAgeOptions = {
observeChanges: true, throttle: 100,
title: { display: true, text: "Leeftijd openstaande tickets", fontFamily: 'ASSA Vesta Light', fontSize: 20, },
legend: { display: true, labels: { fontFamily: 'Open Sans', }, position: "top", },
maintainAspectRatio: false,
tooltips: { enabled: false },
hover: { animationDuration: 0 },
scales: {
xAxes: [{ ticks: { beginAtZero: true, fontFamily: "'Open Sans Bold', sans-serif", fontSize: 11, max: 175 }, scaleLabel: { display: true }, gridLines: {}, stacked: true }],
yAxes: [{ ticks: { fontFamily: "'Open Sans Bold', sans-serif", fontSize: 11 }, gridLines: { display: true, }, stacked: true }]
},
animation: { duration: 0.1, onComplete: function() { var chartInstance = this.chart; var ctx = chartInstance.ctx; ctx.textAlign = "right"; ctx.font = "10px Open Sans"; ctx.fillStyle = "#fff"; Chart.helpers.each(this.data.datasets.forEach(function (dataset, i) { var meta = chartInstance.controller.getDatasetMeta(i); Chart.helpers.each(meta.data.forEach(function (bar, index) { data = dataset.data[index]; if (data != 0) ctx.fillText(data, bar._model.x - 2, bar._model.y - 7); }), this) }), this); } },
pointLabelFontFamily: "Open Sans",
scaleFontFamily: "Open Sans",
};
사람은 아이디어가 있습니까 어떻게 이러한 목표를 달성하기 위해? 지금까지 발견 된 것은 특정 그리드 선이 아닌 모든 그리드 선의 모양을 변경하는 것이 었습니다.
덕분에 많은 Frederiek! 혼란 스러울 뿐인 "lineAtIndex"가 정확히 무엇입니까? – Shadowfox