You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2014/07/28 11:31:00 UTC
[10/13] git commit: [flex-asjs] [refs/heads/VF2JS] - Adding PieChart
which required moving some core interfaces from FlexJSJX project to FlexJSUI
project. PieChart uses SVG to draw its wedges (still a to-do item for
BarChart).
Adding PieChart which required moving some core interfaces from FlexJSJX project to FlexJSUI project. PieChart uses SVG to draw its wedges (still a to-do item for BarChart).
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/3c37e610
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/3c37e610
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/3c37e610
Branch: refs/heads/VF2JS
Commit: 3c37e61077e878551523813216ab0e674c92d54f
Parents: 09ec882
Author: Peter Ent <pe...@apache.org>
Authored: Fri Jul 18 14:34:13 2014 -0400
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Mon Jul 28 11:28:12 2014 +0200
----------------------------------------------------------------------
.../as/projects/FlexJSJX/basic-manifest.xml | 2 +
frameworks/as/projects/FlexJSJX/defaults.css | 13 ++
.../as/projects/FlexJSJX/src/FlexJSJXClasses.as | 4 +
.../src/org/apache/flex/charts/PieChart.as | 53 +++++
.../apache/flex/charts/beads/PieChartView.as | 51 +++++
.../flex/charts/beads/layouts/PieChartLayout.as | 178 +++++++++++++++++
.../src/org/apache/flex/charts/core/IChart.as | 48 -----
.../org/apache/flex/charts/core/IChartAxis.as | 34 ----
.../flex/charts/core/IChartItemRenderer.as | 114 -----------
.../org/apache/flex/charts/core/IChartSeries.as | 80 --------
.../charts/supportClasses/PieChartSeries.as | 94 +++++++++
.../as/projects/FlexJSUI/basic-manifest.xml | 2 +
frameworks/as/projects/FlexJSUI/defaults.css | 3 +
.../as/projects/FlexJSUI/src/FlexJSUIClasses.as | 8 +
.../org/apache/flex/charts/ChartDataGroup.as | 31 +++
.../src/org/apache/flex/charts/core/IChart.as | 48 +++++
.../org/apache/flex/charts/core/IChartAxis.as | 34 ++++
.../flex/charts/core/IChartItemRenderer.as | 114 +++++++++++
.../org/apache/flex/charts/core/IChartSeries.as | 80 ++++++++
.../charts/supportClasses/WedgeItemRenderer.as | 146 ++++++++++++++
.../src/org/apache/flex/html/beads/ListView.as | 10 +-
.../org/apache/flex/charts/ChartDataGroup.js | 57 ++++++
.../src/org/apache/flex/charts/core/IChart.js | 51 +++++
.../org/apache/flex/charts/core/IChartAxis.js | 39 ++++
.../flex/charts/core/IChartItemRenderer.js | 103 ++++++++++
.../org/apache/flex/charts/core/IChartSeries.js | 89 +++++++++
.../charts/supportClasses/WedgeItemRenderer.js | 196 +++++++++++++++++++
.../src/org/apache/flex/html/beads/ListView.js | 19 +-
28 files changed, 1420 insertions(+), 281 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSJX/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/basic-manifest.xml b/frameworks/as/projects/FlexJSJX/basic-manifest.xml
index 62e663b..ccfafda 100644
--- a/frameworks/as/projects/FlexJSJX/basic-manifest.xml
+++ b/frameworks/as/projects/FlexJSJX/basic-manifest.xml
@@ -33,6 +33,8 @@
<component id="BarChart" class="org.apache.flex.charts.BarChart" />
<component id="BarChartSeries" class="org.apache.flex.charts.supportClasses.BarChartSeries" />
<component id="BoxItemRenderer" class="org.apache.flex.charts.supportClasses.BoxItemRenderer" />
+ <component id="PieChart" class="org.apache.flex.charts.PieChart" />
+ <component id="PieChartSeries" class="org.apache.flex.charts.supportClasses.PieChartSeries" />
<component id="XAxisBead" class="org.apache.flex.charts.beads.XAxisBead" />
<component id="VerticalColumnLayout" class="org.apache.flex.html.beads.layouts.VerticalColumnLayout" />
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSJX/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/defaults.css b/frameworks/as/projects/FlexJSJX/defaults.css
index ab9bdc3..50542b9 100644
--- a/frameworks/as/projects/FlexJSJX/defaults.css
+++ b/frameworks/as/projects/FlexJSJX/defaults.css
@@ -25,6 +25,7 @@ BarChart
IBeadView: ClassReference("org.apache.flex.charts.beads.BarChartView");
IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController");
IBeadLayout: ClassReference("org.apache.flex.charts.beads.layouts.BarChartLayout");
+ IDataGroup: ClassReference("org.apache.flex.html.supportClasses.NonVirtualDataGroup");
IDataProviderItemRendererMapper: ClassReference("org.apache.flex.charts.beads.ChartItemRendererFactory");
IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
IItemRenderer: ClassReference("org.apache.flex.charts.supportClasses.BoxItemRenderer");
@@ -56,3 +57,15 @@ DateField {
IBeadController: ClassReference("org.apache.flex.html.beads.controllers.DateFieldMouseController");
IFormatBead: ClassReference("org.apache.flex.html.accessories.DateFormatMMDDYYYYBead");
}
+
+PieChart
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel");
+ IBeadView: ClassReference("org.apache.flex.charts.beads.PieChartView");
+ IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController");
+ IBeadLayout: ClassReference("org.apache.flex.charts.beads.layouts.PieChartLayout");
+ IDataGroup: ClassReference("org.apache.flex.charts.ChartDataGroup");
+ IDataProviderItemRendererMapper: ClassReference("org.apache.flex.charts.beads.ChartItemRendererFactory");
+ IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
+ IItemRenderer: ClassReference("org.apache.flex.charts.supportClasses.WedgeItemRenderer");
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as b/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
index 6ba0087..7dedf06 100644
--- a/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
+++ b/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
@@ -29,10 +29,14 @@ internal class FlexJSJXClasses
{
import org.apache.flex.charts.beads.BarChartView; BarChartView;
import org.apache.flex.charts.beads.ChartItemRendererFactory; ChartItemRendererFactory;
+ import org.apache.flex.charts.beads.PieChartView; PieChartView;
import org.apache.flex.charts.beads.XAxisBead; XAxisBead;
import org.apache.flex.charts.beads.layouts.BarChartLayout; BarChartLayout;
+ import org.apache.flex.charts.beads.layouts.PieChartLayout; PieChartLayout;
import org.apache.flex.charts.supportClasses.BarChartSeries; BarChartSeries;
import org.apache.flex.charts.supportClasses.BoxItemRenderer; BoxItemRenderer;
+ import org.apache.flex.charts.supportClasses.PieChartSeries; PieChartSeries;
+
import org.apache.flex.effects.Tween; Tween;
import org.apache.flex.effects.Move; Move;
import org.apache.flex.effects.Fade; Fade;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/PieChart.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/PieChart.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/PieChart.as
new file mode 100644
index 0000000..ad23fd0
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/PieChart.as
@@ -0,0 +1,53 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.charts
+{
+ import org.apache.flex.charts.core.IChart;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.html.List;
+
+ public class PieChart extends List implements IChart
+ {
+ public function PieChart()
+ {
+ super();
+ }
+
+ private var _series:Array;
+
+ /**
+ * The collection of series for the chart. Each element of the
+ * series array should be of type BarChartSeries.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get series():Array
+ {
+ return _series;
+ }
+ public function set series(value:Array):void
+ {
+ _series = value;
+ dispatchEvent(new Event("seriesChanged"));
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/beads/PieChartView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/beads/PieChartView.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/beads/PieChartView.as
new file mode 100644
index 0000000..8116e89
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/beads/PieChartView.as
@@ -0,0 +1,51 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.charts.beads
+{
+ import org.apache.flex.charts.ChartDataGroup;
+ import org.apache.flex.core.ISelectionModel;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.html.beads.ListView;
+
+ public class PieChartView extends ListView
+ {
+ public function PieChartView()
+ {
+ super();
+ }
+
+ private var _strand:IStrand;
+ private var listModel:ISelectionModel;
+
+ /**
+ * @copy org.apache.flex.core.IBead#strand
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ override public function set strand(value:IStrand):void
+ {
+ _strand = value;
+// this.dataGroup = new ChartDataGroup();
+ super.strand = value;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/beads/layouts/PieChartLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/beads/layouts/PieChartLayout.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/beads/layouts/PieChartLayout.as
new file mode 100644
index 0000000..9cbaebc
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/beads/layouts/PieChartLayout.as
@@ -0,0 +1,178 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.charts.beads.layouts
+{
+ import org.apache.flex.charts.beads.ChartItemRendererFactory;
+ import org.apache.flex.charts.core.IChart;
+ import org.apache.flex.charts.core.IChartItemRenderer;
+ import org.apache.flex.charts.supportClasses.PieChartSeries;
+ import org.apache.flex.charts.supportClasses.WedgeItemRenderer;
+ import org.apache.flex.core.IBeadLayout;
+ import org.apache.flex.core.IDataProviderItemRendererMapper;
+ import org.apache.flex.core.ILayoutParent;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+
+ public class PieChartLayout implements IBeadLayout
+ {
+ public function PieChartLayout()
+ {
+ }
+
+ private var _strand:IStrand;
+
+ /**
+ * @copy org.apache.flex.core.IBead#strand
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function set strand(value:IStrand):void
+ {
+ _strand = value;
+ IEventDispatcher(value).addEventListener("widthChanged", changeHandler);
+ IEventDispatcher(value).addEventListener("childrenAdded", changeHandler);
+ IEventDispatcher(value).addEventListener("itemsCreated", changeHandler);
+ }
+
+ /**
+ * @private
+ */
+ private function changeHandler(event:Event):void
+ {
+ var layoutParent:ILayoutParent = _strand.getBeadByType(ILayoutParent) as ILayoutParent;
+ var chartArea:UIBase = layoutParent.contentView as UIBase;
+
+ var factory:ChartItemRendererFactory = _strand.getBeadByType(IDataProviderItemRendererMapper) as ChartItemRendererFactory;
+ var n:int = factory.seriesRenderers.length;
+
+ var xpos:Number = 0;
+ var useWidth:Number = UIBase(_strand).width;
+ var useHeight:Number = UIBase(_strand).height;
+
+ var maxYValue:Number = 0;
+ var series:Array = IChart(_strand).series;
+ trace("There are "+series.length+" series in this chart");
+ var seriesMaxes:Array = [];
+ var colors:Array = [0xFF0000, 0xFF9900, 0x00FF00, 0x00FFcc, 0x0000FF, 0xcc00FF, 0xFF00cc, 0x888888, 0x333333, 0xFFcc99];
+
+ // determine the total value by adding up the dataField values.
+ for (var s:int = 0; s < series.length; s++)
+ {
+ var pcs:PieChartSeries = series[s] as PieChartSeries;
+
+ for (var i:int = 0; i < n; i++)
+ {
+ var m:Array = factory.seriesRenderers[i] as Array;
+ var item:IChartItemRenderer = m[s] as IChartItemRenderer;
+ var data:Object = item.data;
+ var field:String = pcs.dataField;
+
+ var yValue:Number = Number(data[field]);
+ maxYValue += yValue;
+
+ seriesMaxes.push( {yValue:yValue, percent:0, arc:0} );
+ }
+
+ for (i=0; i < n; i++)
+ {
+ var obj:Object = seriesMaxes[i];
+ obj.percent = obj.yValue / maxYValue;
+ obj.arc = 360.0*obj.percent;
+
+ trace("dataPoint "+i+": value="+obj.yValue+"; percent="+obj.percent+"; arc="+obj.arc);
+ }
+
+ var start:Number = 0;
+ var end:Number = 0;
+ var radius:Number = Math.min(useWidth,useHeight)/2;
+ var centerX:Number = useWidth/2;
+ var centerY:Number = useHeight/2;
+
+ for (i=0; i < n; i++)
+ {
+ obj = seriesMaxes[i];
+ m = factory.seriesRenderers[i] as Array;
+ var renderer:WedgeItemRenderer = m[s] as WedgeItemRenderer;
+
+ end = start + (360.0 * obj.percent);
+ var arc:Number = 360.0 * obj.percent;
+ trace("Draw arc from "+start+" to "+(start+arc));
+ renderer.fillColor = colors[i];
+ renderer.drawWedge(chartArea,centerX, centerY, start*Math.PI/180, arc*Math.PI/180, radius);
+
+ start += arc;
+ }
+ }
+ // for each value, determine its %
+ // use that % to determine the arc of the wedge
+
+ // tell each wedge the data it needs so it can draw itself
+
+ /*var pcs:PieChartSeries = series[0] as PieChartSeries;
+ var m:WedgeItemRenderer = (factory.seriesRenderers[0] as Array)[0] as WedgeItemRenderer;
+
+ for (var s:int = 0; s < series.length; s++)
+ {
+ var pcs:PieChartSeries = series[s] as PieChartSeries;
+ seriesMaxes.push({maxValue:0,scaleFactor:0});
+
+ for (var i:int = 0; i < n; i++)
+ {
+ var m:Array = factory.seriesRenderers[i] as Array;
+ var item:IChartItemRenderer = m[s] as IChartItemRenderer;
+ var data:Object = item.data;
+ var field:String = bcs.yField;
+
+ var yValue:Number = Number(data[field]);
+ seriesMaxes[s].maxValue = Math.max(seriesMaxes[s].maxValue,yValue);
+ }
+
+ seriesMaxes[s].scaleFactor = useHeight/seriesMaxes[s].maxValue;
+ }
+
+ for (i = 0; i < n; i++)
+ {
+ m = factory.seriesRenderers[i] as Array;
+ for (s=0; s < m.length; s++)
+ {
+ var seriesWidth:Number = useWidth/series.length;
+ var child:IChartItemRenderer = m[s] as IChartItemRenderer;
+ data = child.data
+ yValue = Number(data[child.yField]);
+
+ child.y = useHeight - yValue*seriesMaxes[s].scaleFactor;
+ child.x = xpos;
+ child.width = seriesWidth;
+ child.height = yValue*seriesMaxes[s].scaleFactor;
+ xpos += seriesWidth;
+ }
+
+ xpos += gap;
+
+ }*/
+
+ IEventDispatcher(_strand).dispatchEvent(new Event("layoutComplete"));
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/core/IChart.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/core/IChart.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/core/IChart.as
deleted file mode 100644
index ac8d530..0000000
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/core/IChart.as
+++ /dev/null
@@ -1,48 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.charts.core
-{
- /**
- * The IChart interface is the basic interface for every chart component. All
- * charts have a least one "series" - a collection of data values for each
- * axis of the chart (a PieChart follows this pattern, too, since the total
- * number of items in its series represents 100% of the pie and each item
- * contributes some percentage). A Chart then uses a set of beads particular
- * to that chart type.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IChart
- {
- /**
- * The collection of series for the chart. Each element of the
- * series array should be of type IChartSeries.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get series():Array;
- function set series(value:Array):void;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/core/IChartAxis.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/core/IChartAxis.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/core/IChartAxis.as
deleted file mode 100644
index a10b12e..0000000
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/core/IChartAxis.as
+++ /dev/null
@@ -1,34 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.charts.core
-{
- /**
- * The IChartAxis interface is a marker for any class that draws an axis
- * for a chart. The XAxisBead is an example that implements this interface.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IChartAxis
- {
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/core/IChartItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/core/IChartItemRenderer.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/core/IChartItemRenderer.as
deleted file mode 100644
index af6603d..0000000
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/core/IChartItemRenderer.as
+++ /dev/null
@@ -1,114 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.charts.core
-{
- import org.apache.flex.core.IItemRenderer;
-
- /**
- * The IChartItemRenderer interface is the interface implemented by any
- * class that draws chart graphics.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IChartItemRenderer extends IItemRenderer
- {
- /**
- * The name of the field containing the X-axis value found
- * in the data property.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get xField():String;
- function set xField(value:String):void;
-
- /**
- * The name of the field containing the Y-axis value found
- * in the data property.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get yField():String;
- function set yField(value:String):void;
-
- /**
- * The primary or preferred color to use for the graphics for
- * the type of chart.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get fillColor():uint;
- function set fillColor(value:uint):void;
-
- /**
- * The x display position for the itemRenderer. This is set by
- * the chart's layout manager.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function set x(value:Number):void;
-
- /**
- * The y display position for the itemRenderer. This is set by
- * the chart's layout manager.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function set y(value:Number):void;
-
- /**
- * The display width for the itemRenderer. This is set by
- * the chart's layout manager.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function set width(value:Number):void;
-
- /**
- * The display height for the itemRenderer. This is set by
- * the chart's layout manager.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function set height(value:Number):void;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/core/IChartSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/core/IChartSeries.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/core/IChartSeries.as
deleted file mode 100644
index 43e8e66..0000000
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/core/IChartSeries.as
+++ /dev/null
@@ -1,80 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.charts.core
-{
- import mx.core.IFactory;
-
- /**
- * The IChartSeries interface is the basic interface for any type of
- * chart data series.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IChartSeries
- {
- /**
- * The name field that represents the X-axis value for the chart series.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get xField():String;
- function set xField(value:String):void;
-
- /**
- * The name field that represents the Y-axis value for the chart series.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get yField():String;
- function set yField(value:String):void;
-
- /**
- * The preferred color to use for the series renderer.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get fillColor():uint;
- function set fillColor(value:uint):void;
-
- /**
- * The itemRenderer class or factory that produces an instance of that class. This
- * renderer uses the series data and properties to draw the representation for the
- * chart type (e.g., the BarChart draws a bar in the fillColor).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get itemRenderer():IFactory;
- function set itemRenderer(value:IFactory):void;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/supportClasses/PieChartSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/supportClasses/PieChartSeries.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/supportClasses/PieChartSeries.as
new file mode 100644
index 0000000..ce8e36b
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/supportClasses/PieChartSeries.as
@@ -0,0 +1,94 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.charts.supportClasses
+{
+ import mx.core.IFactory;
+
+ import org.apache.flex.charts.core.IChartSeries;
+
+ public class PieChartSeries implements IChartSeries
+ {
+ public function PieChartSeries()
+ {
+ }
+
+ private var _dataField:String;
+ public function get dataField():String
+ {
+ return _dataField;
+ }
+ public function set dataField(value:String):void
+ {
+ _dataField = value;
+ }
+
+ private var _itemRenderer:IFactory;
+
+ /**
+ * The class or class factory to use as the itemRenderer for each X/Y pair. The
+ * itemRenderer class must implement the IChartItemRenderer interface.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get itemRenderer():IFactory
+ {
+ return _itemRenderer;
+ }
+ public function set itemRenderer(value:IFactory):void
+ {
+ _itemRenderer = value;
+ }
+
+ // todo: fillColors - one color for each wedge which will be repeated if necessary
+
+ /*
+ * Properties ignored for PieChartSeries
+ */
+
+ public function get xField():String
+ {
+ return null;
+ }
+
+ public function set xField(value:String):void
+ {
+ }
+
+ public function get yField():String
+ {
+ return null;
+ }
+
+ public function set yField(value:String):void
+ {
+ }
+
+ public function get fillColor():uint
+ {
+ return 0;
+ }
+
+ public function set fillColor(value:uint):void
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSUI/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/basic-manifest.xml b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
index 2cf68ff..3b3f35f 100644
--- a/frameworks/as/projects/FlexJSUI/basic-manifest.xml
+++ b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
@@ -72,6 +72,8 @@
<component id="TextPromptBead" class="org.apache.flex.html.accessories.TextPromptBead" />
<component id="MixinManager" class="org.apache.flex.utils.MixinManager" />
+ <component id="WedgeItemRenderer" class="org.apache.flex.charts.supportClasses.WedgeItemRenderer" />
+
<component id="Map" class="org.apache.flex.maps.google.Map" />
</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSUI/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/defaults.css b/frameworks/as/projects/FlexJSUI/defaults.css
index fa54d19..21d7444 100644
--- a/frameworks/as/projects/FlexJSUI/defaults.css
+++ b/frameworks/as/projects/FlexJSUI/defaults.css
@@ -75,6 +75,7 @@ ButtonBar
IBeadView: ClassReference("org.apache.flex.html.beads.ButtonBarView");
IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController");
IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.ButtonBarLayout");
+ IDataGroup: ClassReference("org.apache.flex.html.supportClasses.NonVirtualDataGroup");
IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.TextItemRendererFactoryForArrayData");
IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.ButtonBarButtonItemRenderer");
@@ -94,6 +95,7 @@ List
IBeadView: ClassReference("org.apache.flex.html.beads.ListView");
IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController");
IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.NonVirtualVerticalScrollingLayout");
+ IDataGroup: ClassReference("org.apache.flex.html.supportClasses.NonVirtualDataGroup");
IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.DataItemRendererFactoryForArrayData");
IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.StringItemRenderer");
@@ -110,6 +112,7 @@ SimpleList
IBeadView: ClassReference("org.apache.flex.html.beads.ListView");
IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController");
IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.NonVirtualVerticalScrollingLayout");
+ IDataGroup: ClassReference("org.apache.flex.html.supportClasses.NonVirtualDataGroup");
IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.TextItemRendererFactoryForArrayData");
IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.StringItemRenderer");
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
index 70de2cd..760e297 100644
--- a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
+++ b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
@@ -30,6 +30,13 @@ internal class FlexJSUIClasses
import org.apache.cordova.camera.Camera; Camera;
import org.apache.cordova.Application; Application;
import org.apache.cordova.Weinre; Weinre;
+
+ import org.apache.flex.charts.core.IChart; IChart;
+ import org.apache.flex.charts.core.IChartSeries; IChartSeries;
+ import org.apache.flex.charts.core.IChartAxis; IChartAxis;
+ import org.apache.flex.charts.core.IChartItemRenderer; IChartItemRenderer;
+ import org.apache.flex.charts.ChartDataGroup; ChartDataGroup;
+ import org.apache.flex.charts.supportClasses.WedgeItemRenderer; WedgeItemRenderer;
import org.apache.flex.maps.google.Map; Map;
import org.apache.flex.html.accessories.NumericOnlyTextInputBead; NumericOnlyTextInputBead;
@@ -92,6 +99,7 @@ internal class FlexJSUIClasses
import org.apache.flex.html.beads.layouts.TileLayout; TileLayout;
import org.apache.flex.html.beads.TextItemRendererFactoryForArrayData; TextItemRendererFactoryForArrayData;
import org.apache.flex.html.beads.DataItemRendererFactoryForArrayData; DataItemRendererFactoryForArrayData;
+ import org.apache.flex.html.supportClasses.NonVirtualDataGroup; NonVirtualDataGroup;
import org.apache.flex.core.ItemRendererClassFactory; ItemRendererClassFactory;
import org.apache.flex.core.FilledRectangle; FilledRectangle;
import org.apache.flex.events.CustomEvent; CustomEvent;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/ChartDataGroup.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/ChartDataGroup.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/ChartDataGroup.as
new file mode 100644
index 0000000..5e06376
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/ChartDataGroup.as
@@ -0,0 +1,31 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.charts
+{
+ import org.apache.flex.core.IItemRendererParent;
+ import org.apache.flex.html.supportClasses.NonVirtualDataGroup;
+
+ public class ChartDataGroup extends NonVirtualDataGroup implements IItemRendererParent
+ {
+ public function ChartDataGroup()
+ {
+ super();
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/core/IChart.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/core/IChart.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/core/IChart.as
new file mode 100644
index 0000000..ac8d530
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/core/IChart.as
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.charts.core
+{
+ /**
+ * The IChart interface is the basic interface for every chart component. All
+ * charts have a least one "series" - a collection of data values for each
+ * axis of the chart (a PieChart follows this pattern, too, since the total
+ * number of items in its series represents 100% of the pie and each item
+ * contributes some percentage). A Chart then uses a set of beads particular
+ * to that chart type.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IChart
+ {
+ /**
+ * The collection of series for the chart. Each element of the
+ * series array should be of type IChartSeries.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get series():Array;
+ function set series(value:Array):void;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/core/IChartAxis.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/core/IChartAxis.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/core/IChartAxis.as
new file mode 100644
index 0000000..a10b12e
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/core/IChartAxis.as
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.charts.core
+{
+ /**
+ * The IChartAxis interface is a marker for any class that draws an axis
+ * for a chart. The XAxisBead is an example that implements this interface.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IChartAxis
+ {
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/core/IChartItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/core/IChartItemRenderer.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/core/IChartItemRenderer.as
new file mode 100644
index 0000000..af6603d
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/core/IChartItemRenderer.as
@@ -0,0 +1,114 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.charts.core
+{
+ import org.apache.flex.core.IItemRenderer;
+
+ /**
+ * The IChartItemRenderer interface is the interface implemented by any
+ * class that draws chart graphics.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IChartItemRenderer extends IItemRenderer
+ {
+ /**
+ * The name of the field containing the X-axis value found
+ * in the data property.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get xField():String;
+ function set xField(value:String):void;
+
+ /**
+ * The name of the field containing the Y-axis value found
+ * in the data property.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get yField():String;
+ function set yField(value:String):void;
+
+ /**
+ * The primary or preferred color to use for the graphics for
+ * the type of chart.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get fillColor():uint;
+ function set fillColor(value:uint):void;
+
+ /**
+ * The x display position for the itemRenderer. This is set by
+ * the chart's layout manager.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function set x(value:Number):void;
+
+ /**
+ * The y display position for the itemRenderer. This is set by
+ * the chart's layout manager.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function set y(value:Number):void;
+
+ /**
+ * The display width for the itemRenderer. This is set by
+ * the chart's layout manager.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function set width(value:Number):void;
+
+ /**
+ * The display height for the itemRenderer. This is set by
+ * the chart's layout manager.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function set height(value:Number):void;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/core/IChartSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/core/IChartSeries.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/core/IChartSeries.as
new file mode 100644
index 0000000..43e8e66
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/core/IChartSeries.as
@@ -0,0 +1,80 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.charts.core
+{
+ import mx.core.IFactory;
+
+ /**
+ * The IChartSeries interface is the basic interface for any type of
+ * chart data series.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IChartSeries
+ {
+ /**
+ * The name field that represents the X-axis value for the chart series.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get xField():String;
+ function set xField(value:String):void;
+
+ /**
+ * The name field that represents the Y-axis value for the chart series.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get yField():String;
+ function set yField(value:String):void;
+
+ /**
+ * The preferred color to use for the series renderer.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get fillColor():uint;
+ function set fillColor(value:uint):void;
+
+ /**
+ * The itemRenderer class or factory that produces an instance of that class. This
+ * renderer uses the series data and properties to draw the representation for the
+ * chart type (e.g., the BarChart draws a bar in the fillColor).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get itemRenderer():IFactory;
+ function set itemRenderer(value:IFactory):void;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/supportClasses/WedgeItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/supportClasses/WedgeItemRenderer.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/supportClasses/WedgeItemRenderer.as
new file mode 100644
index 0000000..f51afbe
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/charts/supportClasses/WedgeItemRenderer.as
@@ -0,0 +1,146 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.charts.supportClasses
+{
+ import flash.display.Graphics;
+ import flash.geom.Point;
+
+ import org.apache.flex.charts.core.IChartItemRenderer;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.html.supportClasses.DataItemRenderer;
+
+ public class WedgeItemRenderer extends DataItemRenderer implements IChartItemRenderer
+ {
+ public function WedgeItemRenderer()
+ {
+ super();
+ }
+
+ private var _fillColor:uint = 0xFF0000;
+
+ public function get fillColor():uint
+ {
+ return _fillColor;
+ }
+
+ public function set fillColor(value:uint):void
+ {
+ _fillColor = value;
+ }
+
+ /**
+ * Draw a wedge of a circle
+ * @param graphics the graphics object to draw into
+ * @param x the x center of the circle
+ * @param y the y center of the circle
+ * @param startAngle start angle (radians)
+ * @param arc sweep angle (radians)
+ * @param radius radius of the circle
+ * @param yRadius vertical radius (or radius if none given)
+ * @param continueFlag if true, uses a moveTo call to start drawing at the start point of the circle; else continues drawing using only lineTo and curveTo
+ *
+ */
+ public function drawWedge(chartArea:UIBase, x:Number, y:Number,
+ startAngle:Number, arc:Number,
+ radius:Number, yRadius:Number = NaN,
+ continueFlag:Boolean = false):void
+ {
+
+ var g:Graphics = chartArea.graphics;
+
+ if (isNaN(yRadius))
+ yRadius = radius;
+
+ var segAngle:Number
+ var theta:Number
+ var angle:Number
+ var angleMid:Number
+ var segs:Number
+ var ax:Number
+ var ay:Number
+ var bx:Number
+ var by:Number
+ var cx:Number
+ var cy:Number;
+
+ if (Math.abs(arc) > 2 * Math.PI)
+ arc = 2 * Math.PI;
+
+ segs = Math.ceil(Math.abs(arc) / (Math.PI / 4));
+ segAngle = arc / segs;
+ theta = -segAngle;
+ angle = -startAngle;
+
+ if (segs > 0)
+ {
+ ax = x + Math.cos(startAngle) * radius;
+ ay = y + Math.sin(-startAngle) * yRadius;
+
+ g.beginFill(fillColor);
+
+ g.moveTo(x,y);
+
+ if (continueFlag == true)
+ g.lineTo(ax, ay);
+ else
+ g.moveTo(ax, ay);
+
+ for (var i:uint = 0; i < segs; i++)
+ {
+ angle += theta;
+ angleMid = angle - theta / 2;
+
+ bx = x + Math.cos(angle) * radius;
+ by = y + Math.sin(angle) * yRadius;
+ cx = x + Math.cos(angleMid) * (radius / Math.cos(theta / 2));
+ cy = y + Math.sin(angleMid) * (yRadius / Math.cos(theta / 2));
+
+ g.curveTo(cx, cy, bx, by);
+ }
+
+ g.lineTo(x,y);
+
+ g.endFill();
+ }
+ }
+
+ /*
+ * Ignored by WedgeItemRenderer
+ */
+
+ public function get xField():String
+ {
+ return null;
+ }
+
+ public function set xField(value:String):void
+ {
+ }
+
+ public function get yField():String
+ {
+ return null;
+ }
+
+ public function set yField(value:String):void
+ {
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as
index 1bb3605..3cbf4bd 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ListView.as
@@ -21,7 +21,7 @@ package org.apache.flex.html.beads
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
- import org.apache.flex.core.BeadViewBase;
+ import org.apache.flex.core.BeadViewBase;
import org.apache.flex.core.IBead;
import org.apache.flex.core.IBeadLayout;
import org.apache.flex.core.IBeadModel;
@@ -92,6 +92,10 @@ package org.apache.flex.html.beads
{
return _dataGroup;
}
+ public function set dataGroup(value:IItemRendererParent):void
+ {
+ _dataGroup = value;
+ }
private var _vScrollBar:ScrollBar;
@@ -175,7 +179,9 @@ package org.apache.flex.html.beads
_border.addBead(new (ValuesManager.valuesImpl.getValue(value, "iBorderBead")) as IBead);
IParent(_strand).addElement(_border);
- _dataGroup = new NonVirtualDataGroup();
+ if (_dataGroup == null) {
+ _dataGroup = new (ValuesManager.valuesImpl.getValue(value, "iDataGroup")) as IItemRendererParent;
+ }
IParent(_strand).addElement(_dataGroup);
if (_strand.getBeadByType(IBeadLayout) == null)
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/js/FlexJS/src/org/apache/flex/charts/ChartDataGroup.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/charts/ChartDataGroup.js b/frameworks/js/FlexJS/src/org/apache/flex/charts/ChartDataGroup.js
new file mode 100644
index 0000000..7266214
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/charts/ChartDataGroup.js
@@ -0,0 +1,57 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+goog.provide('org.apache.flex.charts.ChartDataGroup');
+
+goog.require('org.apache.flex.html.supportClasses.NonVirtualDataGroup');
+
+
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.html.supportClasses.NonVirtualDataGroup}
+ */
+org.apache.flex.charts.ChartDataGroup =
+ function() {
+ org.apache.flex.charts.ChartDataGroup.base(this, 'constructor');
+};
+goog.inherits(
+ org.apache.flex.charts.ChartDataGroup,
+ org.apache.flex.html.supportClasses.NonVirtualDataGroup);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.charts.ChartDataGroup.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'ChartDataGroup',
+ qName: 'org.apache.flex.charts.ChartDataGroup' }] };
+
+
+/**
+ * @override
+ */
+org.apache.flex.charts.ChartDataGroup.
+ prototype.createElement = function() {
+ this.element = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
+ this.element.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xlink', 'http://www.w3.org/1999/xlink');
+ this.element.flexjs_wrapper = this;
+ this.set_className('ChartDataGroup');
+
+ this.positioner = this.element;
+
+ return this.element;
+};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChart.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChart.js b/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChart.js
new file mode 100644
index 0000000..9e256ba
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChart.js
@@ -0,0 +1,51 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * org.apache.flex.charts.core.IChart
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes}
+ */
+
+goog.provide('org.apache.flex.charts.core.IChart');
+
+
+
+/**
+ * @interface
+ */
+org.apache.flex.charts.core.IChart = function() {
+};
+
+
+/**
+ * @return {Array}
+ */
+org.apache.flex.charts.core.IChart.prototype.get_series = function() {};
+
+
+/**
+ * @param {Array} value
+ */
+org.apache.flex.charts.core.IChart.prototype.set_series = function(value) {};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.charts.core.IChart.prototype.FLEXJS_CLASS_INFO = {
+ names: [{ name: 'IChart', qName: 'org.apache.flex.charts.core.IChart'}]
+ };
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChartAxis.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChartAxis.js b/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChartAxis.js
new file mode 100644
index 0000000..bc572c1
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChartAxis.js
@@ -0,0 +1,39 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * org.apache.flex.charts.core.IChartAxis
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes}
+ */
+
+goog.provide('org.apache.flex.charts.core.IChartAxis');
+
+
+
+/**
+ * @interface
+ */
+org.apache.flex.charts.core.IChartAxis = function() {
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.charts.core.IChartAxis.prototype.FLEXJS_CLASS_INFO = {
+ names: [{ name: 'IChartAxis', qName: 'org.apache.flex.charts.core.IChartAxis'}]
+ };
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChartItemRenderer.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChartItemRenderer.js b/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChartItemRenderer.js
new file mode 100644
index 0000000..7a589c4
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChartItemRenderer.js
@@ -0,0 +1,103 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * org.apache.flex.charts.core.IChartItemRenderer
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes}
+ */
+
+goog.provide('org.apache.flex.charts.core.IChartItemRenderer');
+
+goog.require('org.apache.flex.core.IItemRenderer');
+
+
+
+/**
+ * @interface
+ * @extends {org.apache.flex.core.IItemRenderer}
+ */
+org.apache.flex.charts.core.IChartItemRenderer = function() {
+};
+
+
+/**
+ * @return {string}
+ */
+org.apache.flex.charts.core.IChartItemRenderer.prototype.get_xField = function() {};
+
+
+/**
+ * @param {string} value
+ */
+org.apache.flex.charts.core.IChartItemRenderer.prototype.set_xField = function(value) {};
+
+
+/**
+ * @return {string}
+ */
+org.apache.flex.charts.core.IChartItemRenderer.prototype.get_yField = function() {};
+
+
+/**
+ * @param {string} value
+ */
+org.apache.flex.charts.core.IChartItemRenderer.prototype.set_yField = function(value) {};
+
+
+/**
+ * @return {number}
+ */
+org.apache.flex.charts.core.IChartItemRenderer.prototype.get_fillColor = function() {};
+
+
+/**
+ * @param {number} value
+ */
+org.apache.flex.charts.core.IChartItemRenderer.prototype.set_fillColor = function(value) {};
+
+
+/**
+ * @param {number} value
+ */
+org.apache.flex.charts.core.IChartItemRenderer.prototype.set_x = function(value) {};
+
+
+/**
+ * @param {number} value
+ */
+org.apache.flex.charts.core.IChartItemRenderer.prototype.set_y = function(value) {};
+
+
+/**
+ * @param {number} value
+ */
+org.apache.flex.charts.core.IChartItemRenderer.prototype.set_width = function(value) {};
+
+
+/**
+ * @param {number} value
+ */
+org.apache.flex.charts.core.IChartItemRenderer.prototype.set_height = function(value) {};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.charts.core.IChartItemRenderer.prototype.FLEXJS_CLASS_INFO = {
+ names: [{ name: 'IChartItemRenderer', qName: 'org.apache.flex.charts.core.IChartItemRenderer'}],
+ interfaces: [org.apache.flex.core.IItemRenderer]
+ };
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChartSeries.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChartSeries.js b/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChartSeries.js
new file mode 100644
index 0000000..6b715db
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChartSeries.js
@@ -0,0 +1,89 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * org.apache.flex.charts.core.IChartSeries
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes}
+ */
+
+goog.provide('org.apache.flex.charts.core.IChartSeries');
+
+goog.require('mx.core.IFactory');
+
+
+
+/**
+ * @interface
+ */
+org.apache.flex.charts.core.IChartSeries = function() {
+};
+
+
+/**
+ * @return {string}
+ */
+org.apache.flex.charts.core.IChartSeries.prototype.get_xField = function() {};
+
+
+/**
+ * @param {string} value
+ */
+org.apache.flex.charts.core.IChartSeries.prototype.set_xField = function(value) {};
+
+
+/**
+ * @return {string}
+ */
+org.apache.flex.charts.core.IChartSeries.prototype.get_yField = function() {};
+
+
+/**
+ * @param {string} value
+ */
+org.apache.flex.charts.core.IChartSeries.prototype.set_yField = function(value) {};
+
+
+/**
+ * @return {number}
+ */
+org.apache.flex.charts.core.IChartSeries.prototype.get_fillColor = function() {};
+
+
+/**
+ * @param {number} value
+ */
+org.apache.flex.charts.core.IChartSeries.prototype.set_fillColor = function(value) {};
+
+
+/**
+ * @return {mx.core.IFactory}
+ */
+org.apache.flex.charts.core.IChartSeries.prototype.get_itemRenderer = function() {};
+
+
+/**
+ * @param {mx.core.IFactory} value
+ */
+org.apache.flex.charts.core.IChartSeries.prototype.set_itemRenderer = function(value) {};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.charts.core.IChartSeries.prototype.FLEXJS_CLASS_INFO = {
+ names: [{ name: 'IChartSeries', qName: 'org.apache.flex.charts.core.IChartSeries'}]
+ };
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/js/FlexJS/src/org/apache/flex/charts/supportClasses/WedgeItemRenderer.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/charts/supportClasses/WedgeItemRenderer.js b/frameworks/js/FlexJS/src/org/apache/flex/charts/supportClasses/WedgeItemRenderer.js
new file mode 100644
index 0000000..1eae798
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/charts/supportClasses/WedgeItemRenderer.js
@@ -0,0 +1,196 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+goog.provide('org.apache.flex.charts.supportClasses.WedgeItemRenderer');
+
+goog.require('org.apache.flex.charts.core.IChartItemRenderer');
+goog.require('org.apache.flex.core.FilledRectangle');
+goog.require('org.apache.flex.html.supportClasses.DataItemRenderer');
+goog.require('org.apache.flex.utils.Language');
+
+
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.html.supportClasses.DataItemRenderer}
+ * @implements {org.apache.flex.charts.core.IChartItemRenderer}
+ */
+org.apache.flex.charts.supportClasses.WedgeItemRenderer =
+ function() {
+ goog.base(this);
+ this.className = 'WedgeItemRenderer';
+};
+goog.inherits(
+ org.apache.flex.charts.supportClasses.WedgeItemRenderer,
+ org.apache.flex.html.supportClasses.DataItemRenderer);
+
+
+/**
+ * @type {Object}
+ */
+org.apache.flex.charts.supportClasses.WedgeItemRenderer.prototype._itemRendererParent = null;
+
+
+/**
+ * @expose
+ * @return {Object}
+ */
+org.apache.flex.charts.supportClasses.WedgeItemRenderer.prototype.get_itemRendererParent = function() {
+ return this._itemRendererParent;
+};
+
+
+/**
+ * @expose
+ * @param {Object} value
+ */
+org.apache.flex.charts.supportClasses.WedgeItemRenderer.prototype.set_itemRendererParent = function(value) {
+ this._itemRendererParent = value;
+};
+
+
+/**
+ * @type {string}
+ */
+org.apache.flex.charts.supportClasses.WedgeItemRenderer.prototype._yField = 'y';
+
+
+/**
+ * @expose
+ * @return {string}
+ */
+org.apache.flex.charts.supportClasses.WedgeItemRenderer.prototype.get_yField = function() {
+ return this._yField;
+};
+
+
+/**
+ * @expose
+ * @param {string} value
+ */
+org.apache.flex.charts.supportClasses.WedgeItemRenderer.prototype.set_yField = function(value) {
+ this._yField = value;
+};
+
+
+/**
+ * @type {string}
+ */
+org.apache.flex.charts.supportClasses.WedgeItemRenderer.prototype._xField = 'x';
+
+
+/**
+ * @expose
+ * @return {string}
+ */
+org.apache.flex.charts.supportClasses.WedgeItemRenderer.prototype.get_xField = function() {
+ return this._xField;
+};
+
+
+/**
+ * @expose
+ * @param {string} value
+ */
+org.apache.flex.charts.supportClasses.WedgeItemRenderer.prototype.set_xField = function(value) {
+ this._xField = value;
+};
+
+
+/**
+ * @type {number}
+ */
+org.apache.flex.charts.supportClasses.WedgeItemRenderer.prototype._fillColor = 0;
+
+
+/**
+ * @expose
+ * @return {number}
+ */
+org.apache.flex.charts.supportClasses.WedgeItemRenderer.prototype.get_fillColor = function() {
+ return this._fillColor;
+};
+
+
+/**
+ * @expose
+ * @param {number} value
+ */
+org.apache.flex.charts.supportClasses.WedgeItemRenderer.prototype.set_fillColor = function(value) {
+ this._fillColor = value;
+};
+
+
+/**
+ * @expose
+ * @param {Object} value
+ * @override
+ */
+org.apache.flex.charts.supportClasses.WedgeItemRenderer.prototype.set_data = function(value) {
+ goog.base(this, 'set_data', value);
+ if (this.filledRect == null) {
+ this.filledRect = new org.apache.flex.core.FilledRectangle();
+ this.addElement(this.filledRect);
+ }
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.charts.supportClasses.WedgeItemRenderer.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'WedgeItemRenderer',
+ qName: 'org.apache.flex.charts.supportClasses.WedgeItemRenderer'}],
+ interfaces: [org.apache.flex.charts.core.IChartItemRenderer] };
+
+
+/**
+ * @expose
+ * @param {Object} chartArea The element into which the wedge will be drawn.
+ * @param {number} x The center of the pie.
+ * @param {number} y The center of the pie.
+ * @param {number} startAngle The starting angle of the wedge.
+ * @param {number} arc The sweep of the wedge.
+ * @param {number} radius The radius of the pie.
+ * @param {number} yRadius The vertical radius of the pie if different from the normal radius.
+ * @param {bool} continueFlag Continue drawing from that position.
+ */
+org.apache.flex.charts.supportClasses.WedgeItemRenderer.prototype.drawWedge =
+function(chartArea, x, y,
+ startAngle, arc,
+ radius, yRadius,
+ continueFlag) {
+ var color = Number(this.get_fillColor()).toString(16);
+ if (color.length == 2) color = '00' + color;
+ if (color.length == 4) color = '00' + color;
+
+ var x1 = x + radius * Math.cos(startAngle);
+ var y1 = y + radius * Math.sin(startAngle);
+ var x2 = x + radius * Math.cos(startAngle + arc);
+ var y2 = y + radius * Math.sin(startAngle + arc);
+
+ var pathString = 'M' + x + ' ' + y + ' L' + x1 + ' ' + y1 + ' A' + radius + ' ' + radius +
+ ' 0 0 1 ' + x2 + ' ' + y2 + ' z';
+
+ var style = 'fill:#' + String(color) + ';stroke:black;stroke-width:1';
+
+ var path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
+ path.setAttribute('style', style);
+ path.setAttribute('d', pathString);
+
+ chartArea.element.appendChild(path);
+};
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c37e610/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ListView.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ListView.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ListView.js
index e6344b1..c14bc6c 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ListView.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ListView.js
@@ -75,8 +75,11 @@ org.apache.flex.html.beads.ListView.prototype.set_strand =
this.model.addEventListener('selectedIndexChanged',
goog.bind(this.selectionChangeHandler, this));
- this.dataGroup_ = new
- org.apache.flex.html.supportClasses.NonVirtualDataGroup();
+ if (this.dataGroup_ == null) {
+ var m2 = org.apache.flex.core.ValuesManager.valuesImpl.
+ getValue(this.strand_, 'iDataGroup');
+ this.dataGroup_ = new m2();
+ }
this.dataGroup_.set_strand(this);
this.strand_.addElement(this.dataGroup_);
@@ -96,6 +99,16 @@ org.apache.flex.html.beads.ListView.prototype.get_dataGroup =
/**
* @expose
+ * @param {Object} value The DataGroup instance.
+ */
+org.apache.flex.html.beads.ListView.prototype.set_dataGroup =
+ function(value) {
+ this.dataGroup_ = value;
+};
+
+
+/**
+ * @expose
* @param {Object} value The event that triggered the selection.
*/
org.apache.flex.html.beads.ListView.prototype.
@@ -119,7 +132,7 @@ org.apache.flex.html.beads.ListView.prototype.
* @return {Object} The view that contains the layout objects.
*/
org.apache.flex.html.beads.ListView.prototype.get_contentView = function() {
- return this;
+ return this.dataGroup_;
};