2011-05-10 6 views
1

XML이 이와 같이 보이고 시리즈 노드의 수가 데이터에 따라 더 많거나 적을 수있는 경우 어떻게 여러 시리즈로 동적 차트를 만들 수 있습니까?플렉스 4, 동적 차트

<root><series id="Americas" name="Americas"> 
<item total="2" year="2011" month="April" fullDate="April 2011"/> 
<item total="3" year="2011" month="February" fullDate="February 2011"/> 
<item total="2" year="2011" month="March" fullDate="March 2011"/></series><series id="Asia-Pacific" name="Asia-Pacific"> 
<item total="2" year="2011" month="April" fullDate="April 2011"/> 
<item total="1" year="2011" month="January" fullDate="January 2011"/> 
<item total="1" year="2011" month="March" fullDate="March 2011"/></series><series id="EMEIA" name="EMEIA"> 
<item total="1" year="2011" month="April" fullDate="April 2011"/> 
<item total="1" year="2011" month="February" fullDate="February 2011"/> 
<item total="3" year="2011" month="March" fullDate="March 2011"/></series><series id="Global" name="Global"> 
<item total="3" year="2011" month="April" fullDate="April 2011"/> 
<item total="3" year="2011" month="March" fullDate="March 2011"/></series></root> 

답변

2

아마도 this example이 도움이 될 수 있습니다. 자신의 게시물에서 :

내 dataProvider 내의 객체로 배열을 사용하여 (유형 있는 ArrayCollection의), 동적으로 추가하고 또는 그 배열에서/키 값을 쌍을 제거 수 있어요.

그는 또한 사용자가 살펴볼 예제의 source code을 포함합니다.

+0

제이슨 감사합니다. –