sending objects java to create a flex chart

Anyone know the best practice to transfer data from a database to generate a flex chart?

I have a Java class axis with these variables:

String ID;
Date of departure;
End date;
int min;
int max;
int incr;
String title;
Signal chain;
String type;
List of data;

And the list is an array of points defined in a class called DataPoint:

public Date point1;
public long point2;

I pass an array of Axis objects to the Flex application and try converting it to actionscript object:

package factory.data {}
[Bindable]
[RemoteClass(alias="factory.data.Axis")]
public class AxisObject {}

public var ID:String;
public var: Start Date;
public var: End Date;
public var min:int;
public var max: int;
public var incr:int;
public var title: String;
public var signal: String;
public var type: String;
public var: data table;
}

and I for example accesses the title, but is unable to get the array of data point in the chart. Moreover, when I debug it gives me the following errors:

ReferenceError: Error #1056: cannot create factory.data.AxisObject endDate property.
ReferenceError: Error #1056: cannot create dataList to the factory.data.AxisObject property.

Thanks for any help you can offer.

It seems that your Java class properties have expanded by default. Please make sure that the getters and setters for the properties are public and follow Java beans, naming conventions. Can you also try to create a DataPoint class in the Flex application and map it to the respective Java class. One more thing, it is that can you change the type of variable 'data' in the Flex application to collection ArrayCollection.

I hope this helps.

Tags: Flex

Similar Questions

  • Creating a line chart series multi with different data providers

    I have 3 providers of data of the same structure that is ArrayCollection of data collection and that you want to use to create a line chart multiseriate. I don't have just 1 dataProvider that can be used but 3 different data providers of the same structure I want to use each different series.

    [Bindable] private var orangeSales: ArrayCollection = collection

    new ArrayCollection collection)

    [{sale: 101000, month: new Date (January 1, 2008 "")},]

    {sale: 960000, month: new Date (February 1, 2008 ')},

    {sale: 475000, month: new Date (March 1, 2008 ')},

    {sale: 425000, month: new Date (April 1, 2008 "")}

    ] );

    [Bindable] private var appleSales: ArrayCollection = collection

    new ArrayCollection collection)

    [{Sales: 991000, month: new Date (January 1, 2008 "")},]

    {sale: 140000, month: new Date (February 1, 2008 ')},

    {sale: 565000, month: new Date (March 1, 2008 ')},

    {sale: 255000, month: new Date (April 1, 2008 "")}

    ] );

    [Bindable] private var bananaSales: ArrayCollection = collection

    new ArrayCollection collection)

    [{sale: 891000, month: new Date (January 1, 2008 "")},]

    {sale: 147560, month: new Date (February 1, 2008 ')},

    {sale: 295000, month: new Date (March 1, 2008 ')},

    {sale: 574000, month: new Date (April 1, 2008 "")}

    ] );

    I want to create a line chart with orangeSales, appleSales and bananaSales as three different lines on the graph for different specified dates.

    < mx:ColumnChart showDataTips = "true" >

    < mx:horizontalAxis >

    < mx:CategoryAxis

    dataProvider = "{orangeSales}".

    categoryField = 'months '.

    / >

    < / mx:horizontalAxis >

    < mx:series >

    < mx:LineSeries displayName = "OrangeSales" yField = "sale" xField = "month" dataProvider = "{orangeSales}" / >

    < mx:LineSeries displayName = "AppleSales" yField = "sale" xField = "month" dataProvider = "{appleSales}" / >

    < mx:LineSeries displayName = "BananaSales" yField = "sale" xField = "month" dataProvider = "{bananaSales}" / >

    < / mx:series >

    < / mx:ColumnChart >

    Help, please!

    Sorry for the confusion. In fact I do something wrong, such as using ColumnChart to display a line chart or something like that.

    Now, I realized that a multi series line graph can be built by the presence of a different data provider for each of the LineSeries object.

    If the code below would create a multi series line graph:

    [Bindable] private var orangeSales: ArrayCollection = collection

    new ArrayCollection collection)

    [{sale: 101000, month: new Date (January 1, 2008 "")},]

    {sale: 960000, month: new Date (February 1, 2008 ')},

    {sale: 475000, month: new Date (March 1, 2008 ')},

    {sale: 425000, month: new Date (April 1, 2008 "")}

    ] );

    [Bindable] private var appleSales: ArrayCollection = collection

    new ArrayCollection collection)

    [{Sales: 991000, month: new Date (January 1, 2008 "")},]

    {sale: 140000, month: new Date (February 1, 2008 ')},

    {sale: 565000, month: new Date (March 1, 2008 ')},

    {sale: 255000, month: new Date (April 1, 2008 "")}

    ] );

    [Bindable] private var bananaSales: ArrayCollection = collection

    new ArrayCollection collection)

    [{sale: 891000, month: new Date (January 1, 2008 "")},]

    {sale: 147560, month: new Date (February 1, 2008 ')},

    {sale: 295000, month: new Date (March 1, 2008 ')},

    {sale: 574000, month: new Date (April 1, 2008 "")}

    ] );

    I want to create a line chart with orangeSales, appleSales and bananaSales as three different lines on the graph for different specified dates.

    <>

    dataProvider = "{orangeSales}".

    categoryField = 'months '.

    />

  • Cannot create the Flex/WTP project

    I use Eclipse 3.3 on Windows XP Pro.

    1. I choose new-> Flex project from the file menu
    2. in the new project dialog box, I choose Java/J2EE as server type and choose to use LiveCycle Data Services. I enter the location of the war LCD 2.5 file in the appropriate text entry.
    3. in the next panel, I use the default location and choose "Flex 2.0.1 Hotfix 2" as the Flex SDK kit
    4. in the next panel, where you can specify 'Path of the Source' and 'Library path' among other things, I accept all the defaults and click on "Finish".

    While the new project is being initialized, particularly when it installs the new dynamic Web side, the process fails and an error dialog box appears containing only the following text "org/eclipse/wst/common/project/facet/ui/internal/AddRemoveFacetsDataModel.

    When I close this dialog box, I went back to the last step of the process 'New Flex project', which makes it virtually impossible for me to create a new project, because the error occurs every time. I am able to create generic Flex projects and screens LCD basic Flex project without problems... This only affects the integrated Flex/WTP option.

    Any ideas?

    Contents of the logfile is below... do not seem too useful:

    Hi Doug,.

    Flex Builder beta does not support WTP 2.0. We try to fix it in our next release.

    Gelu-

  • Creating a pie chart of the cell Type dropdown

    I do a log of time to monitor the time I spend on the task. My goal is to have an easy way to show the categories of time that I spend on a daily basis.

    I created a simple table that calculates the hours I spent on a task. In the last column, I have cells of type menu pop - up allowing me to choose a category to assign to this line.

    How can I create a Table of categories and then a related pie chart that will allow me to see the time in each category?

    I saw this thread: Re: creating a pie chart from of pop-up Menu in figures but it doesn't seem to work for me.

    Here's what I have so far:

    FYI, the formula I use to mean hours in column D is: IF (GOLD (ISBLANK (B2), ISBLANK (C2)), DURATION (0), C2−B2)

    Any help would be appreciated. THANKS IN ADVANCE!

    The formula in your summary might look like this:

    = SUMIF (Time Log::E, A2, Time Log::D)

    To produce the table, I've selected all the cells in the summary table and chose 2D pie.

    SG

  • How to create an interactive chart in ScriptUI?

    It is a ScriptUI Panel, I want to know how to create the interactive chart?

    When I click on the point in the chart, it will be selected.

    imge.png

    For the CEP panels, better start reading here:

    CEP 6 Extension HTML Cookbook for 2015 CC · Adobe-CEP/CEP-resources Wiki · GitHub

  • I have a request for a phone number in my HTML code in my database which is automatically filled with the correct sales phone number when sending emails. I create HTML code in dreamweaver and then put the code in my e-mail program. I need to do the ph

    I have a request for a phone number in my HTML code in my database which is automatically filled with the correct sales phone number when sending emails. I create HTML code in dreamweaver and then put the code in my e-mail program. I need to make the phone number in the clickable query. I know the code to do it well not in a query. What is the code?

    As far as I saw, most of the smartphones will automatically recognize it these days, as long as the number is written in a format of regular phone number. This format also allows to make images or text other than a telephone number in a tap to call the link.

    Looking at what you have presented I guess it would be something along the lines of...

    urmcell>>">urmcell >

    When the location of the link and the link text would be the same variable.

    I've never worked with Intelliclick so above is a wild guess. They would be those who need to ask themselves if there is a way to fill in the address of a link like that.

  • Should I return the JSON object or object java SOA?

    Hi gurus,

    A question that I hope makes sense - can SOA return a JSON object JAVA object, not XML?

    Thank you

    Anatoliy


    First "SOA" is not a thing, so it's difficult to give a Yes or no

    This is a technical product feature if it will be possible to expose data in xml/json/etc. formats

    When we look at the Oracle portfolio, we have a preview for example Oracle SOA Suite and Oracle Service Bus (other Oracle products can do the same thing).

    With these two products, you will be able to represent your data in other formats in addition to XML.

    some links to help you get started.

    https://blogs.Oracle.com/jeffdavies/entry/using_json_with_oracle_service

    http://Biemond.blogspot.nl/2010/05/HTTP-binding-in-SOA-Suite-11g-PS2.html

    http://javaoraclesoa.blogspot.nl/2012/12/receiving-JSON-requests-in-Oracle-BPEL.html

    Oracle Service Bus can also store Java objects in jms queues, so, like, that you can carry your data too.

    http://www.xenta.nl/Blog/2011/09/01/Oracle-service-bus-processing-Java-object-messages-with-JMS-transport/

    Hope it will be a little helpful

  • What objects should be created before impdp?

    Hello

    Platform: RHEL 5.8 64-bit

    ENV: Source Server - Oracle 10.2.0.5 on ASM

    Server - Target Oracle 10.2.0.5 on ASM

    Specific patterns must be exported from the Source database and imported into the target database - expdp/impdp (datapump) will be used for export and import.

    My questions are:

    1. Objects must be created (roles, synonyms, storage spaces, etc.) initial before importing schemas?
    2. Is it possible to export these objects (roles, synonyms, storage spaces, etc.) during schema export (expdp) and have Datapump automatically create the database target when importing?
    3. I might have to repeat the steps expdp/impdp multiple times. I have to let the users/schemas and/or other objects in the database target for later impdp?

    Best regards

    Post edited by: user130038

    Hello

    tablespaces/roles can extract only when it is full = y, they are not valid for a snippet of schema. Full = there does not mean it will extract all had by default but as soon as you say will include = x export will have access to export anything, but because you said only include tablespace is all you have - see the example below:

    This will not work:

    [oracle@server]:EIANCAPP:[~]# expdp / schemas = system include = tablespace]

    Export: Release 11.2.0.2.0 - Production on Fri Jul 12 15:23:51 2013

    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

    Connected to: Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
    With the partitioning option
    ORA-39001: invalid argument value
    ORA-39041: filter "INCLUDE" either identifies all types of objects or any type of object.

    This done and extracts only the ddl tablespace:

    [oracle@server]:EIANCAPP:[~]# expdp / include = complete tablespace = y]

    Export: Release 11.2.0.2.0 - Production on Fri Jul 12 15:24:10 2013

    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

    Connected to: Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
    With the partitioning option
    Departure "OPS$ ORACLE." ' SYS_EXPORT_FULL_01 ': / * include = complete tablespace = y '.
    Current estimation using BLOCKS method...
    Treatment of DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA object type
    Total estimation using BLOCKS method: 0 KB
    Object DATABASE_EXPORT/TABLESPACE of treatment type
    Main table "OPS$ ORACLE." "' SYS_EXPORT_FULL_01 ' properly load/unloaded
    ******************************************************************************
    Empty the files together for OPS$ ORACLE. SYS_EXPORT_FULL_01 is:
    /Oracle/export/EIANCAPP/expdat.dmp
    Job ' OPS$ ORACLE. " "" SYS_EXPORT_FULL_01 "conducted at 15:24:17

    [oracle@server]:EIANCAPP:[~]#

    See you soon,.

    Harry

    http://dbaharrison.blogspot.com

  • Flex charts: They improve?

    Hello!

    I'm doing a few cards minimalist for some ultimate PDF of annual reports and business plans. I have them in Illustrator first, but graphical tool Illustrator has not been updated since 1996, and it was a real pain to update my paintings as the numbers changed. With Flex, I can just generate XML-based graphics that I got out of my business models in OpenOffice. In addition, they look really good and are interactive.

    It seems everyone I talk to say that the Flex Charts suck. That they were made by people who do not have to follow the standards. Personally, I like the Flex Charts, although I'm not a big fan of having a lot of 'Waiting to support improved CSS', 'should be CSS"etc. comments in my code:

    https://gist.github.com/1623621

    https://gist.github.com/1623625

    https://gist.github.com/1623628

    Does anyone know if this will change? Are there new Flex charting libraries in gestation?

    -Dwayne

    P.S. If you can, please forward this message to as many Flex developers that you can.

    Flex is now an Apache (http://incubator.apache.org/flex/) project and the future of graphics components is determined by the Community open source. However, I think Adobe can contribute to unpublished work he has done to a version of Spark of the graphical components.

    Gordon Smith, Adobe

  • Flex chart: loading XML

    Hello

    Is there a better way to load data from a local XML file than that?

    https://gist.github.com/70738199a30c2fa210db

    Thank you!

    -Dwayne

    Hello

    You can use URLLoader to load the external XML, here is the link for it

    http://www.flexdeveloper.EU/forums/Flex-charting/dynamic-chart-from-XML/

    Pls see also this link

    http://livedocs.Adobe.com/Flex/3/HTML/Help.HTML?content=charts_intro_8.html

    Thank you and best regards,

    ---------------------------------------------------------------------- ----------------------------

    Kanchan Ladwani | [email protected] | www.infocepts.com

    ---------------------------------------------------------------------- ----------------------------

  • Flex Charting (link) error

    Thanks in advance for the answers. I tried a 2 Flex Charting tut and I get a connection error. Here's the error and the code below.


    Analyze the error in ' \n\n\t[Bindable]\n\tprivate var stats: collection ArrayCollection; \n\t\n\tprivate function dataRequestHandler(event:ResultEvent):void {\n\tstats = event.result.data.row;\n\t}\n\t\n\tprivate function dataRequestFaultHandler(event:FaultEvent):void {\n\tAlert.show (event.fault.message); \n\tclick} \n\t\n\t\n\t\n\t'.} ChartingTutorial/src/ChartingTutorial.mxml line 12 1213301783191 474

    The closure of the CDATA and script tags are after the last import statement. They should be after the last brace on the method of dataRequestFaultHandler() (before the MXML tags start).

    Is - this tutorial on adobe.com somewhere? If so, then I should be able to fix it.

    HTH,
    Matt Horn
    Flex docs

  • Flex Charting 2 with Flex Builder 3

    I recently inherited a codebase that was built on Flex 2 and uses the Flex 2 graphics component. Flex Builder 3 is the only version of the currently available constructor, so what I use, but with "Flex 2.0.1 Hotfix 3" set compiler option.

    My problem is that the 'Flex Charting Trial' watermark will still appear on my paintings. I tried to set my Builder serial number 3 in the license.properties file as described in some documents, but it doesn't seem to make a difference.

    My license of Flex Builder 3 Professional gives the right to me to use the graphics component?

    If so, the serial number of my Builder 3 should work for Flex Charting 2?

    If not, where can I acquire the necessary serial number?

    Thank you
    David Mills

    This problem has been resolved with the help of Ryan to Adobe technical support. For any other person who suffers from this problem, the resolution is that you need a valid serial number Flex 2 w/graphics to be placed in the file '\sdks\2.0.1\frameworks\license.properties ' on the line ' graphics ='.»»

    To answer my own previous questions:

    Yes, Flex Builder 3 is supposed to give right to me to use the Flex Charting (which is integrated with Flex 3, but was an addon in Flex 2).

    No, the Flex Builder 3 series does NOT work with Flex Charting 2. You need a serial number w/Flex 2 charts.

    To anyone in this position, I would recommend opening case support tech via the web support portal and politely explaining your situation. It took a few days, but when I finally got someone who could help, the resolution was quick.

    Kind regards
    Dave

  • Object of power create when they start

    I get this error when I refer to a component in another tab. If I click on the other tab first object is created and no problem, but if not, then I get error. How can I force the object should be created at startup?

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    container parent int put / set creationPolicy = "All" attribute

  • How to send a Java from Javascript object to an Applet do not get converted to MessagePassingJSObject

    I use two java applets in my web page (let's call them XMLPlugin and Designer).

    I create Java objects by calling method of the applet XMLPlugin 'createObject (< params >):

    var myObj = XMLPlugin.createObject (< params >);

    CreateObject method returns object of type < my_type >.

    I want to send myObj to another Designer applet:

    DSigner.addObject (myObj);

    I get the following exception in Java: eception exception: java.lang.ClassCastException: sun.plugin2.main.client.MessagePassingJSObject cannot be cast to < my_type >.
    Problem is I get an object of type MessagePassingJSObject instead of < my_type > returned by createObject() method.

    Strange, is that Firebug shows type correct < my_type > for myObj variable before entering the DSigner.addObject (myObj) method.

    I am also getting correct objects using other browsers (Internet explorer, Chrome).

    Thanks, any help would be really appreciated.

    Try announcement Web development / standards evangelism MozillaZine forum. The helpers there are better informed on the problems of development of web page with Firefox.

    http://forums.mozillazine.org/viewforum.php?f=25

    You will need to register and log in to post in this forum.

  • Flex Charting 2 of series

    Hi all

    I desperately need help. I am trying the chart data in Flex 2. I want several plotted series, each with its own dataProvider. I can not change the data that I use (it originates from a web service).

    The Actionscript code that I wrote to process the result of the web service in order to plot the data is:

    function loggerdataRPCResult(event:ResultEvent)
    {
    var result = event.result;

    var series: Array = new Array();

    for each (var LoggerData in the result)
    {

    var ls:LineSeries = new LineSeries();
    ls.yField = "Date";
    ls.xField = "Flow";
    ls.displayName = LoggerData.LoggerId;
    ls. Form = 'segment;
    ls.dataProvider = LoggerData.FlowDataArray;

    Series.push (LS);

    }

    loggerchart. Series = series;

    }


    Xml is the result returned by the web service:

    <? XML version = "1.0" encoding = "utf-8"? >
    "" "" "< ArrayOfLoggerData xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance ' container = ' http://www.w3.org/2001/XMLSchema " xmlns =" http://tempuri.org/ "> "
    < LoggerData >
    < FlowDataArray >
    < FlowData >
    < date > 2006 - 12-01 T 12: 00:00 < / Date >
    < rate > 15 < / flow >
    < / FlowData >
    < FlowData >
    < date > 2006 - 12-01 T 13: 00:00 < / Date >
    < rate > 19 < / flow >
    < / FlowData >
    < / FlowDataArray >
    < LoggerId > 1 < / LoggerId >
    < / LoggerData >
    < LoggerData >
    < FlowDataArray >
    < FlowData >
    < date > 2006 - 12-01 T 12: 00:00 < / Date >
    < rate > 2 < / flow >
    < / FlowData >
    < FlowData >
    < date > 2006 - 12-01 T 13: 00:00 < / Date >
    < output > 12 < / flow >
    < / FlowData >
    < / FlowDataArray >
    < LoggerId > 2 < / LoggerId >
    < / LoggerData >
    < / ArrayOfLoggerData >


    The script works to a certain extent - it creates two series in the chart and the legends of the series are visible, but no data is plotted in the chart area.

    Any help would be very welcome.

    Thank you very much

    OK, so I got a quick mess on with what you provided and I came up with a number of things that can be the problem. First of all, you've been through your series and the axes x and y on. I mean, you got the Date on your axis horizontal, but assigned to yField of your series.

    Secondly, I have not used the front axle desabscisses but it seems that the table should be assigned a dataProvider in order to make it work on categories. However, what I don't understand is why you use a desabscisses axis to represent the time. A DateTimeAxis is probably what you want? You just need to give a DateTimeAxis a parseFunction who takes the date strings in your data and their analysis in a Date object.

    Thirdly, you also need the dataProvider to be LoggerData.FlowDataArray.FlowData. This is because LoggerData.FlowDataArray.FlowData gives you an array of objects with properties 'Fluidity' and 'Data', where as donors of LoggerData.FlowDataArray you an object without these properties (and therefore cannot be mapped to the axes).

    So, in summary:
    1 ls.yField = "Flow"; and ls.xField = 'Date '.
    2. use a DateTimeAxis
    3 LoggerData.FlowDataArray.FlowData as dp instead of LoggerData.FlowDataArray

    Hope that this brings you to a solution.

    Graham

Maybe you are looking for