원형 차트 JQWidget을 사용하려고합니다. 초기 예제는 텍스트 파일에 있지만 차트에서 자체 값을 사용하고 싶습니다. 원형 차트를 만들기 위해 최대 100 개를 추가 할 4 개의 섹션 (A, B, C, Unknown)이 있습니다.JQWidget 원형 차트에 배열을 추가하는 방법은 무엇입니까?
카테고리 A는
분류 B는
분류 C는 CPercent의 값을 갖는다 BPercent의 값을 갖는다 APercent의 값을 갖는다
카테고리 불명 내가
UKPercent
의 값을 갖는다 모든 값을 원형 차트에 추가하려고했습니다. 현재 내 차트는 이름이없는 네 개의 범례를로드하고 카테고리 중 하나만로드합니다.var bigPie = [];
bigPie.push({
A: APercent
});
bigPie.push({
B: BPercent
});
bigPie.push({
C: CPercent
});
bigPie.push({
Unknown: UKPercent
});
$(document).ready(function() {
// prepare chart data as an array
// prepare jqxChart settings
var settings = {
title: "Information",
description: "Legs",
enableAnimations: true,
showLegend: true,
showBorderLine: true,
legendLayout: { left: 700, top: 160, width: 300, height: 200, flow: 'vertical' },
padding: { left: 5, top: 5, right: 5, bottom: 5 },
titlePadding: { left: 0, top: 0, right: 0, bottom: 10 },
source: bigPie,
colorScheme: 'scheme03',
seriesGroups:
[
{
type: 'pie',
showLabels: true,
series:
[
{
dataField: ‘A',
displayText: ‘%',
labelRadius: 170,
initialAngle: 15,
radius: 145,
centerOffset: 0,
formatFunction: function (value) {
if (isNaN(value))
return value;
return parseFloat(value) + '%';
},
}
]
}
]
};
어떤 도움이나 제안
주시면 감사하겠습니다. 미리 감사드립니다. 내가 뭔가 명확하지 않거나 너무 모호하다면 알려주십시오. 다시 감사합니다!