Flex Charting Question

Does anyone know how include a labeled 'phase change line'
within a Flex chart? These types of charts are normally used to
track behavior over time (the phase change denotes changes in
medication, etc.). Any advice would be greatly appreciated.

Yes it is possible
You need to use the cartesian chart and a secondSeries and
secondHorizontalAxis or secondVerticalaxis

Similar Messages

  • 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";

  • Save flex chart to server

    Hello All
    I am in need of your help in saving a flex chart on to the server. Basically I want to export the chart to excel, as I dont find any resource for Flash builder 4, SDK 3.5, I opted the option of 1. saving chart as image to server and 2. accessing that image file in my excel
    Any sample codes should be very helpful, as this is quite urgent. Thanks!

    The problem was, that it is not possible to see the pdf directly from transaction AL11.
    I used the transaction CG3Y to move the file from the server to my desktop, and there I can see the pdf file.
    Solved
    Thanks for the input.

  • Flex chart x-axis data spacing

    hello
    i am using flex chart line series and column series. i want
    to display 100 data points, with different dates along the x-axis,
    but i don't want all 100 points to be displayed at the same time as
    the x-axis dates will not be readable. i want to have a fixed space
    between each x-axis point and the user then scrolls along the
    chart.
    i read the API but do not see any way to add the x-axis
    spacing?
    also how i do put more data information, with each data point
    if a mouse if placed over it, not just the X & Y data points.
    thank you for any assistance.
    Tony

    thanks so much,
    The tip data solved my 2nd problem.
    Thanks for your suggestions to"
    i am using flex chart line series and column series. i want
    to display 100 data points, with different dates along the x-axis,
    but i don't want all 100 points to be displayed at the same time as
    the x-axis dates will not be readable. i want to have a fixed space
    between each x-axis point and the user then scrolls along the
    chart.
    i read the API but do not see any way to add the x-axis
    spacing?
    you mentioned about using min/max values on the x-axis. That
    is a good solution except i would then need to add buttons to say
    ,show the next 30 days.
    I really want to to show 90days of data data, with say 30
    days appearing at once, and the user just scrolls to see the rest
    of the days data without having to press buttons for more data. Any
    idea how i can do this?
    thanks
    Anthony

  • Flex chart how to put distance between x-axis data

    hello
    i am using flex chart line series and column series. i want
    to display 100 data points, with different dates along the x-axis,
    but i don't want all 100 points to be displayed at the same time as
    the x-axis dates will not be readable. i want to have a fixed space
    between each x-axis point and the user then scrolls along the
    chart.
    i read the API but do not see any way to add the x-axis
    spacing?
    thank you for any assistance.
    Tony

    I don't know what you mean then.
    If you set the min and max to be a certain number of days
    apart then you know the dates within those days will be displayed.
    That combined with the width of the chart will define how much
    space there is between x-axis points.

  • Flex chart x-axis spacing between data

    hello
    i am using flex chart line series and column series. i want
    to display 100 data points, with different dates along the x-axis,
    but i don't want all 100 points to be displayed at the same time as
    the x-axis dates will not be readable. i want to have a fixed space
    between each x-axis point and the user then scrolls along the
    chart.
    i read the API but do not see any way to add the x-axis
    spacing?
    also how i do put more data information, with each data point
    if a mouse if placed over it, not just the X & Y data points.
    thank you for any assistance.
    Tony

    thanks so much,
    The tip data solved my 2nd problem.
    Thanks for your suggestions to"
    i am using flex chart line series and column series. i want
    to display 100 data points, with different dates along the x-axis,
    but i don't want all 100 points to be displayed at the same time as
    the x-axis dates will not be readable. i want to have a fixed space
    between each x-axis point and the user then scrolls along the
    chart.
    i read the API but do not see any way to add the x-axis
    spacing?
    you mentioned about using min/max values on the x-axis. That
    is a good solution except i would then need to add buttons to say
    ,show the next 30 days.
    I really want to to show 90days of data data, with say 30
    days appearing at once, and the user just scrolls to see the rest
    of the days data without having to press buttons for more data. Any
    idea how i can do this?
    thanks
    Anthony

  • Flex 3 to Flex 4 migration issue (Flex charting and Special char)

    Hi All,
    I have migrated Flex 3 to Flex 4 and in Flex charting axis label, I am not able to see less then sign ( < ). I tried to use &lt;  but it's not working, I have attached sample code.
    <?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" initialize="init()">
         <fx:Declarations>
             <s:SolidColor id="s1" color="#738994"/>
             <mx:SeriesInterpolate id="seriesInterpolate" duration="800"/>
             <mx:SeriesSlide id="seriesSlide" duration="800" direction="up"/>
             <mx:SeriesZoom id="seriesZoom"
                            duration="1000"
                            minimumElementDuration="50"
                            elementOffset="50"
                            verticalFocus="top"
                            horizontalFocus="left"
                            relativeTo="chart"/>
         </fx:Declarations>
         <fx:Script>
            <![CDATA[
                 import mx.collections.ArrayCollection;
                 [Bindable]
                 public var student:ArrayCollection = new ArrayCollection([
                     {Stream: "Management", Girls:1000, Boys:1400, TotalStudent:2400},
                     {Stream: "&lt;Computer Science", Girls:800, Boys:1200, TotalStudent:2000},
                     {Stream: "< Mechanical", Girls:200, Boys:1500, TotalStudent:1700},
                     {Stream: "> Electical", Girls:800, Boys:850, TotalStudent:1650},
                     {Stream: "Electronics", Girls:500, Boys:1000, TotalStudent:1500},
                     {Stream: "Civil", Girls:300, Boys:900, TotalStudent:1200}
                 private function update():void {
                     var str:String = catfDP.selectedItem.data;
                     if(str == "Girls"){
                         cs1.yField = str;
                         cs1.displayName = str;
                         cs1.setStyle("fill" , "738994");
                     }else if(str == "Boys"){
                         cs1.yField = str;
                         cs1.displayName = str;
                         cs1.setStyle("fill" , "999990");
                     }else{
                         cs1.yField = str;
                         cs1.displayName = str;
                         cs1.setStyle("fill" , "406374");
                 private function init():void{
                     catfDP.selectedIndex= 0;
                     effectDP.selectedIndex= 0;
             ]]>
         </fx:Script>
         <s:Panel title="Chart Effect Example" width="627" height="565">
             <s:layout>
                 <s:VerticalLayout/>
             </s:layout>
             <mx:ApplicationControlBar dock="true" width="625" height="82">
                 <mx:Form>
                     <mx:FormItem label="Category Field:">
                         <s:DropDownList id="catfDP" change="update();" prompt="--Select--" width="136"
                                         height="19">
                             <s:dataProvider>
                                 <mx:ArrayList>
                                     <fx:Object data="Girls" label="Girls" />
                                     <fx:Object data="Boys" label="Boys" />
                                     <fx:Object data="TotalStudent" label="TotalStudent" />
                                 </mx:ArrayList>
                             </s:dataProvider>
                         </s:DropDownList>
                     </mx:FormItem>
                     <mx:FormItem label="Choose Chart Effect:">
                         <s:DropDownList id="effectDP" change="update();" width="136" prompt="--Select--">
                             <s:dataProvider>
                                 <mx:ArrayList>
                                     <fx:Object label="seriesInterpolate" data="{seriesInterpolate}" />
                                     <fx:Object label="seriesSlide" data="{seriesSlide}" />
                                     <fx:Object label="seriesZoom" data="{seriesZoom}" />
                                 </mx:ArrayList>
                             </s:dataProvider>
                         </s:DropDownList>
                     </mx:FormItem>
                 </mx:Form>
             </mx:ApplicationControlBar>
             <mx:ColumnChart id="cchart"
                             dataProvider="{student}"
                             showDataTips="true"
                             width="621"
                             fontFamily="verdana" height="402">
                 <mx:verticalAxis>
                     <mx:LinearAxis title="Number of Students" />
                 </mx:verticalAxis>
                 <mx:horizontalAxis>
                     <mx:CategoryAxis dataProvider="{student}"
                                      categoryField="Stream"
                                      title="Stream"/>
                 </mx:horizontalAxis>
                 <mx:series>
                     <mx:ColumnSeries id="cs1"
                                      xField="Stream"
                                      yField="Girls"
                                      displayName="Girls"
                                      fill="{s1}"
                                      showDataEffect="{effectDP.selectedItem.data}"/>
                 </mx:series>
             </mx:ColumnChart>
             <s:HGroup>
                 <mx:Legend dataProvider="{cchart}"
                            direction="horizontal"/>
                 <s:VGroup>
                 </s:VGroup>
             </s:HGroup>
         </s:Panel>
    </s:Application>

    Thank you very much for you answer.
    I have solved this problem using Itemrenderer.
    <?xml version="1.0" encoding="utf-8"?>
    <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    autoDrawBackground="true">
        <mx:Label htmlText="{data.text}"/>
    </s:ItemRenderer>
    and in chart I have used labelRenderer. in label I have used  &lt; for ( < ) sign.
    <mx:horizontalAxis>
                    <mx:CategoryAxis
                        dataProvider="{expenses}"
                        categoryField="Month"
                        title="FY 2006"
                        id="a1"
                        />
                </mx:horizontalAxis>
                <mx:horizontalAxisRenderers>
                    <mx:AxisRenderer labelRotation="45" axis="{a1}" labelRenderer="chase.BarChartLabelRenderer"/>
                </mx:horizontalAxisRenderers>
                <mx:verticalAxisRenderers>
                    <mx:AxisRenderer labelRotation="45" axis="{a1}" labelRenderer="chase.BarChartLabelRenderer"/>
                </mx:verticalAxisRenderers>

  • Flex language questions should go in the General Discussion Forum

    This forum is intended for Flex Builder questions.
    Of course you can post wherever you like, but if you want
    help, go where the helpers are.
    Tracy

    can you define what goes where then?
    General discussion sounds like thoughts, comments, hopes and
    wishes.
    Builder 2, (meaning Flex Builder 2?), seems to be the only
    area for other Flex 2 questions.
    I don't mean to be wise here, but I personally don't
    understand what a "builder 2" question is if not those that deal
    with flex 2, such as those posted here. I want to post my questions
    where they should be so that I might find help, so maybe the forum
    labelling should be re-considered or better defined.

  • Flex chart restarts on tab focus in firefox

    I have plotted flex chart inside div element. It shows up correctly but when i go to another tab in firefox and comes back then flex chart restarts. Also i have seen it happens inside dojo tabs also.
    Anyone has any idea why chart restarts ? How can this be avoided.
    Thanks,
    Zooz

    The author of Custom New Tab says this will be in the next update of the extension.
    If you don't want to wait for the approval cycle on the Add-ons site, you can grab it from the Versions page:
    https://addons.mozilla.org/firefox/addon/custom-new-tab/versions/
    <s>Note: I have not tested it myself.</s>
    <u>Version 1.9 worked for me. See screenshot regarding how the Options dialog works for the updated extension.</u>

  • Copy and Paste Flex chart to Word Document

    Hi , I'm a newbie to Flex and was wondering if anyone knows
    if it possible to use the right click button on the mouse to copy
    and paste a Flex chart to a Word Document? Any help would be
    greatly appreciated.
    thanks

    Hi,
    Simply let a IE or FireFox window display your Flex chart,
    and hold [Alt] and press [PrtSc] in your keyboard, Then, paste it
    into Word or Paint to be edited.
    Have fun!
    Jeffrey

  • Convert/Export Flex chart to MS Word

    Hi All,
    Please let me know how to Convert/Export the Flex Chart to MS Word...
    Please send the related links or samples if  you have.
    Thanks in advance.
    Regards,
    Seshadri Babu.G

    Well, "used to..." is not a good business case.
    They don't need to receive reports anymore, they can view them in the portal as needed. Viewing in Word is functionaly about the same as viewing in Excel if "receiving" is the preferred method for them.
    Having reports in PDF is better if they want to print.
    Or they can use Crystal reports as a last resort....  I think those might export to word.
    Webi is on-demand, ad-hock reporting, that's what's it for. Export to other formats is a secondary function.

  • Migrate Flex Chart to AS

    Hi,
    I've put together a simple test app that pulls data from blazeds and inserts the results in a PieChart defined in mxml. However when I try to create the same chart in AS the chart doesn't show up. I suspect that it is perhaps related to the sequence of how things are initialized? but I'm not sure
    Here is my code. I've created 3 charts. The first (mxml) chart is the one that works fine. The second (AS) is my attempt to recreate the mxml chart in AS and it does not work. The third is a sanity check of another test AS chart just to see if I can actually make an AS PieChart and it also works fine.
    If anyone has any insight it would be much appreciated.
    Thank you,
    Kaveh
    <?xml version="1.0" encoding="utf-8"?>
    <!-- intro\intro_remoting.mxml -->
    <mx:Application     xmlns:mx="http://www.adobe.com/2006/mxml"
                        xmlns:data="com.kg.data.*"
                        width="100%"
                        height="100%"
                        initialize="getPokerParameterNumbers()"
                        backgroundColor="#FFFFFF">
        <mx:Script>
            <![CDATA[          
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                import mx.collections.ArrayCollection;
                import mx.charts.PieChart;
                import mx.charts.series.PieSeries;
                import mx.charts.Legend;           
                [Bindable]
                public var paramCount:ArrayCollection;
                [Bindable]
                 public var expenses:ArrayCollection = new ArrayCollection([
                    {Expense:"Taxes", Amount:2000},
                    {Expense:"Rent", Amount:1000},
                    {Expense:"Bills", Amount:100},
                    {Expense:"Car", Amount:450},
                    {Expense:"Gas", Amount:100},
                    {Expense:"Food", Amount:200}
                // Get the initial data set from the poker db
                private function getPokerParameterNumbers():void {
                    //remoteObject.getParameterTypesAndCount();
                    remoteObject.getParameterCount();
                    addSecondChart();
                    add3rdChart();
                // Handle the recevied message.
                private function resultHandler(event:ResultEvent):void {
                    statusTextArea.text += "Server responded [] : \n";
                    var myObject:Object = event.result;
                    paramCount.removeAll();
                    for (var key:* in myObject)
                      var value:* = myObject[key];
                      statusTextArea.text += "Parameter: " + key + " Count: " + value + "\n";
                      var paramItem:Object = new Object();
                      paramItem.parameterization = key;
                      paramItem.count = value;
                      paramCount.addItem(paramItem);
                    paramCount.refresh();
                private function newResultHandler(event:ResultEvent):void {
                    var collectionResult:ArrayCollection = ArrayCollection(event.result);
                    statusTextArea.text += "-" + collectionResult.length + "-";
                    paramCount = ArrayCollection(event.result);
                // Handle a message fault.
                private function faultHandler(event:FaultEvent):void {
                    statusTextArea.text += "Received fault: " + event.fault + "\n";
                public function addSecondChart():void {
                    //var medalsAC:ArrayCollection;
                    var chart:PieChart;
                    var series:PieSeries;
                    //medalsAC = getDataProvider();
                    /* Define pie series. */
                    series = new PieSeries();
                    //series.nameField = "label";
                    //series.field = "data";
                    series.nameField = "name";
                    series.field = "count";
                    /* Remove default dropshadow filter. */
                    series.filters = [];
                    /* Define pie chart. */
                    chart = new PieChart();
                    chart.percentWidth = 100;
                    chart.percentHeight = 100;
                    chart.showDataTips = true;
                    //chart.dataProvider = medalsAC;
                    chart.dataProvider = paramCount;
                    chart.series = [series];
                    /* Add chart to the display list. */
                    topHBox.addChild(chart);
                private function add3rdChart():void {
                    var medalsAC:ArrayCollection;
                    var chart:PieChart;
                    var series:PieSeries;
                    medalsAC = getDataProvider();
                    /* Define pie series. */
                    series = new PieSeries();
                    series.nameField = "label";
                    series.field = "data";
                    /* Remove default dropshadow filter. */
                    series.filters = [];
                    /* Define pie chart. */
                    chart = new PieChart();
                    chart.percentWidth = 100;
                    chart.percentHeight = 100;
                    chart.showDataTips = true;
                    chart.dataProvider = medalsAC;
                    chart.series = [series];
                    /* Add chart to the display list. */
                    p1.addChild(chart);
                 * Create and return a simple ArrayCollection to
                 * use as a data provider.
                private function getDataProvider():ArrayCollection {
                    var arr:Array = [];
                    arr.push({label:"Product 1", data:3});
                    arr.push({label:"Product 2", data:1});
                    arr.push({label:"Product 3", data:4});
                    arr.push({label:"Product 4", data:1});
                    arr.push({label:"Product 5", data:5});
                    arr.push({label:"Product 6", data:9});
                    return new ArrayCollection(arr);
            ]]>
        </mx:Script>
        <mx:RemoteObject id="remoteObject"
            destination="pokerDataSource"
            result="newResultHandler(event);"
            fault="faultHandler(event);"/>
        <mx:HBox width="100%" id="topHBox">
            <mx:VBox>
                <mx:PieChart id="myChart"
                    dataProvider="{paramCount}"
                    showDataTips="true"
                    selectionMode="single"
                    itemRollOverColor="#FF0066">
                    <mx:series>
                        <mx:PieSeries
                            field="count"
                            nameField="name"
                            labelPosition="callout"
                        />
                    </mx:series>
                </mx:PieChart>
                <mx:Legend dataProvider="{myChart}"/>
            </mx:VBox>
            <mx:TextArea     id="statusTextArea"
                            width="100%"        
                            height="100%"               
                            backgroundAlpha="0"
                            focusAlpha="0"
                            selectable="false"/>       
        </mx:HBox>
        <mx:Panel id="p1"/>
    </mx:Application>

    Hi,
    Simply let a IE or FireFox window display your Flex chart,
    and hold [Alt] and press [PrtSc] in your keyboard, Then, paste it
    into Word or Paint to be edited.
    Have fun!
    Jeffrey

  • Export flex chart to excel

    How can I export an flex chart to excel? Does anyone have any sample code.

    Yes, now it's easy with AIR2 (and AS3XLS):
    http://coenraets.org/blog/2009/11/open-in-excel-another-air-2-mini-sample/
    Thanks,
    Oleg.

  • Jsp flex chart

    Hello
    I would like to create a horizontal bar chart according to data from a struts2 action class and place the flex chart in a jsp.
    I have already seen code on how to do a horizontal bar chart @ http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Live Docs_Book_Parts&file=charts_types_109_03.html
    I am watching James Ward's video on java and flex @ http://www.jamesward.com/blog/2008/07/21/video-flex-and-java/
    How do I place the flex graph in my jsp? What kind of flex project/component do I create and where do I place it?
    Appreciate all help.
    Thanks

    Once you compile your Flex app you can size it and embed it anywhere you
    want in your web page.

  • Flex Charting

    I have recently purchased Flex Charting and added the serial
    number to the License Management section in Flex Builder 2 and now
    all of my charts that I have created previously are not displaying
    at all. I am getting an error telling me this
    "Severity Description Resource In Folder Location Creation
    Time Id
    1 Design mode: Error creating item ColumnChart in parent
    Canvas "Mortgage Calculator". Please choose Design > Refresh to
    refresh design mode. ProductDetails.mxml flexstore/productsView
    January 11, 2007 10:59:59 AM 2328"
    However the "refresh" option does nothing to solve the
    problem. Any idea what is wrong?

    What is the result format you're setting on your HTTPService
    request?
    "alice_data" <[email protected]> wrote in
    message
    news:g6novb$gpl$[email protected]..
    > Hi,
    >
    > I am wondering if anyone has tried to extract some
    information from the
    > database and make attempts of plotting it using Flex
    Charting. My code is
    > in
    > the following, and the database output brings back all
    the results I
    > desired,
    > but when I run the script, I was given the following
    error:
    >
    > ReferenceError: Error #1069: Property theta not found on
    > mx.rpc.http.mxml.HTTPService and there is no default
    value.
    This suggests that your HTTPService result is coming back in
    a format where
    you can't just get the properties off of it. You may need to
    set the result
    format to e4x, and since it is rss you may need to use one or
    more
    namespaces.
    HTH;
    Amy

Maybe you are looking for