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

Tags: Flex

Similar Questions

  • 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

  • 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

  • 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.

  • Flex charting on PlotChart

    I am beginner with graphics in Flex, so bear with me.

    I have 4 points I want to plot a graph, connected by lines (essentially drawing a rectangle).  I want an x / y axis that displays-32 to 32 with graduations every 4 units in both sense (so -32,-32 through 32,32)

    It may not even be adapted for a PlotChart, but he seemed to make the most sense for me.

    My questions are:

    1. how to define a range of min/max for the axes of the chart?  Now it assigns automatically based on the plotted points, but I want it is constant.

    2. How can I get lines connecting my 4 points?

    The code, is so far:

    < mx:Script > <! [CDATA]

    Import mx.collections.ArrayCollection;

    [Bindable]

    public var savi:ArrayCollection = new ArrayCollection([)

    {Section: 'Model 1', X:22, Y:14},

    {Section: 'Style 2', X:22, Y:-23},.

    {Section: Y: "Style 3", X:-21: 23}.

    {Section: '4' Style, X:-21, Y:14}

    ]);

    []] > < / mx:Script >

    < mx:Panel title = "graph" >

    < mx:PlotChart id = "myChart" dataProvider = "{savi}" showDataTips = "true" >

    < mx:series >

    < mx:PlotSeries

    xField = 'X '.

    yField = 'Y '.

    / >

    < / mx:series >

    < / mx:PlotChart >

    < mx:Legend dataProvider = "{myChart}" / >

    < / mx:Panel >

    Hey Ross,

    I have writeen thereon.

    '2. you must use LineSeries instead of PlotSeries to get the lines between points. You can also use LineChart instad of PlotChart if you use automatic color set for the series, but if you set the color manually is not metter. To fix the renderring lines see sortOnXField property for LineSeries. »

    If you do not set this property to false, it will sort your data by X on the ground.

  • Line chart of several series with staggered data points

    Hello

    App of Hillary graphic sample includes an examples of charts and how to handle null values.

    https://Apex.Oracle.com/pls/Apex/f?p=36648:55

    I came across a scenario which goes a step further. If you have a series with a set of data points and another series that overlap, where a few data points are missing, for example:

    create table graph_lines (series number, thedate date, thevalue number);
    insert into graph_lines
    select 1 series
      ,add_months(trunc(sysdate,'yy'),rownum-1) thedate
      ,log(2,rownum) thevalue
    from dual
    connect by level <= 12
    union all
    select 2
      ,add_months(trunc(sysdate,'yy'),rownum-1)
      ,case when mod(rownum,3) =0 or rownum =2 then log(3,rownum) end
    from dual
    connect by level <= 12;
    

    I get the case where he's going to draw a line between the points that are next to each other, but the gaps it will display just the point

    graph.png

    Https://apex.oracle.com/pls/apex/f?p=73000:35 image

    I have no doubt a single this is the expected behavior, but I would like to know if anyone has any ideas on how to connect the dots.

    I thought about a snazzy model clause generates middle in my data points might work, but this seems heavy handed and a little scary.

    I thought that maybe there is a graphic solution?

    APEX 4.2.x

    Scott

    The idea of 'Null' removal was not all that possible. After testing it out, I found apex will be always generated empty points. Explicitly define the XML to have only the data points with values does nothing either.

    Because I thought it was a really interesting problem, I was wasting so much time on this :-). I was side on the reference guide and the user, modify the XML again and again and again.

    I hoped that, by defining a second category axis and set regional and datetime parameters, change of the shaft in one type datetime and specifying a main grid with every month, the table would be plot my data on this axis. Unfortunately, it seems as if this is ignored - a very frustrating experience. Anychart would just keep trace points with its own calculated intervals.

    Ultimately if I stumpled on a sort of difficulty, although I'm not sure how good it would be. There is a setting that you can set by using the custom XML part that ignores the missing data and the values of interpolation. It works well, but it always displays labels.

    https://Apex.Oracle.com/pls/Apex/f?p=11031:4 apex_demo/demo

    AnyChart | [AnyChart 6.x] How to connect mind lines...

    node - reference XML - AnyChart.Com Flash Chart Component

    With all these nodes, is it easy to miss what you need... It's a bit weird, but who "ignore the missing" points, you must set the value to "false"? :-)

  • Flex chart

    Hello

    I want to display the chart data in real-time and want to fix the number of x axis and y axis before the arrival of the data.  How to fix the number of x axis and the y axis. The examples in flex reference should not be given in real time.

    Thank you

    There are 'minimum' and 'maximum' properties on the objects of the axis.

    Set them to everything that you need, and it should do the trick!

  • Flex on Linux: problems series

    Hello
    I changed from Windows to Linux lately and tried to work with Eclipse and Adobe Flex Plugin.
    First of all, it is good to have the opportunity to work with Flex on a Linux system, and so I think it's a good idea, because there are many developers skilled working on Linux, which can be missed otherwise.
    Now after installing the product, everything goes well and I managed to compile AS3 for SWF files. After using a few days I noticed the news in the lower left corner that says my Flex series would be usable for some 100 days, so I tried to register Flex with my Windows serial.
    Unfortunately this has only reduced the amount of time left to 100 in about 3 days. Those days are gone now and I would like to continue to develop in Eclipse.
    Is there a way I can bring Flex give me back those 100 days? I think that this is not intended to scare users who bought (!) a copy of this software from Adobe.
    Please help me,
    Thank you
    Vogelscheuche

    You took towards the end of the trial. We have updated on Labs today, will have a year to use it.

  • Doubt in Flex chart

    Is it possible to trace the flex with the repetation of the same entries)?

    For example, trace values (10.6), (10.6), (10.6).

    Exactly. They don't make sense to the plot.

  • Flex Charting SDK

    I installed with the Flexbuilder 3.2 SDK.

    I tried to upgrade my SDK 3.3, so I downloaded from http://opensource.Adobe.com/wiki/display/FlexSDK/download+Flex+3 , extracted in my directory, changed the properties of the project in FlexBuilder and it has worked well for most.

    The problem seems to be that graphics components are not included in the SDK above - so none of my custom widgets do not work and the project cannot be compiled.

    I don't know how to work around this problem - I guess that there must be a separate SDK for the widgets, but I wasn't able to find it on the Adobe Web site.

    Any help much appreciated.

    For downloads of Flex 3.x, datavisualization.swc is not part of the SDK. It must be downloaded from http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3sdk . However, this link shows flex 4 currently due to a problem. For now try including datavisualization.swc of<3.2 sdk="" location/frameworks/libs/datavisualization.swc="" in="" your="" library="">

    -Rahma

  • Flex charting and SDK 3.3

    I've recently updated to the 3.3 SDK, and many of my widgets does more (error 1046).  For example, it can not find CartesianChart, AxisRenderer, etc..  How can I fix?

    You must install the appropriate libraries so dataVisualization

    http://www.webappsolution.com/wordpress/2009/04/22/installing-Flex-33-SDK-data-visualizati on-33-CFC.

    If you think this message responds to your question or assistance, please mark respectively

  • Flex charts

    Hello

    is it possible to draw a line on a canvas using

    graphics.lineStyle(1,0x3dff40);

    graphics.moveTo (0,0);

    graphics.lineTo (325,0);

    then draw another one the same way.

    At this stage I want to delete the first line, is this possible or should I clear the graphics layer and then redraw the second line?

    See you soon

    Tim

    I have to erase and redraw.  If you know a few graphics to go

    Here, you put them in display objects above or below the other

    graphics and remove them, but having too many display objects can be a lot

    slower that re - run the graph code after a clear().

  • Match color of series for a table and a chart?

    I created a table with 4 sets of data.  Then, I created a graphic line with this information.  I noticed that when I select the line graph the data in the table becomes highlighted with a lighter version of colors used in the chart.  Each series Gets a corresponding really nice color to match the graph.  As soon as you select any where else these colors disappear.

    Is there a way to automatically match line chart series color color of the card?  If this isn't the case, I see this as the colors that appear in the table so that I can put in manually?

    Select the series by clicking on the graph, then any "point":

Maybe you are looking for