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.

Tags: Flex

Similar Questions

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

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

  • Missing lines / bars in a chart

    Hello

    just another little problem.

    Suppose I have a histogram and a series of simple values: 3, 5, 7, 2, 9, 2, 1.

    Now, let's assume that my vertical axis have a minimum value of 0 and a maximum of 6: I mean, it displays the values of Y from 0 to 6.

    The problem is that in this way I see two 'holes' in the table, and it is for columns that have the values 7 and 9... the array is not make because their value is above the maximum axis... How can I make it show them anyway? I develop a chart simple scrolling and I see that happening with the column, but with the lines too... I would need to see a line/bar to drown until the end of the table, even if the end point is not in the visible part of the graph.

    Thank you very much,.

    Danilo

    What you are looking for is the property of Series.filterData. By default, it has set to true, that filters the data outside the range of the axis graphic points. Set it to false, and it will make everything.

    You can see a demo and learn more about it here:

    http://blog.ninjacaptain.com/2010/03/Flex-chart-Zoom-window/

  • Flex license

    Hello

    Flex chart is free?

    I use flashdevelop and flex sdk 4 - both are free.

    If iam not bad, if it's not free I wouldn't be able to compile and run the tank code in associated flash develop.  At least I shouldn't get help through intelli code.

    I am able to run flex tutorial graphics code in flashdevelop.  Then, what is not free and what's free?

    Can someone through light on it.

    Thank you

    With the release of Flex 4. the 'data visualization package' is now part of the free SDK.

  • Change of color of the lines in the chart

    Well, it is a stupid question, but how do I change the color of the lines in a chart?



    "spacehog" wrote in message
    News:g81g1a$EQ4$1@forums. Macromedia.com...
    > Ok this is a stupid question, but how do I change the color of the lines in a
    > line
    > chart?

    http://www.rphelan.com/2008/05/23/taking-control-of-Flex-charting-styles/

Maybe you are looking for