Simple Flex Chart question - Plot Chart labels

I'm playing around with displaying data from WDA as charts in Flex 3.
I'm able to bind my internal table, which has 3 fields, to the plot chart.
The table looks like this
ext_id      type string    " bound to prjname in Flex
cost         type string    " bound to prjcost in Flex
benefit     type string    " bound to prjbenefit in Flex
These are all bound to my island's DataSource.
I have bound these in Flex and the Cost and Benefits are showing up as points on my chart. However, I can't seem to get the Project Name to display on the plot points. All I see when I mouse over the point is EXT_ID, and the values for cost and benefits.
The cost/benefit values are coming across correctly, just not the project name (ext_id) value. any ideas?
here's the Flex code for the chart
     [Bindable]
     public var dataSource:ArrayCollection;
     [Bindable]
     public var prjcost:String;
     [Bindable]
     public var prjbenefit:String;
     [Bindable]
     public var prjname:String;.
    <mx:PlotChart id="plotchart1" dataProvider="{dataSource}" showDataTips="true">
       <mx:series>
            <mx:PlotSeries displayName="{prjname}" yField="{prjcost}" xField="{prjbenefit}" dataProvider="/>
        </mx:series>
    </mx:PlotChart>

This is really a Flex question not an Islands specific one.  I don't think the displayName properity is what you want to use here.  This is the name for the entire series as it will be displayed in the legend. I think what you want is a dataTip.  You register a callback for the dataTip rendering and then fill the custom dataTip quick info.
This is an example from a bar chart, but the theory is the same:
<mx:BarChart id="barChart" dataTipFunction="dtFunc" xmlns:mx="http://www.adobe.com/2006/mxml" type="clustered" width="100%" showDataTips="true" height="100%">
     <mx:verticalAxis>
          <mx:CategoryAxis categoryField="{SalesOrd}" dataProvider="{dataSource}" />
     </mx:verticalAxis>
     <mx:series>
          <mx:BarSeries id="bsGross" xField="{grossAmt}" displayName="Gross Amount" dataProvider="{dataSource}" fill="{otdFill}" showDataEffect="{slideIn}"  />
          <mx:BarSeries id="bsNet" xField="{netAmt}" displayName="Net Amount" dataProvider="{dataSource}" fill="{rtyFill}" showDataEffect="{zoomIn}"  />          
     </mx:series>
</mx:BarChart>
private function dtFunc(hd:HitData):String {
              switch(BarSeries(hd.element).id){
                   case "bsGross":
                         return "Sales Order #: " +  hd.item.SO_ID + "\n" + FlashIsland.formatNumber(hd.item.TTL_GROSS_AMOUNT) + " " + hd.item.CURRENCY_CODE;                        
                         break;
                   case "bsNet":
                         return "Sales Order #: " +  hd.item.SO_ID + "\n " + FlashIsland.formatNumber(hd.item.TTL_NET_AMOUNT) + " " + hd.item.CURRENCY_CODE;
                         break;                   
              return "Amount";

Similar Messages

  • Flex 3 : Contour Plot Chart

    Hi,
    I have been tasked with a project where a contour plot chart is required like the one below. Does anyone know how this coould be done in Flex or are there any third-party components available to do this?
    Thanks very much for you help.
    Martin

    Hi Subeesh,
    Thanks for the info but it's not a radar chart. What I am looking for is more like --> http://www.singleton-labs.com/mcharts.php
    Martin

  • Charting / custom plot chart advice?

    Hi, I'm trying to build a customized chart in Flex that might
    be a bit over my current skill level so I was hoping I could get a
    tip how to approach this. Essentially it will be a plot chart with
    an associated data table. The plot chart will have only one series
    of data but each point on the chart shall indicate a range. Instead
    of having two dots on the chart (2 series) that indicate the lower
    and higher bound, I want to have, in essence, two dots that are
    joined by a wide long bar. If that's too hard I might go for just a
    thick bar going from lower bound to upper bound. I believe this
    should be done with just one data series indicating the upper and
    lower value because both values really belong together. The user
    would click anywhere on that bar to select it. So there is only one
    item to interact with per point and therefore there is also only
    tooltip for both. The bars are not evenly spaced out but based on
    date information, so I'd use a Data-Time axis horizontally and a
    regular linear axis vertically.
    I believe the right way to build this is a custom renderer
    for the actual datapoint and that's where I was looking for a
    tip/advice. Is that hard to do? Is there some classes that I can
    tweak into doing that for me without writing custom components or
    such?
    The other thing I want to achieve (after I solved this one)
    is to have a data grid associated with the chart. When one data
    item is clicked in the chart, the corresponding row in the table
    gets highlighted, and vice versa, if the user clicks a row in the
    table, the corresponding chart item is highlighted. I think that's
    doable too, it's just a bit tricky with how the events are flying
    around I think. But, as I said, first I need to figure out the
    chart.
    If anybody has some advice how I should approach that I sure
    would appreciate it. I experimented around with Bubble charts over
    a category axis for a while but I think it really should be done
    with a plot chart over a time axis and maybe a custom renderer for
    the data point.
    Thanks a bunch!
    Andreas

    Hi AndreasD,
             Can you please  let me know if  you were able to get solution to the below querry. My curent requirement is very close to what you have specified in the querry
    Regards
    Kalavati Singh
    [email protected]

  • Make Flex Plot Chart items toggle

    Hello,
    I made an application for generating a plot chart based on previously calculated data (X,Y). After plotting the data on the chart, I tried to make the items (dots) to show a label (through addChild an external custom label component) when a user click on the dots (for example: if a user click on a chart item, the corresponding ID number will show beside the dot).
    Although everything works fine, I can't make the items toggled (for example: if a dot is already clicked and label ID is visible, on next click on the same dot I want to hide (removeChild) the label component which correspond to that item)...
    I tried almost everything, but with no success... A simple example  will be of great help for me...
    Thanks in advance,
    Nikola

    Anyone??

  • Dynamic Charting question - On maximum rows and omiy label interval values

    Hi,
    I was wondering if it was possible to define a application variable and then reference it from within a Chart series definition.
    I frequenctly need to go in and exapnd the maximum number of rows for my chart series definitions to a value greater than
    15. And, if I have a Chart with multiple series it seems to make sense that they all have the same value. This made me think
    of trying to use some sort of variable. I tried using a hidden page item. However, Apex seemed to want a static numerical value
    and so I needed to just hard code the value for now. Has anyone had success with somethin else?
    Another issue I have is with the label display. When ploting time series data that allows the user to define a date range its hard
    to know up front how to set the Omit Label Interval. An ida solution would be to define a number of desired points that the chart
    can handle and dynamically assign omit interval based on some sort of formula. Again, the static value assignment makes sense for some
    date inputs and not so much for others.
    Thanks for any suggestions!

    Thanks for your reply.
    Not sure how to change the Chart Type to Custom XML
    For example, for one of my charts under Chart Settings the Chart Type is set as 2D Line.
    I don't see Custom XML as an option on that drop down.
    I do see some XML code under Region Definition | Source. Is that what you are referring to?
    Thanks!

  • Crosshair mouse tracker on Plot Chart

    Hi All,
    I have implemented a flex plot chart, which works fine (able to plot items to it).  I want to add a cross hair tracking device that will move along with the mouse.  The cross hair will draw a simple horizontal and vertical line crossing at the mouse pointer to the edges of the chart.  I already have registered for the mouse move event (I have a status line that prints the real world values based on x/y position as the mouse moves).  The crosshair implementation I have tried implementing causes the mouse tracking to act very strange...almost, in a lagging type behaviour.  I am using a Graphics object from the plot chart object.  I do a clear each time before I redraw the crosshair (as the mouse moves).  The 'clear' seems to be the core of the lag problem (if I comment out the 'clear', the tracking works fine..but of course the crosshair from the previous mouse position doesnt erase).  I didnt see an 'xor' type of function which is what I have used on like projects before. Any ideas or suggestions would be greatly appreciated.
    my plot char is  called tlat_chart.
    var G:Graphics = tlat_chart.graphics;
    G.clear();
    G.moveTo(somex, somey);
    G.lineTo(newx, somey);
    etc......

    Take a look at Eli's custom chart annotations here: http://demo.quietlyscheming.com/ChartSampler/app.html

  • How to provide different plor series for plot chart

    How to provide different plot series for a Plot Chart.
    The IDs of the series are given in a ComboBox control

    Series are stored in an array. If there is only one series, then you can change it simply by "pushing" a series into a new array, and then assigning that series array to the chart. If you are replacing one series in the chart series array, then you have to figure out which to remove and put the new one in.
    This LiveDocs link may help:
    http://livedocs.adobe.com/flex/3/html/help.html?content=charts_intro_7.html
    If this post answers your question or helps, please mark it as such.

  • Chart question

    This is probably pretty simple, but I haven't been able to find anything in the documentation on it: I am trying to do a chart that has 2 labels in it. (APEX 3.0). For example, I want to summarize data by (I work for a University) Term, Gender with the value of a distinct headcount.
    I have tried using the syntax: Select null link,
    decode(acsssd_rterm,'10','Fall','20','Spring','30','Summer','Other') label,
    decode(acsssd_gender,'01','Female','Male') label,
    count(distinct acsssd_studssn) value
    from acsssd
    where acsssd_ryear=:P1_RYEAR
    and acsssd_rtype='F'
    group by acsssd_rterm, acsssd_gender
    which works to an extent, but I don't get the counts broken up by gender, just a heading "Gender" with one bar. (this is an SVG chart...perhaps I am trying the wrong type?)
    TIA for any suggestions, corrections, or pointers to documentation.

    Debra,
    You can only have one label per value per series. So in your case, you should probably have two series, one for each gender.
    It should be easy with a Flash chart in 3.0:
    Select null link,
    decode(acsssd_rterm,'10','Fall','20','Spring','30','Summer','Other') label,
    sum(decode(acsssd_gender,'01',1,0)) "Female",
    sum(decode(acsssd_gender,'01',0,1)) "Male"
    from acsssd
    where acsssd_ryear=:P1_RYEAR
    and acsssd_rtype='F'
    group by acsssd_rterm
    For an SVG chart, just enter one query for each gender as separate series.
    Marco

  • Plot chart problem

    Hi experts,
        In plotchart using cirlcular item renderer am getting full details.But instead of that one using customItemRenderer am unable to get full details.This is my customItemRender(CirlceFileRenderer ) action script class file
    package
        import flash.display.Graphics;
        import mx.charts.series.items.PlotSeriesItem;
        import mx.core.IDataRenderer;
        import mx.skins.ProgrammaticSkin;
        public class CirlceFileRenderer extends ProgrammaticSkin implements IDataRenderer
            public function CirlceFileRenderer()
            private var _chartItem:PlotSeriesItem;
            public function get data():Object
                return _chartItem;
            public function set data(value:Object):void
                _chartItem = value as PlotSeriesItem;
                invalidateProperties();
            override protected function updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void
                super.updateDisplayList(unscaledWidth, unscaledHeight);
                var g:Graphics = graphics;
                g.clear();
                var col:Number = 0;
                var x:Number = 0;
                var y:Number=0;
                //if(_chartItem!=null)
                var obj:Object = _chartItem.item as Object;
                //col = getColor(obj.Color as Number);
                x= obj.Xdata as Number;
                y=obj.Ydata as Number;
                g.beginFill(col);
                trace("X :"+x+" Y :"+y);
                trace("_chartItem.x:"+_chartItem.x+" _chartItem.y :"+_chartItem.y);
                g.drawCircle(_chartItem.x,_chartItem.y,1);
                //g.drawCircle(x,y,1);
                //g.drawRect(_chartItem.x,_chartItem.y,unscaledWidth,unscaledHeight);
                // g.drawRect(x,y,1,2);
                g.endFill();
            public function getColor(x:Number):Number   
                if(x < 0.0)
                    return 0x000000;
                else if (x < 0.125)
                    return 0x000088;
                else if (x < 0.375)
                    return 0x0000FF;
                else if (x < 0.625)
                    return 0x00FFFF;
                else if (x < 0.875)
                    return 0xFFFF00;
                else if (x <= 1.0)
                    return 0x880000;   
                else
                    return 0xFFFFFF;   
    Flex action script code is like this:
    private function handleResult(event:ResultEvent):void
                    temparray = event.result as Array;
                    for(var i:int =0;i<256;i++)
                        var ta:Array = new Array();
                        var ar:Array = new Array();
                        ar = temparray[i];
                        for(var j:int = 0;j<288;j++)
                        //    trace("a["+i+"]["+j+"] -:"+ar[j]+" Color:"+(Math.abs(ar[j])-131) / 20);
                            ta.push({Xdata:i,Ydata:j,Color:(Math.abs(ar[j])-131) / 20  });
                        var ps:PlotSeries = new PlotSeries();
                        ps.xField = "Xdata";
                        ps.yField = "Ydata";
                        //ps.radius = 1;
                        ps.setStyle("itemRenderer",new ClassFactory(CirlceFileRenderer));
                        ps.dataProvider = ta;
                        newarr.addItem(ps);
                    chart.series = newarr.toArray();       
    Am unable to find the problem.I didn't get full details in plot chart.
    Please tell me this is urgent requirement....

    Hi,
    what info you didn't get?
    try this
    public function set data(value:Object):void
                _chartItem = value as PlotSeriesItem;
              super.data = value;
                invalidateProperties();

  • Tricky Stacked Bar Chart Question

    This question is written as clearly as I could think to write it. It's a bit bewildering, but I'd really appreciate if you could take the time to think about how I can do this!
    I have data like so:
    Column 1: X-axis labels (People's names),
    Column 2: Units Type 1,
    Column 3: $Amount Type 1,
    Column 4: Units Type 2,
    Column 5: $Amount Type 2
    3 Rows each start with a person's name (the X-axis label), followed by their data corresponding to the above columns.
    I want to make a total of 6 stacked bars:
    Units Type 1 and $Amount Type 1, for each of the three people. Then,
    Stacked on top, Type 2 Units on Type 1 Units and Type 2 $Amount on Type 1 $Amount (for their respective people).
    Units are between 0 and 100 and $Amounts are between $0 and $1,000,000.
    Is it possible to set 2 y-axis scales on the same chart?
    How can I set which columns are stacked on what?
    If it's impossible, just say so. That will help too!
    Thanks again,
    Mike

    Here is a suggestion.
    It requires three superposed charts.
    Chart 2 and Chart 3 have a transparent background.
    Only Chart 2 display X axis values.
    Only chart 1 display Y axis values
    The Y axis values for Units are inserted by hand in a text block.
    Yvan KOENIG (from FRANCE vendredi 5 décembre 2008 10:53:07)

  • External XML data for plot chart

    Hi,
    Can you provide the XML equivalent & the corresponding changes to be done in the below plot chart code :
    <?xml version="1.0"?>
    <!-- charts/BasicPlot.mxml -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script><![CDATA[
         import mx.collections.ArrayCollection;
         [Bindable]
         public var expenses:ArrayCollection = new ArrayCollection([
            {Month:"January", Profit:2000, Expenses:1500, Amount:450},
            {Month:"February", Profit:1000, Expenses:200, Amount:600},
            {Month:"March", Profit:1500, Expenses:500, Amount:300},
            {Month:"April", Profit:500, Expenses:300, Amount:500},
            {Month:"May", Profit:1000, Expenses:450, Amount:250},
            {Month:"June", Profit:2000, Expenses:500, Amount:700}
      ]]></mx:Script>
      <mx:Panel title="Plot Chart">
         <mx:PlotChart id="myChart" dataProvider="{expenses}"
         showDataTips="true">
            <mx:series>
               <mx:PlotSeries
                    xField="Expenses"
                    yField="Profit"
                    displayName="Plot 1"
               />
               <mx:PlotSeries
                    xField="Amount"
                    yField="Expenses"
                    displayName="Plot 2"
               />
               <mx:PlotSeries
                    xField="Profit"
                    yField="Amount"
                    displayName="Plot 3"
               />
            </mx:series>
         </mx:PlotChart>
         <mx:Legend dataProvider="{myChart}"/>
      </mx:Panel>
    </mx:Application>

    This does what you want.
    If this post answers your question or helps, please mark it as such.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      creationComplete="init();">
      <mx:Script>
        <![CDATA[
          import mx.collections.XMLListCollection;
          [Bindable] public var expenses:XMLListCollection;
          private function init():void{
            expenses = new XMLListCollection(XMLList(xml..dataItem));
          private var xml:XML =
            <data>
              <dataItem>
                <Month>January</Month>
                <Profit>2000</Profit>
                <Expenses>1500</Expenses>
                <Amount>450</Amount>
              </dataItem>
              <dataItem>
                <Month>February</Month>
                <Profit>1000</Profit>
                <Expenses>200</Expenses>
                <Amount>600</Amount>
              </dataItem>
              <dataItem>
                <Month>March</Month>
                <Profit>1500</Profit>
                <Expenses>500</Expenses>
                <Amount>300</Amount>
              </dataItem>
              <dataItem>
                <Month>April</Month>
                <Profit>500</Profit>
                <Expenses>300</Expenses>
                <Amount>500</Amount>
              </dataItem>
              <dataItem>
                <Month>May</Month>
                <Profit>1000</Profit>
                <Expenses>450</Expenses>
                <Amount>250</Amount>
              </dataItem>
              <dataItem>
                <Month>June</Month>
                <Profit>2000</Profit>
                <Expenses>500</Expenses>
                <Amount>700</Amount>
              </dataItem>
            </data>;
      ]]></mx:Script>
      <mx:Panel title="Plot Chart">
         <mx:PlotChart id="myChart" dataProvider="{expenses}"
         showDataTips="true">
            <mx:series>
               <mx:PlotSeries
                    xField="Expenses"
                    yField="Profit"
                    displayName="Plot 1"
               />
               <mx:PlotSeries
                    xField="Amount"
                    yField="Expenses"
                    displayName="Plot 2"
               />
               <mx:PlotSeries
                    xField="Profit"
                    yField="Amount"
                    displayName="Plot 3"
               />
            </mx:series>
         </mx:PlotChart>
         <mx:Legend dataProvider="{myChart}"/>
      </mx:Panel>
    </mx:Application>

  • Line chart to plot count of 2 date fields against calendar month

    Post Author: springle
    CA Forum: Charts and Graphs
    I would like to create a line chart with 2 lines.  I would like the x axis to be a calendar month.  I would like the y axis to be the count of a date field for that month.  I would like 2 lines, one the the count of applications recieved in a month and the other to be the number of shipments in a month.  I can make a chart to plot one or the other but not both on one chart.So in summary I want of a count of date1 and a count of date2 by calendar month in one line chart.Thanks in advance,Scott

    Post Author: springle
    CA Forum: Charts and Graphs
    Thanks for the reply but I am afraid this does not solve my problem.  Your proposal make the month count of Date1 records in the fields and the count of Date2 in the month of date1 I am try to graph...In the month of Jan: 56 apps and 49 deliveriesIn the month of Feb: 76 apps and 79 deliveriesIn the month of Feb: 86 apps and 69 deliveriesThe change on date cannot be either app date or del date.  It needs to be independent from a calendar timeline. Scott 

  • Pie chart question

    HI,
    I am trying to create a Pie chart report for the first time. How does one go about creating such report? I have looked everywhere, but have found no documentation on Pie charts.
    Also, will the following query work in pie chart:
    select null,
    resolution_type label,
    count(resolution_type) value
    from ht_issues
    where category = 'Help Desk Issue'
    group by null, resolution_type
    order by resolution_type
    Thanks,
    Wally

    Hi Vitaly,
    Yes, my problem is the query reurns a zero in the valur coumn and therefore displays in the chart as 0%
    Thanks,
    Wally

  • Dynamic Series creation for Plot Chart

    Hi,
    I am using a plot chart which takes data from an external XML file.
    Based on certain fields in the data, I create 3 different plot series.
    I use a Combo box to show different plot series based on the selected value from it.
    I am placing another Combo box
    How can do the below task:
    I need to create some dynamic series based on some node elements in the series for which the chart is currently shown.
    I create another Combo box to show the above generated plot series based on the selected value from it.

    Hi,
    I am using a plot chart which takes data from an external XML file.
    Based on certain fields in the data, I create 3 different plot series.
    I use a Combo box to show different plot series based on the selected value from it.
    I am placing another Combo box
    How can do the below task:
    I need to create some dynamic series based on some node elements in the series for which the chart is currently shown.
    I create another Combo box to show the above generated plot series based on the selected value from it.

  • Plot chart- embbeding a custom swf file

    I'm currently using the plot chart element to display dynamic from a MySQL database. I decided I wanted to use a custom embedded swf file. The issue I'm running into is the way the swf file looks. Is there a way keep the original size (width/height) and not have to look deformed? Adjusting the radius only makes the swf "fatter".
    Here is the code that I'm using:
       <mx:series>
        <mx:PlotSeries
         id="plot"
         xField="xfieldname"
         yField="yfieldname"
         radius ="45"
         itemRenderer="@Embed(source='file:/C:/images/movie.swf')" 
         showDataEffect="slideUp"
         />
       </mx:series>
      </mx:PlotChart>

    Hi,
    there are two very distinct things: one is to emit an actual swf, and the other one is to tell an existing swf to show something....
    Now assume your user can choose a few symbols from the library and drag them around .... and imagine an xml file that liss the symbol name and its coordinates on stage as well as its scaling factor.
    Next assume the user can click somewhere to type text ... and imagine the xml file to contain text entries with actual text, font size, and coordinates
    I did something with AS2 following this scheme: a server script copied the existing swf and added an actionscript block equivalent to the above-mentioned xml file. I have not studied details of AS3 files enough to tell whether the same is possible with AS3, but I sort of believe that an xml string embedded as a byte string could be amended / replaced in a similar way

Maybe you are looking for

  • Database connection dialog no longer available

    I want to add a connection to the connections in SQL Developer. However I cannot as I cannot access the database connection dialog. I tried in different ways : - plus sign above the connections - editing an existing connection - menu option : editing

  • How do I retrieve lost Notes?

    All my notes have disappeared from my Iphone (4S), iPad 2 and Macbook Pro. How do I get them back? I've tried going into Time Machine but no luck so far.

  • Problem in dynamic file configuration

    Hi All, I am working on a scenario for which different files must be generated for each recorset. The file name should be generated dynamically based on the input fields. I am able to generate different files but with same file name for all the files

  • VERY IMPORTANT QUESTION: Backup/Storage problems

    Please help!!! Ok. I'll try to explain this but it's kind of confusing so I'll do my best. OK, so a few weeks ago, (maybe 2 or 3 weeks I don't remember) I had about 30 GB free on my MacBook Air's Macintosh HD storage drive. I have a Windows partition

  • How to have customised order in a SQL query

    say there is a column name ename having values shailesh,Shailesh,ruchi,Ramesh,carl,Celin i need a order of carl,Celine,ruchi,Ramesh,shailesh,Shailesh how to do that