You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2014/10/08 19:06:20 UTC
git commit: [flex-asjs] [refs/heads/develop] - Added JavaScript
versions of newly added ActionScript chart elements.
Repository: flex-asjs
Updated Branches:
refs/heads/develop 9eb510604 -> 83574926b
Added JavaScript versions of newly added ActionScript chart elements.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/83574926
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/83574926
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/83574926
Branch: refs/heads/develop
Commit: 83574926b609139a74ff0db8f1fa671aee9aa31f
Parents: 9eb5106
Author: Peter Ent <pe...@apache.org>
Authored: Wed Oct 8 13:06:13 2014 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Wed Oct 8 13:06:13 2014 -0400
----------------------------------------------------------------------
.../apache/flex/charts/core/IChartDataGroup.js | 53 ++++++++++++++++++++
.../charts/supportClasses/ChartDataGroup.js | 27 +++++++++-
2 files changed, 79 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83574926/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChartDataGroup.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChartDataGroup.js b/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChartDataGroup.js
new file mode 100644
index 0000000..bc2a90d
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/charts/core/IChartDataGroup.js
@@ -0,0 +1,53 @@
+/**
+ * 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.IChartDataGroup
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes}
+ */
+
+goog.provide('org.apache.flex.charts.core.IChartDataGroup');
+
+goog.require('mx.core.IFactory');
+goog.require('org.apache.flex.core.IItemRendererParent');
+
+
+
+/**
+ * @interface
+ * @extends {org.apache.flex.core.IItemRendererParent}
+ */
+org.apache.flex.charts.core.IChartDataGroup = function() {
+};
+
+
+/**
+ * @param {Object} series The series containing the itemRenderer.
+ * @param {number} index The position of the itemRenderer within the series.
+ * @return {Object} The itemRenderer matching the series and index.
+ */
+org.apache.flex.charts.core.IChartDataGroup.prototype.getItemRendererForSeriesAtIndex =
+ function(series, index) {};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.charts.core.IChartDataGroup.prototype.FLEXJS_CLASS_INFO = {
+ names: [{ name: 'IChartDataGroup', qName: 'org.apache.flex.charts.core.IChartDataGroup'}],
+ interfaces: [org.apache.flex.core.IItemRendererParent]
+ };
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/83574926/frameworks/js/FlexJS/src/org/apache/flex/charts/supportClasses/ChartDataGroup.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/charts/supportClasses/ChartDataGroup.js b/frameworks/js/FlexJS/src/org/apache/flex/charts/supportClasses/ChartDataGroup.js
index 0e45ada..4fb9617 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/charts/supportClasses/ChartDataGroup.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/charts/supportClasses/ChartDataGroup.js
@@ -14,6 +14,7 @@
goog.provide('org.apache.flex.charts.supportClasses.ChartDataGroup');
+goog.require('org.apache.flex.charts.core.IChartDataGroup');
goog.require('org.apache.flex.html.supportClasses.NonVirtualDataGroup');
@@ -21,6 +22,7 @@ goog.require('org.apache.flex.html.supportClasses.NonVirtualDataGroup');
/**
* @constructor
* @extends {org.apache.flex.html.supportClasses.NonVirtualDataGroup}
+ * @implements {org.apache.flex.charts.core.IChartDataGroup}
*/
org.apache.flex.charts.supportClasses.ChartDataGroup =
function() {
@@ -38,7 +40,8 @@ goog.inherits(
*/
org.apache.flex.charts.supportClasses.ChartDataGroup.prototype.FLEXJS_CLASS_INFO =
{ names: [{ name: 'ChartDataGroup',
- qName: 'org.apache.flex.charts.supportClasses.ChartDataGroup' }] };
+ qName: 'org.apache.flex.charts.supportClasses.ChartDataGroup' }],
+ interfaces: [org.apache.flex.charts.core.IChartDataGroup] };
/**
@@ -54,3 +57,25 @@ org.apache.flex.charts.supportClasses.ChartDataGroup.
return this.element;
};
+
+
+/**
+ * @expose
+ * @param {Object} series The series containing the itemRenderer.
+ * @param {number} index The position of the itemRenderer within the series.
+ * @return {Object} The itemRenderer that matches the series and index.
+ */
+org.apache.flex.charts.supportClasses.ChartDataGroup.prototype.getItemRendererForSeriesAtIndex =
+function(series, index) {
+ var n = this.get_numElements();
+ for (var i = 0; i < n; i++)
+ {
+ var child = this.getElementAt(i);
+ if (child && child.get_series() == series) {
+ if (index === 0) return child;
+ --index;
+ }
+ }
+
+ return null;
+};