높은 차트를 사용하여 여러 개의 원형 차트를 표시하는 문제에 갇혀 있습니다.
내가 성취해야 할 것은
하이 차트를 사용하여 세 개의 분리 된 원형 차트를 만들고 내 사용자 지정 CSS를 사용하여 중첩했습니다.
모든 차트를 div에 넣고 다음과 같이 CSS를 작성합니다.
#homepage-charts {
position: relative;
}
#inner-chart, #center-chart, #outer-chart {
position: absolute;
top: 0;
left: 0;
div svg rect {
fill: none !important;
}
}
#inner-chart {
z-index: 4;
}
#center-chart {
z-index: 3;
}
#outer-chart {
z-index: 2;
}
마지막으로,
문제는 위와 같이 만들 때 첫 번째 차트 아래에있는 차트를 클릭하거나 가리킬 수 없다는 것입니다.
클릭을 트리거하거나 첫 번째 차트 뒤에있는 차트를 가리킬 방법이 있습니까?
또는 위와 같이 표시 할 수없는 높은 차트 기능이 있습니까?
highcharts 개체의 계열 배열에 여러 차트를 차례로 추가하여 원형 차트를 쌓을 수 있습니다. 같은 위치에 추가하기 만하면되지만 다른 레벨에 맞게 크기를 조정하면됩니다. 바이올린 벨로우를 참조하십시오.
Highcharts.chart('container', {
title: {
text: 'Stacked pie charts'
},
xAxis: {},
labels: {},
series: [{
type: 'pie',
name: 'Level 1',
data: [{
name: '1.1',
y: 1.1,
color: Highcharts.getOptions().colors[6]
}, {
name: '1.2',
y: 1.2,
color: Highcharts.getOptions().colors[7]
}, {
name: '1.3',
y: 1.3,
color: Highcharts.getOptions().colors[8]
}],
center: [200, 200],
size: 300,
showInLegend: false,
dataLabels: {
enabled: false
}
}, {
type: 'pie',
name: 'Level 2',
data: [{
name: '2.1',
y: 2.1,
color: Highcharts.getOptions().colors[0]
}, {
name: '2.2',
y: 2.2,
color: Highcharts.getOptions().colors[1]
}, {
name: '2.3',
y: 2.3,
color: Highcharts.getOptions().colors[2]
}],
center: [200, 200],
size: 200,
showInLegend: false,
dataLabels: {
enabled: false
}
}, {
type: 'pie',
name: 'Level 3',
data: [{
name: '3.1',
y: 3.1,
color: Highcharts.getOptions().colors[3]
}, {
name: '3.2',
y: 3.2,
color: Highcharts.getOptions().colors[4]
}, {
name: '3.3',
y: 3.3,
color: Highcharts.getOptions().colors[5]
}],
center: [200, 200],
size: 100,
showInLegend: false,
dataLabels: {
enabled: false
}
}]
});
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 600px; margin: 0 auto"></div>
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다