Flex 4,动态图表
当我的 XML 如下所示并且系列节点的数量可能或多或少取决于数据时,如何创建具有多个系列的动态图表。
<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>
How can I create a dynamic chart with multiple series when my XML looks like this and the number of series nodes could be more or less depending on the data.
<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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许这个示例可以帮助您。从他的帖子中:
他还提供了示例的源代码供您查看在。
Perhaps this example could help you. From his post:
He also includes the example's source code for you to take a look at.