1//////////////////////////////////////////////////////////////////////////////// 2// 3// ADOBE SYSTEMS INCORPORATED 4// Copyright 2009 Adobe Systems Incorporated 5// All Rights Reserved. 6// 7// NOTICE: Adobe permits you to use, modify, and distribute this file 8// in accordance with the terms of the license agreement accompanying it. 9// 10//////////////////////////////////////////////////////////////////////////////// 11 12package mx.charts.chartClasses 13{ 14 15import flash.utils.Dictionary; 16import mx.charts.chartClasses.StackedSeries; 17 18/** 19 * The IStackable interface is implemented by any series that can be stacked. 20 * Stacking sets (ColumnSet, BarSet, AreaSet) require that any sub-series 21 * assigned to it when stacking implement this interface. 22 * 23 * @langversion 3.0 24 * @playerversion Flash 9 25 * @playerversion AIR 1.1 26 * @productversion Flex 3 27 */ 28public interface IStackable 29{ 30 //-------------------------------------------------------------------------- 31 // 32 // Properties 33 // 34 //-------------------------------------------------------------------------- 35 36 //---------------------------------- 37 // stacker 38 //---------------------------------- 39 40 /** 41 * The StackedSeries associated with this series. 42 * The stacker manages the series's stacking behavior. 43 * 44 * @langversion 3.0 45 * @playerversion Flash 9 46 * @playerversion AIR 1.1 47 * @productversion Flex 3 48 */ 49 function get stacker():StackedSeries; 50 51 /** 52 * @private 53 */ 54 function set stacker(value:StackedSeries):void; 55 56 //---------------------------------- 57 // stackTotals 58 //---------------------------------- 59 60 /** 61 * The stack totals for the series. 62 * 63 * @param value The totals to set. 64 * 65 * @langversion 3.0 66 * @playerversion Flash 9 67 * @playerversion AIR 1.1 68 * @productversion Flex 3 69 */ 70 function set stackTotals(value:Dictionary):void; 71 72 //-------------------------------------------------------------------------- 73 // 74 // Methods 75 // 76 //-------------------------------------------------------------------------- 77 78 /** 79 * Stacks the series. Normally, a series implements the <code>updateData()</code> method 80 * to load its data out of the data provider. But a stacking series performs special 81 * operations because its values are not necessarily stored in its data provider. 82 * Its values are whatever is stored in its data provider, summed with the values 83 * that are loaded by the object it stacks on top of. 84 * <p>A custom stacking series should implement the <code>stack()</code> method by loading its 85 * data out of its data provider, adding it to the base values stored in the dictionary 86 * to get the real values it should render with, and replacing the values in the dictionary 87 * with its new, summed values.</p> 88 * 89 * @param stackedXValueDictionary Contains the base values that the series should stack 90 * on top of. The keys in the dictionary are the y values, and the values are the x values. 91 * 92 * @param previousElement The previous element in the stack. If, for example, the element 93 * is of the same type, you can use access to this property to avoid duplicate effort when 94 * rendering. 95 * 96 * @return The maximum value in the newly stacked series. 97 * 98 * @langversion 3.0 99 * @playerversion Flash 9 100 * @playerversion AIR 1.1 101 * @productversion Flex 3 102 */ 103 function stack(stackedXValueDictionary:Dictionary, 104 previousElement:IStackable):Number; 105} 106 107} 108