forked from Tevemadar/QuickNII
-
Notifications
You must be signed in to change notification settings - Fork 3
/
SeriesChart.mxml
36 lines (35 loc) · 1.52 KB
/
SeriesChart.mxml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" resize="canvas1_resizeHandler(event)" creationComplete="canvas1_resizeHandler(null)">
<mx:Script>
<![CDATA[
import mx.events.ResizeEvent;
protected function canvas1_resizeHandler(event:ResizeEvent):void {
legend.y=height-legend.height-10;
legend.x=width/3-legend.width/2;
chartcfg.y=legend.y+(legend.height-chartcfg.height)/2;
chartcfg.x=width*2/3-chartcfg.width/2;
linechart.width=width-20;
linechart.height=legend.y-20;
}
]]>
</mx:Script>
<mx:LineChart x="10" y="10" id="linechart" showDataTips="true" showDataTipTargets="true">
<mx:series>
<mx:LineSeries id="cline" displayName="Linear regression" xField="sno" yField="Position" dataProvider="{MgmtPanel.regressionestimator}"/>
<mx:LineSeries id="pline" displayName="Polyline" xField="sno" yField="Position" dataProvider="{MgmtPanel.polylineestimator}" itemRenderer="mx.charts.renderers.CircleItemRenderer"/>
</mx:series>
</mx:LineChart>
<mx:Legend id="legend" dataProvider="{linechart}"/>
<mx:ComboBox id="chartcfg" change="cline.yField=pline.yField=chartcfg.selectedLabel;">
<mx:ArrayList>
<mx:String>Position</mx:String>
<mx:String>Spacing</mx:String>
<mx:String>MainPosition</mx:String>
<mx:String>MainSpacing</mx:String>
<mx:String>Rotation1</mx:String>
<mx:String>Rotation2</mx:String>
<mx:String>HStretch</mx:String>
<mx:String>VStretch</mx:String>
</mx:ArrayList>
</mx:ComboBox>
</mx:Canvas>