1
이 내 그래프는 현재 모습입니다 : Highcharts Y 축 라벨
가 어떻게 즉,이 도구 팁에서 볼 수있는 이름, 동일하게 Y 축에 대한 값을 변경할 수 있습니다 "
function BarChartCategory() {
var arr = @Html.Raw(Json.Encode(@ViewBag.Categories));
console.log(arr);
var RNames = [], RValues = [], prev;
//Count how many occurances of each value
arr.sort();
for (var i = 0; i < arr.length; i++) {
if (arr[i] !== prev) {
RNames.push(arr[i]);
RValues.push(1);
} else {
RValues[RValues.length-1]++;
}
prev = arr[i];
}
console.log(RValues);
console.log(RNames);
var final = [];
for(var i=0; i < RNames.length; i++) {
final.push({
name: RNames[i],
y: RValues[i]
});
}
console.log(final);
$('#container').highcharts({
chart: {
type: 'bar'
},
title: {
text: 'By Category Results'
},
yAxis: {
allowDecimals: false,
},
tooltip: {
formatter: function() {
return '<b>' + this.series.name + '</b><br/>' +
this.point.y + ' ' + this.point.name.toLowerCase();
}
},
series: [{
name: "Issues: ",
colorByPoint: true,
data: final
}]
});
}
예, 가로 막 대형 차트의 경우 x 축과 y 축이 반전됩니다. 기둥 형 차트를 작성하고 * 역상을 설정하는 것과 동일합니다. true * – jlbriggs
예 이것을 이해하는 데 다소 시간이 걸렸습니다. 매우 혼란 스럽습니다. –