Repository: flex-asjs Updated Branches: refs/heads/develop 155471b25 -> 9508694f5
Changed ActionScript code for chart view to size the dataGroup correctly. Adding missing setter for strand in the optimized, SVG, chart view. Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/9508694f Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/9508694f Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/9508694f Branch: refs/heads/develop Commit: 9508694f5f4c9e0b8008ba8a8ab22635eed93bc8 Parents: 155471b Author: Peter Ent <[email protected]> Authored: Thu Dec 11 16:27:39 2014 -0500 Committer: Peter Ent <[email protected]> Committed: Thu Dec 11 16:27:39 2014 -0500 ---------------------------------------------------------------------- .../src/org/apache/flex/charts/beads/ChartView.as | 18 +++++++++++------- .../flex/charts/optimized/SVGChartDataGroup.as | 15 +++++++++++++++ 2 files changed, 26 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9508694f/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/beads/ChartView.as ---------------------------------------------------------------------- diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/beads/ChartView.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/beads/ChartView.as index 2d1708d..ee06b4d 100644 --- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/beads/ChartView.as +++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/beads/ChartView.as @@ -132,22 +132,26 @@ package org.apache.flex.charts.beads heightAdjustment = haxis.axisHeight; } - UIBase(dataGroup).x = widthAdjustment; - UIBase(dataGroup).y = 0; - UIBase(dataGroup).width = UIBase(dataGroup).width - widthAdjustment; - UIBase(dataGroup).height= UIBase(dataGroup).height - heightAdjustment; + var dg:UIBase = UIBase(dataGroup); + var strandWidth:Number = UIBase(_strand).width; + var strandHeight:Number = UIBase(_strand).height; + + dg.x = widthAdjustment; + dg.y = 0; + dg.width = strandWidth - widthAdjustment; + dg.height= strandHeight - heightAdjustment; if (verticalAxisGroup) { UIBase(verticalAxisGroup).x = 0; UIBase(verticalAxisGroup).y = 0; UIBase(verticalAxisGroup).width = widthAdjustment; - UIBase(verticalAxisGroup).height = UIBase(dataGroup).height; + UIBase(verticalAxisGroup).height = strandHeight - heightAdjustment; } if (horizontalAxisGroup) { UIBase(horizontalAxisGroup).x = widthAdjustment; - UIBase(horizontalAxisGroup).y = UIBase(dataGroup).height; - UIBase(horizontalAxisGroup).width = UIBase(dataGroup).width; + UIBase(horizontalAxisGroup).y = strandHeight - heightAdjustment; + UIBase(horizontalAxisGroup).width = strandWidth - widthAdjustment; UIBase(horizontalAxisGroup).height = heightAdjustment; } } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9508694f/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/optimized/SVGChartDataGroup.as ---------------------------------------------------------------------- diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/optimized/SVGChartDataGroup.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/optimized/SVGChartDataGroup.as index 60e43cc..79345a8 100644 --- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/optimized/SVGChartDataGroup.as +++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/charts/optimized/SVGChartDataGroup.as @@ -24,6 +24,7 @@ package org.apache.flex.charts.optimized import org.apache.flex.core.IContentView; import org.apache.flex.core.IItemRenderer; import org.apache.flex.core.IItemRendererParent; + import org.apache.flex.core.IStrand; import org.apache.flex.core.UIBase; import org.apache.flex.core.graphics.GraphicsContainer; import org.apache.flex.events.Event; @@ -59,6 +60,20 @@ package org.apache.flex.charts.optimized } private var _children:Array; + 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; + } /** * @copy org.apache.flex.core.IItemRendererParent#getItemRendererForIndex()
