Flex 4 - Axis Title Bug

When the verticalAxisTilteAlignment is 'vertical', the title will 'move' down and left off of the chart each time new line series are created.  The problem code is in ChartLabel:
            var p:AxisRenderer = AxisRenderer(parent);
            if (p.getStyle('verticalAxisTitleAlignment') == 'vertical')
                _label.rotation = 180;
                _label.y = _label.y + _label.height;
                _label.x = _label.x + _label.width;
After the first time through, the x and y are added to continuously causing the title to 'move' off the chart.  My (admittedly hackish) work-around is a TitleRenderer that extends ChartLabel with an overridden 'updateDisplayList' like so:
getChildAt(0).x = 0;
getChildAt(0).y = 0;
super.updateDisplayList(unscaledWidth, unscaledHeight);

I'm running into the same problem. Any chance you can show your code showing the TitleRenderer that extends ChartLabel, as well as how it's called? I've never done something like that before in Flex.
UPDATE:
I found a nice tutorial here:
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7c39.html
The workaround, thanks to vsimons (really -- thank you!!!):
package path.to.this.file
          import flash.display.*;
          import flash.geom.Matrix;
          import mx.charts.*;
          import mx.charts.chartClasses.ChartLabel;
          public class MyTitleRenderer extends ChartLabel {
                    public functionMyTitleRenderer() {
  super();
                    override protected function updateDisplayList(w:Number, h:Number):void { 
                              getChildAt(0).x = 0;
                              getChildAt(0).y = 0;
                              super.updateDisplayList(unscaledWidth, unscaledHeight);

Similar Messages

  • Axis titles don't display on cartesian chart

    I use Adobe Flex Builder 3 to create charts for use in a
    larger web application. Since moving from Flex Builder 2 to Flex
    Builder 3, the axis titles are no longer being displayed.
    In my mx:Application, I declare an mx:CartesianChart. I
    dynamically add ColumnSeries to a ColumnSet based on the contents
    of an XML file loaded using a URLRequest. I then add the ColumnSet
    as the only element of the chart.series Array. The rest of the
    chart (including the legend) displays correctly.
    The axes are explicitly defined as part of the
    mx:CartesianChart:
    <mx:CartesianChart left="{legend.width}" top="30"
    right="0" bottom="0" id="chart" dataProvider="{xmlDoc.elements()}"
    showDataTips="true" dataTipFunction="formatDataTips">
    <mx:verticalAxis>
    <mx:LinearAxis id="vAx" autoAdjust="true" title="Dollars"
    labelFunction="formatVerticalLabel"/>
    </mx:verticalAxis>
    <mx:horizontalAxis>
    <mx:CategoryAxis id="hAx" categoryField="Year"
    title="Year"/>
    </mx:horizontalAxis>
    <mx:horizontalAxisRenderers>
    <mx:AxisRenderer axis="{hAx}" labelRotation="-60"/>
    </mx:horizontalAxisRenderers>
    </mx:CartesianChart>
    Thanks in advance for your help.

    I've isolated the issue, but I'm not sure if it's a bug or if
    something I'm doing wrong. The following simplified version of my
    chart application doesn't display the axis titles:
    [code]
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Legend dataProvider="{chart}" left="0" top="25"
    id="legend"/>
    <mx:CartesianChart left="{legend.width}" top="30"
    right="0" bottom="0" id="chart">
    <mx:verticalAxis>
    <mx:LinearAxis title="Dollars"/>
    </mx:verticalAxis>
    <mx:horizontalAxis>
    <mx:CategoryAxis title="Year"/>
    </mx:horizontalAxis>
    </mx:CartesianChart>
    </mx:Application>
    [/code]
    The following version does:
    [code]
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Legend dataProvider="{chart}" left="0" top="25"
    id="legend"/>
    <mx:CartesianChart left="{0}" top="30" right="0"
    bottom="0" id="chart">
    <mx:verticalAxis>
    <mx:LinearAxis title="Dollars"/>
    </mx:verticalAxis>
    <mx:horizontalAxis>
    <mx:CategoryAxis title="Year"/>
    </mx:horizontalAxis>
    </mx:CartesianChart>
    </mx:Application>
    [/code]
    The only difference is the left definition for
    mx:CartesianChart. When it's defined in terms of the width of the
    legend, the axis titles disappear. Is there another way that I
    should be displaying my chart using the full span of the
    application?
    Thanks again for your help.

  • Financial Reporting Studio - Chart 2nd Axis Title

    I have a Financial Reporting Studio (9.3.1) report including a chart (combo) and have "checked" secondary axis and subsequently set a secondary axis title. Upon opening the report the secondary axis title does not show. The font color is black and the font angle is set to 0. Is this a bug or am I missing setting a property or something? If this is a bug is there a feasible workaround? Thanks in advance for any assistance.

    This has turned out to be a rather obscure 'problem or feature'. Primary axis titles can include multiple words, single words or special characters and do not require single quotes around the title. Secondary axis title on the other hand require single quotes around the string whether it is a single word, multiple words or contains special characters. This is not contained in the Financial Reporting Studio documentation.

  • Axis Title does not appear in the transated language after translation

    hi all,
    i have some problem with the translation.
    I have an application in german and in french , it works propertly but the X,Y Axis Title and the region name does not appears translated in the chart although they appears in the xliff files and i translated it.
    can you see please the snapshot of the region in the link below.The X,Y Axis are in german and the tab names and items name are in french.
    I'm sure the X,Y Axis appears in the XLIFF file and i translated them.
    can you please help me?
    thanks,
    kandouda
    snapshot: http://imageshack.us/f/835/33071086.png/
    Edited by: 896470 on 14.11.2011 07:10
    Edited by: 896470 on 14.11.2011 07:22

    bump

  • OBIEE 11g  Pie Chart Settings /Axis titles

    Hi,
    In OBIEE 11g, it is not possible to change the Axis titles in a pie chart.
    Does anyone know how to change it in the xml file?
    Any feedback is highly appreciated.
    //Katherine
    Edited by: 1002173 on 2013-apr-24 03:56

    Never heard of Axis in a pie chart. What exactly are you trying to change?

  • SSRS 2008 - How to chnage the display axis title?

    Hi all,
    I have a bubble chart. Currently the values shown on y axis are 1,2,3 and 4. Since it is mandatory to have a numeric value on y axis so i  want to change the axis title just for display.  I want to change the axis title to some string value
    just for display. How can i do that ?
    Alok Aswal
    Thanks in advance :)

    Hi Alok,
    Based on my research, if we directly add the expression Fields!field_name.Value or other string values in the Custom Number format property, the axis will all display the first value of the field. So we cannot directly achieve the goal. But if there are
    only three values on the Y Axis, we can use
    excel format code as Peter suggested.
    If there are more than three values on the Y Axis, we can use a table control to simulate the Axis labels to work around this issue. For more details, please refer to the steps below:
    Drag a table to design surface, then delete the table header and last two columns.
    Insert the expression which have some string values as below to the cell:
    =Fields!field_name.Value
    Set HideLabels property of Y Axis to True, then adjust the table position so that it aligns to the Y Axis of chart.
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Chart axis titles disappearing with image capture

    I have the following code which generates a png file from a
    UIComponent (a panel with a chart in it). I have two different
    methods which are called to generate the image. One is
    automatically generated every few minutes, the other generates the
    image when a user hits a button to "save" the image. Both generate
    the chart fine, except that the automated version cuts the axis
    titles off for some reason. What is going on?

    "Cr99" <[email protected]> wrote in message
    news:gklm8k$2d7$[email protected]..
    > I've made some progress. If I add this code:
    >
    > chartPanel.addEventListener(FlexEvent.CREATION_COMPLETE,
    imgExport);
    >
    >
    > // method: imgExport (Event)
    >
    >
    > public function imgExport(e:Event):void {
    > var cp:ChartPanel = e.currentTarget as ChartPanel;
    > captureImg(cp, cp.title);
    > }
    >
    > The axis gets drawn, but only on the INITAL rendering of
    the chart
    > (obviously). The
    addEventListener(FlexEvent.UPDATE_COMPLETE, imgExport)
    > does
    > not seem to register properly because the chartPanel
    doesn't ever get
    > updated,
    > just the data in the chart element whithin the panel.
    How do I get the
    > update
    > to register as an event as well?
    Maybe you need to register for the event on the chart, not
    the panel that
    creates it.

  • Chart Axis Title

    When a title is added, Flex selects a title which is oriented
    vertically and pointing downward. How can I set the orientation of
    the title, for examle, to be 180 degrees rotated?

    I don't think you can. But you can use a text box instead of the chart title.

  • Flex 2.5.31 bug: As Regards Wine CVS Users: No Clear Downgra

    Flex 2.5.31 bug: As Regards Wine CVS Users: No Clear Downgrade Path: Please Advise
    Wine CVS (at least dx9-wine tree) fails with flex error (lex.yy.c error, etc):
    Please see: http://www.kerneltraffic.org/wine/wn20030509_169.html#4
    Key bit: 'Flex 2.5.31 bug. Downgrade to 2.5.3a, "make clean" in the tools directory and you are back.'
    Search for flex with pacman yields 2.5.33-1 (current), search in AUR for flex finds nothing relevant.
    Other less savory (and less repeatable) fixes aside, what is the proper "ArchLinux" way to resolve this issue?  To trace upstream a bit further, what is the proper "ArchLinux" way to install a particular Wine fork?

    JGC wrote:Last time I got this bug with wine, I just did a 2nd run of make and it compiled fine
    I had tried that, no dice.
    make[2]: Entering directory `/root/.WineCVS/sources/dx9wine/wine/tools/wrc'
    gcc -c -I. -I. -I../../include -I../../include -DINCLUDEDIR=""/usr/local/include/wine"" -Wall -pipe -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wdeclaration-after-statement -Wpointer-arith -g -O2 -o lex.yy.o lex.yy.c
    lex.yy.c:9174: error: syntax error before numeric constant
    lex.yy.c: In function 'yy_scan_string':
    lex.yy.c:9175: error: number of arguments doesn't match prototype
    lex.yy.c:367: error: prototype declaration
    lex.yy.c:9177: warning: passing argument 1 of 'strlen' makes pointer from integer without a cast
    lex.yy.c:9177: warning: passing argument 1 of 'yy_scan_bytes' makes pointer from integer without a cast
    make[2]: *** [lex.yy.o] Error 1
    Found a reference here -- http://www.winehq.com/hypermail/wine-de … /0612.html -- to similar/same problem, will check a bit more.  I can't sort out if this a bug in flex, problem with the Makefiles, or...something else.

  • Problem replacing  chart axis title  with &string. syntax

    Apex 4.1.1
    Hi,
    I am having a problem replacing a chart axis title with substitution syntax &P5_MYFIELD., where P5_MYFIELD is an item with Source Type PL/SQL Function Body:
    begin
    return web_message.show('LASTNAME', 'dk');
    end;
    The Item is defined on the same Page as the chart in a different region. I can see that function is working ok, because the return value is displayed in P5_MYFIELD.
    There is a second item in an other region on the same page where the source value is defined with substitution syntax &P5_MYFIELD. It also displays the expected value. But when I use the string &P5_MYFIELD. as axis title it is not displayed.
    I also defined a field P0_MYFIELD on Page Zero with the same function, when I reference that with &P0_MYFIELD. as axis title on Page 5 the value is displayed correctly. I tried the same with a field on Page 1, &P1_MYFIELD. and it is displayed correctly.
    I think, the chart axis title must be substituted before the item P5_MYFIELD is executing the PL/SQL function body to get its value. Can anyone tell me why?
    We want to use string substitution syntax to translate all our labels in different languages. I would like to create hidden items with source type PL/SQL function body for all labels on a page and reference these values as label definitions. I would like to place them on the same page as the labels.
    Thanks
    Anne

    I started the application again and now also the Items are not displayed, only the message 'Label not defined', so I probably did something wrong with the computation. Why the correct values were shown during the first run, I do not know, maybe i did not logout in between.
    Here is the debugging information, but I cannot see any error message:
    0.02844 0.00038 Computation point: Before Header 4
    0.02881 0.00032 ...Perform computation of item: P5_CYCLE, type=FUNCTION_BODY 4
    0.02913 0.00060 ...Performing function body computation 4
    0.02973 0.00464 ...Execute Statement: declare function x return varchar2 is begin begin return web_message.show('CYCLE','de'); end; return null; end; begin wwv_flow.g_computation_result_vc := x; end; 4
    0.03437 0.00042 ......Result = Wurf 4
    0.03479 0.00046 ...Session State: Save "P5_CYCLE" - saving same value: "Wurf" 4
    0.03526 0.00027 Processes - point: BEFORE_HEADER 4
    0.03553 0.00027 ...close http header 4
    0.03580
    Edited by: Anne-Marie Rosa on Jun 8, 2012 10:09 AM
    Now the correct value is displayed again in the P5_MYFIELD, because I had to set the item source back to PL/SQL Function body, but I am still getting the chart error and the chart is not displayed.
    Edited by: Anne-Marie Rosa on Jun 8, 2012 10:17 AM

  • Excel Graph Axis Title

    Hi all,
    Is there a way of naming the axes titles of an excel plot created using the Report Generation Toolkit? There does not seem to be such an option in the excel specific functions of the toolkit... Could it be done through activeX?? I tried to follow the suggestions in the link below but no luck...
    http://forums.ni.com/t5/LabVIEW/labview-excel-2007​-Axis-title/m-p/1226794/highlight/true#M521825 
    Thanks a lot for your time..
    Harry
    Solved!
    Go to Solution.

    Hi,
    I have attached a VI incl. many useful active-x commands for plotting graphs to excel. It is a large VI but it includes what you are looking for.. Scroll to the right and locate the 8th active-x box called chartwizard. This is what you are looking for. I have added constants indicating were the name of each axis goes in the wizard box. If you are not familiar with the rest of the active x commands just follow the sequence and you'l' be able to plot an excel graph fully customised through labview.
    Hope it is of help
    Harry
    Attachments:
    Excel_ActiveX_O2.vi ‏51 KB

  • Flex 4 hideEffect transition bug

    Hi.
    I'm trying to create a slide effect. Everything works fine except the first hideEffect animation. The content does not become invisible when crossing the TabNavigator's border, which looks really ugly in my current project. The following simple example demonstrates the problem.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                      backgroundColor="0xDDDDDD">
         <fx:Declarations>
              <s:Move id="hideEffect" xTo="700" />
         </fx:Declarations>
         <mx:TabNavigator width="500" height="300" x="100" y="0">
              <s:NavigatorContent label="ONE" hideEffect="{hideEffect}">
                   <s:BorderContainer backgroundColor="0xFF0000" height="100" width="100"/>
              </s:NavigatorContent>
              <s:NavigatorContent label="TWO" hideEffect="{hideEffect}">
                   <s:BorderContainer backgroundColor="0xFF0000" height="100" width="100"/>
              </s:NavigatorContent>
              <s:NavigatorContent label="THREE" hideEffect="{hideEffect}">
                   <s:BorderContainer backgroundColor="0xFF0000" height="100" width="100"/>
              </s:NavigatorContent>
              <s:NavigatorContent label="FOUR" hideEffect="{hideEffect}">
                   <s:BorderContainer backgroundColor="0xFF0000" height="100" width="100"/>
              </s:NavigatorContent>
         </mx:TabNavigator>
    </s:Application>

    For those who come across this thread, it was answered on the StackOverflow thread: http://stackoverflow.com/questions/5110765/flex-4-hideeffect-transition-bug/5130398#513039 8

  • Chart with vertical Y-axis title having horizontal letters?

    I've edited the XML on the Chart Attributes page but I don't find atrtributes to rotate the y-axis title (<text>TITLE</text>) nor the letters themselves in the title. What I'd like is something very close to
    T
    I
    T
    L
    E
    But what I get is a horizontal title rotated -90 degrees. I've looked at lots of Anychart documentation but don't find anything that seems to fit with the XML already given on the Chart Attributes page. I've seen the "rotate" attribute but I don't know where it would go and even then, I'm sure it only rotates the title as a unit and not the individual letters.
    Howard

    That makes sense. So I thought maybe this following script
    would work, but it doesn't. Any ideas?
    onClipEvent (load)
    xcenter=400;
    speed=1/200;
    onClipEvent (enterFrame)
    var distance=xcenter-_root._xmouse;
    _x+=(distance*speed);
    if (_x > 0) _x=-1550;
    if (_x < -1550) _x=0;
    if (_ymouse < 450) speed=1/200;
    else
    speed=1/80;
    }

  • Problem with Font Embed for vertical axis title

    Dear Friends,
    I have embedded a truetype arial font to rotate the vertical axis title, It works fine in xcelsius design mode(canvas) , but when i click preview button i coudln't see the vertical axis title.
    Should i change any font settings in xcelsius? or Should i have licence to my fonts? Please help me to fix this issue.
    Thanks in advance,
    Manimaran.

    cannot be rendered...that's odd. But becoming unrendered is standard. When you render the text on top of the video it makes one renderd file out of the two layers, If you change one of the layers, then the rendered file is no longer current and it has to make a newly rendered file with the current settings (in this case the altered text.) It's no different than if you were to change a setting on a filter, even one tiny notch, or change the duration of a transition. If you want to limit the amount of the render, cut the bottom clip at the beginning of the text clip and the end and it will only need to re-render the area overlapped by the text.

  • Adding custom axis titles for Bubble Chart

    How to add custom axis titles (for each group of axis values) as shown in the attached figure to a bubble chart ?
    - Sen

    I'm trying to do essentially the same thing with a LineChart and I think I've got part of it figured out.
    I've subclassed CategoryAxis and overridden reduceLabels to return only certain labels (the "group" labels). Then I create a new axis by adding a LineSeries to the chart's <series> element with the new axis within the LineSeries. Then I have an AxisRenderer in the chart's horizontalAxisRenderers tag that refers to the new axis from within the LineSeries.
    Subclassed axis:
        public class MonthCategoryAxis extends CategoryAxis
            public function MonthCategoryAxis()
                super();
            override public function reduceLabels(intervalStart:AxisLabel, intervalEnd:AxisLabel):AxisLabelSet
                var currentLabels:AxisLabelSet = this.getLabels(0); // Param is ignored by super class
                var newLabels:Array = []; // Labels to keep
                var label:AxisLabel;
                var previousLabel:AxisLabel;
                for (var i:int = 0; i < currentLabels.labels.length; i++)
                    label = currentLabels.labels[i];
                    if (i == 0) // Keep the first label
                        newLabels.push(label);
                    else if (label.value.month != previousLabel.value.month)
                        // Only keep a label if the previous label has a different month
                        newLabels.push(label);
                    previousLabel = label;
                // Return a new AxisLabelSet with just the labels we want
                var newLabelSet:AxisLabelSet = new AxisLabelSet();
                newLabelSet.labels = newLabels;
                return newLabelSet;
    New series to create the subclassed axis in.
                <mx:LineSeries>
                    <mx:horizontalAxis>
                        <charts:MonthCategoryAxis id="MonthAxis" labelFunction="calendarMonthAxisLabelFunction"/>
                    </mx:horizontalAxis>
                </mx:LineSeries>
    The AxisRenderer. canDropLabels must be "true".
                <mx:AxisRenderer axis="{MonthAxis}" canDropLabels="true" showLine="false" tickPlacement="none">
                    <mx:labelRenderer>
                        <mx:Component>
                                <mx:Label width="100%">
                                <mx:Script>
                                    <![CDATA[
                                    override public function set data(axisLabel:Object):void
                                        this.text = outerDocument.getMonthLabel(axisLabel.value);
                                    ]]>
                                </mx:Script>
                                </mx:Label>
                        </mx:Component>
                    </mx:labelRenderer>
                </mx:AxisRenderer>

Maybe you are looking for

  • Spooling from PL/SQL Block

    Hi, Is it possible to do spooling from a pl/sql block.The spool cannot be the first command because I want to give the spool file name in a loop and each time the spool name should change based on the value. I tried all possiblities,but I couldn't ca

  • Iphone order put on hold!?

    I got an email that my order was put on hold because they needed a 400 security deposit but why didnt that come out of my bank? Not enough money? and will my phone now take longer to get here since i have to wait till tomorrow morming to call?

  • Alternative to PBR on ASA5510

    We have an ASA5510 with a backup ISP connection protecting our corporate network.  I also have a mail server and I would like to route SMTP traffic over the backup network.  I realize that the ASA5510 does not support PBR, but I also know that I can

  • ORACLE RAC INTERVIEW

    Hi Gurus, I have been asked to take an interview for the post of ORACLE DBA. This job profile is to support RAC databases. I will be questioning DBA's on the following. INSTALL AND CONFIGURE RAC TAF BACKUP AND RECOVERY OF RAC database. But my main qu

  • How do I restore the iMac using Time Machine?, How do I restore the iMac using Time Machine?

    My Outlook 2011 shows no messages which started right after I ran  SyncMate.  I decided to restore  my system using Time Machine, but that did not make Outlook show my emails.  Outlook indicates that I have several messages, but none appear.  Suggest