-1
Highcharts를 사용하여 원형 차트를 구현하려고했지만 매우 낮은 해상도에서 데이터 레이블이 잘리는 문제가 발생했습니다.Windows에서 Highchart 데이터 레이블 제거
formatter : function()을 사용하여 windows.resize를 추가하려고 시도했지만 실패했습니다.
// Radialize the colors
Highcharts.getOptions().colors = $.map(Highcharts.getOptions().colors, function(color) {
return {
radialGradient: { cx: 0.5, cy: 0.3, r: 0.7 },
stops: [
[0, color],
[1, Highcharts.Color(color).brighten(-0.3).get('rgb')] // darken
]
};
});
// Build the chart
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
backgroundColor: {
linearGradient: [0, 0, 500, 500],
stops: [
]
},
},
title: {
text: 'Header Here'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage}%</b>',
percentageDecimals: 0
},
plotOptions: {
pie: {
allowPointSelect: false,
cursor: 'pointer',
dataLabels: {
enabled: true,
color: '#000000',
connectorColor: '#000000',
formatter: function() {
return '<b>'+ this.point.name +'</b>: '+ Math.round(this.percentage) +'%';
}
}
}
},
series: [{
type: 'pie',
name: 'Votes',
data: [
['Vote One', 50],
['Vote Two', 50],
['Vote three', 2]
]
}]
});
어쨌든 라벨이 false/숨김으로 설정할 수 있습니다 크기 조정에 새 차트를 만드는 것보다 다른 거기 : 여기
내가 현재 사용하고있는 코드? 특정 해상도 이상으로 다시 표시됩니까?많은 감사
브릴리언트, 아주 간단 수정! 당신의 도움을 주셔서 감사합니다 :) – Andross