0
x 축의 레이블에 동적 문자 메시지를 사용하고 싶습니다. 기본적으로 같은 달의 레이블이 표시된 경우 반복하지 않으려 고합니다. 그러나, 내 jsfiddle 예를 들어, 어떻게 든 작동하지 않습니다 (그것은 원하는 텍스트를 반환합니다). 내가 도대체 뭘 잘못하고있는 겁니까? http://jsfiddle.net/daxu/md2zk/64/내 차트 포맷터가 하이 차트에서 예상대로 작동하지 않는 이유
if (labelYear == -1 || year != labelYear) {
$('#MessagePerformanceChartContainerID').data("FirstYear", year);
if (labelYear == -1)
{
usedLabels = [];
}
usedLabels.push(curr_month + ' ' + curr_year);
$('#MessagePerformanceChartContainerID').data("UsedLabels", usedLabels);
////first one so
return curr_month + ' ' + curr_year;
}
else{
var usedLabel = curr_month + ' ' + curr_year;
if ($.inArray(usedLabel, usedLabels) != -1)
{
usedLabel = curr_day + ' ' + curr_month + ' ' + curr_year;
return 'a';
}
else
{
usedLabels.push(usedLabel);
$('#MessagePerformanceChartContainerID').data("UsedLabels", usedLabels);
alert(usedLabel);
return usedLabel;
}
}
이 우, 당신이 별입니다 – daxu