To inkiev For that you change the array collection value see in the below example
you change the value of the arrcoll and according to that you change the bar height <?xml version="1.0"?> <!-- charts/CustomLabelFunction.mxml --> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script><![CDATA[ import mx.controls.Alert; import mx.charts.*; import mx.collections.ArrayCollection; [Bindable] public var expenses:ArrayCollection = new ArrayCollection([ {Month: "Jan", Income: 800, Expenses: 1500}, {Month: "Feb", Income: 1000, Expenses: 200}, {Month: "Mar", Income: 1500, Expenses: 500} ]); // This method customizes the values of the axis labels. // This signature (with 4 arguments) is for a CategoryAxis. public function defineLabel(cat:Object, pcat:Object,ax:CategoryAxis,labelItem:Object):String { // Show contents of the labelItem: for (var s:String in labelItem) { // Alert.show(s + ":" + labelItem[s]); } // Alert.show(cat +","+ pcat);//Mar,Feb Month:Mar Income:1500 Expenses:500 Feb,Jan Month:Feb etc. // Return the customized categoryField value: return cat + " '07"; // Note that if you did not specify a categoryField, // cat would refer to the entire object and not the // value of a single field. You could then access // fields by using cat.field_name. } // For a NumericAxis, you do not use the labelItem argument. // This example uses a NumberFormatter to add a thousands // separator. public function defineVerticalLabel(cat:Object, pcat:Object,ax:LinearAxis):String { return numForm.format(cat) + "%"; } ]]></mx:Script> <mx:NumberFormatter id="numForm" useThousandsSeparator="true"/> <mx:Panel title="Custom Label Function"> <mx:ColumnChart id="column" dataProvider="{expenses}" showDataTips="true"> <mx:horizontalAxis> <mx:CategoryAxis categoryField="Month" title="Expenses" labelFunction="defineLabel" /> </mx:horizontalAxis> <mx:verticalAxis> <mx:LinearAxis title="Income" minimum="0" maximum="2500" labelFunction="defineVerticalLabel" /> </mx:verticalAxis> <mx:series> <mx:ColumnSeries yField="Income" displayName="Income" /> <mx:ColumnSeries yField="Expenses" displayName="Expenses" /> </mx:series> </mx:ColumnChart> <mx:Legend > <mx:LegendItem label="Amount"> <mx:fill> <mx:SolidColor color="0x0c0c0c"/> </mx:fill> <mx:stroke> <mx:Stroke caps="square" color="0xfcfcfc"/> </mx:stroke> </mx:LegendItem> </mx:Legend> </mx:Panel> </mx:Application> Amit On Tue, Apr 28, 2009 at 11:04 PM, InKiev <[email protected]> wrote: > > Hi to all guys, I'm looking for a way to specify a minimum height to > each bar in a stack columnchart. > > I want to avoid that some labels may not display values that are above > or that the bar is not long enough. > > I'm using labels to show the value of the bar section. > > Thanks and regards. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

