将动态值传递到 xml 文件 -flex fusion 图表
<?xml version="1.0" encoding="utf-8"?>
<s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:components="com.fusionwidgets.components.*">
<components:FusionWidgets FCChartType="AngularGauge" FCDataURL="data/energyMtd.xml"/>
</s:BorderContainer>
和 energyMtd.xml 文件,了解
<?xml version="1.0" encoding="UTF-8"?>
<chart decimals="2" palette="2" autoScale="1" paletteThemeColor="BDBDBD" showBorder="0" basefontColor="000000"
toolTipBgColor="BFBFBF" gaugeFillMix="{dark-10},{light-70},{dark-10}" gaugeFillRatio="3"
pivotRadius="6" gaugeInnerRadius="60%" tickValueDistance="10" showTickValues="1" tickValueStep="2"
placeTicksInside="0" placeValuesInside="0" showToolTip="1" baseFontSize="9" adjustTM="0"
pivotFillColor="000000" dataStreamURL="" gaugeStartAngle="225" gaugeEndAngle="-45"
gaugeOriginX="100" gaugeOriginY="98" gaugeOuterRadius="75" numberSuffix="kW" upperLimit="100"
lowerLimit="0">
<colorRange>
<color minValue="0" maxValue="100" code="bbbaba"/>
</colorRange>
<dials>
<dial value="0" rearExtension="10" baseWidth="10" bgColor="000000"/>
</dials>
</chart>
如何从 Flex 侧动态传递 colorRange 中的 upperLimit=""、dial value="" 和 maxValue="" 值。我需要将这 3 个值绘制在角度规融合图上
<?xml version="1.0" encoding="utf-8"?>
<s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:components="com.fusionwidgets.components.*">
<components:FusionWidgets FCChartType="AngularGauge" FCDataURL="data/energyMtd.xml"/>
</s:BorderContainer>
and energyMtd.xml file as
<?xml version="1.0" encoding="UTF-8"?>
<chart decimals="2" palette="2" autoScale="1" paletteThemeColor="BDBDBD" showBorder="0" basefontColor="000000"
toolTipBgColor="BFBFBF" gaugeFillMix="{dark-10},{light-70},{dark-10}" gaugeFillRatio="3"
pivotRadius="6" gaugeInnerRadius="60%" tickValueDistance="10" showTickValues="1" tickValueStep="2"
placeTicksInside="0" placeValuesInside="0" showToolTip="1" baseFontSize="9" adjustTM="0"
pivotFillColor="000000" dataStreamURL="" gaugeStartAngle="225" gaugeEndAngle="-45"
gaugeOriginX="100" gaugeOriginY="98" gaugeOuterRadius="75" numberSuffix="kW" upperLimit="100"
lowerLimit="0">
<colorRange>
<color minValue="0" maxValue="100" code="bbbaba"/>
</colorRange>
<dials>
<dial value="0" rearExtension="10" baseWidth="10" bgColor="000000"/>
</dials>
</chart>
how do i pass upperLimit="", dial value="" and maxValue="" values in colorRange dynamically from the flex side. i need these 3 values to plot on the angle gauge fusion chart
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看来你需要稍微改变一下代码。
fw.FCDataXML = xml.toString();
fw.FCRender();
Seem that you need to change the code a bit.
fw.FCDataXML = xml.toString();
fw.FCRender();
我相信它应该看起来像这样:
我认为您应该检查组件的文档以获取有关它如何处理数据提供程序的更多详细信息。
祝你好运,
Rob
////////////////////////////////////
您好,
将 XML 文件加载到 XML 对象后您可以设置属性和元素的值。
例如:
我希望这是你所需要的,
抢
I believe it should look something like this:
I think you should check the component's documentation for more details about how it handles the data provider.
Good luck,
Rob
////////////////////////////////////
Hi,
after you loaded the XML file in to an XML object you can set the attributes' and elements' values.
For instance:
I hope this is what you need,
Rob
Angular 仪表仅接受 XML 数据。它不接受 ArrayCollection。
请在传递之前检查是否将 XML 转换为字符串。
您还可以启用仪表的调试模式以查看问题的更多详细信息
Angular gauge only accepts XML data. It does not accept ArrayCollection.
Please check if you are converting the XML to String before passing.
Also you can enable the debug mode of the Gauge to see more details of the issue