Dynamically creating multiple LineSeries from XML

Hi,
I'm unable to figure out why my chart does not display. My
task is to read in an XML file, depending on which multiple line
series will be created and displayed on a line chart. (I am using
the Flex-Ajax Bridge)
In my mxml, I have:
[Bindable]
public var _elements:XMLList;
public function createXMLList(data:String):XMLList
var _xml:XML = new XML(data);
_elements = _xml.elements();
return _elements;
<mx:Panel width="450" height="400" id="panel" >
<mx:LineChart id="chart" height="350" width="300"
paddingLeft="5" paddingRight="5"
showDataTips="true" visible="false"
dataProvider="{_elements}">
</mx:LineChart>
</mx:Panel>
In my html file, I use the XMLHttpRequest to get my xml and
do the
following:
function createChart() {
if (req.readystate == 4 && req.status == 200) {
var seriesArray = new Array();
var flexApp = FABridge.example.root();
var chart = flexApp.getPanel().getChildByName("chart");
var s =
FABridge.example.create("mx.charts.series.LineSeries");
flexApp.createXMLList(req.responseText);
s.set("yField", "datapoint");
seriesArray.push(s);
chart.setSeries(seriesArray);
chart.setVisible("true");
My XML file has the following structure:
<?xml version="1.0" encoding="utf-8"?>
<result metricDfn="Price">
<company1 id="1">
<datapoint date="Jan">50</datapoint>
<datapoint date="Feb">60</datapoint>
<datapoint date="Mar">40</datapoint>
<datapoint date="Apr">50</datapoint>
<datapoint date="May">40</datapoint>
</company1>
</result>
Anything obvious that I'm not doing right?

This link is great for describing how to manipulate charts in ActionScript:
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.

Similar Messages

  • Dynamically create Value Objects from XML file

    Hi
    I want to create a value object from Xml file dynamically,like in the xml file i have the name of the variable and the datatype of the variable.is it possible do that,if so how.

    Read about apache's Digester tool. This is part of the Jakartha project. This tool helps in creating java objects from the XML files. I am not sure, if that is what u r looking for.

  • Creating Multiple POs from the shopping cart

    Hi
    I have a requirement to create multiple POs from shopping cart. we are in SRM 7.0 I have implemented the BADI BBP_SC_TRANSFER_BE GROUP_PO method. modified group_1 field with 1 and Doc_type with custom document type
    and udpate the change parameter CT_PROC_ITEM with the above changed data for each line item.
    But purchase order always taking original document type and its number range only. 
    Please help me in this regard,
    Regards,
    Rama.

    Hi,
    Thanks for your reply. I have implemented the BADI BBP_BS_GROUP_BE method GROUP_PO_BACKEND. I modified BE_DOC_TYPE with the custom document type and REFNUMBER as the group number .
    But  it is generating number range for the original document type only.  when i debug the code i found that it is taking original document type (which is hardcoded contant value mentioned in the code when number range is initial).
    Please suggest me  after grouping the line items with document types and REFNUMBER how to assign number ranges for each group of line items.
    Regards,
    Rama.

  • Create multiple PDFs from multiple files

    Hi everyone
    I'm trying to use the "Create multiple PDFs from multiple files" function in Acrobat 9 Pro (version 9.4.6) to create about 100 PDFs from InDesign CS5 files. Theoretically this would do the trick for my purpose. BUT: When running the function, it does not use the CS5 InDesign (version 7.0.3), but tries to open the files with InDesign CS3. Of course this does not work. We, as a professional working agency, have installed CS3, CS4 and CS5. Even with making the InDesign CS3 .app invisible an pushing it into the garbage bin during the process did not work. Acrobat still wants to access InDesign CS3. It is not possible to downgrade the files to CS3 files, for there are special (i.e. interactive) functions which only work in CS5. It would be more work than creating the PDFs manually, anyways.
    Does anyone have similar issues? Any ideas how to solve the problem?
    Thanks in advance.
    Thinka

    OK, cool, I found one, which seems to work just fine.
    http://www.kahrel.plus.com/indesign/batch_convert_cs3.html
    found here:
    http://forums.adobe.com/message/3712434#3712434
    Thanks for the hint!

  • How to create Inbound Idoc from XML file-Need help urgently

    Hi,
    can any one tell how to create inbound Idoc from XML file.
    we have xml file in application server Ex. /usr/INT/SMS/PAYTEXT.xml'  we want to generate inbound idoc from this file.we are successfully able to generate outbound XML file from outbound Idoc by using the XML port. But not able to generate idoc from XML file by using we19 or we16.
    Please let me know the process to trigger inbound Idoc with out using  XI and any other components.
    Thanks in advance
    Dora Reddy

    Hi .. Did either of you get a result on this?
    My question is the same really .. I am testing with WE19 and it seems SAP cannot accept an XML inbound file as standard.
    I see lots of mention of using a Function Module.
    Am I correct in saying therefore that ABAP development is required to create a program to run the FM and process the idoc?
    Or is there something tht can be done with Standard SAP?
    Thanks
    Lee

  • Create Business Partner from XMl String not a file

    Hi,
    Is it possible to create a BP from an XML string. 
    I know about GetBusinessPartnerFromXml(string FileName, int index)
    but I dont want to save the string in a file before creating a BP from it
    Hope there's a method to do that

    Marc,
    This looks like it is a duplicate of this post, so I am closing this thread as it looks like you answered your own question!
    Create Business Partner from XMl String not a file
    Eddy

  • How to automatically create fillable PDFs from XML

    We are looking for a way to create fillable PDFs that users can enter data into and save (so the PDF needs Reader Rights applied) and we want to be able to automatically create these PDFs from XML files. We are able to do what we want in a manual fashion using Acrobat Pro v8 but we need a way to automate this due to the volume of XML files that we will need to convert.
    Is there any way that this can be scripted from a command line interface with Acrobat.. like:
    Acrobat.exe –input FileName.xml –output FileName.pdf –applyReaderRights true
    If there is no command line options for this is there any way that this could be coded using .NET or any other programming language?

    You cannot automate applying usage rights with Acrobat. For that you'd need to use Adobe's LiveCycle Reader Extensions.
    How exactly are you currently converting XML into fillable forms? Are you using an XDP to somehow convert to an XFA-based PDF?

  • Creating multiple records from 1 record in the source file for Import DM

    Hi Experts,
    Today I am working on an interface/import where I want to get the following result:
    Source file contains a records like:
    Account, Entity, DriverX
    Sales,EntityA,ZZ
    The BPC appset contains the 2 dimensions Account and Entity next to CostCenter dimension. The DriverX field in the source file is just additional information in the source file. However based on this DriverX we need to determine what CostCenter to choose but we also need to have the same record assigned to a second record in BPC.
    Following my example, based on DriverX value I need to create 2 records:
    Account, Entity, CostCenter,
    Sales,EntityA,CC1
    Sales,EntityA,CC2
    I don't have a problem assigning the record to 1 CostCenter based on DriverX value but I have a problem creating my second record. Does any of you have had the same "challenge" and if so would you like to share the solution for this?
    Best regards,
    Johan
    PS: I am working on SAP BPC, version 7.0 Microsoft version.

    Hi Greg,
    Many thanks for your answer. And yes this would be a solution. However I just simplified my case as the decision to create an second record and where to post is depending on more than 1 field in the source.
    But I will keep it in mind, because I also can opt for a solution to store data differently in BPC fac-tabels which will help me to use script logic.
    If it is not possible to create multiple records from a single records in the standard functionality in the Transformation and/or Conversion file, I have to create a custom DTSX or change my way of storing data.
    Anyone else who is having an alternative idea like Greg came up with?
    Please let it know!
    Best regards,
    Johan

  • Creating multiple links from one map image in Flash CS4

    I have been tasked with creating multiple links from one map image using flash. Each link would go to the main website page with that location. I assume I could create a button for each location on the map but not having a lot of experience any help / tutorial you know of would be super helpful.. Thanks! Not looking for someone to work me thru it but a little guidance would be great!

    If I was to answer the problem, I would be giving you what you asked not to be given... the solution.  So I'll suggest that you start by researching the getURL() function.  That is what AS2 uses for opening web pages.
    As for coding a button, I'll recommend the following article for you... it will explain the proper approach to coding a button, which will give you an advantage over others who don't follow it, but instead use the way the article says not to.
    http://www.adobe.com/devnet/flash/articles/as_bestpractices_04.html
    Google is one of the best resources available for learning how to do things with Flash--it's the first place I go when I have a wondering.  In general, if you type in the right keywords, you get fairly good search results.  In your case, combinations of "AS2", "button", "getURL", "tutorial" would probably work well.

  • XML parser for fatching multiple values from XML

    Hi,
    In my scenirio i have to facth multiple values from XML file and then set in to Table in webdynpro...
    Fo example my xml has values like...
    <xml>
         <item>
              <item1>
                   <quantity>
                        100
                   </quantity>
                   <price>
                        50
                   </price>
              </item1>
              <item2>
                   <quantity>
                        200
                   </quantity>
                   <price>
                        20
                   </price>
              </item2>
              <item3>
                   <quantity>
                        300
                   </quantity>
                   <price>
                        10
                   </price>
              </item3>
         </item>
    </xml>
    then i have to fcath those quantity and price and set in to table...
    How to do taht in webdynpro and does any one have parser code for retriving multiple values...

    Hi,
    1) You need to use JDOM parser.
    2) The code for parsing XML using JDOM parser is readily available if you search on google.
    3) You will have to check the attribute during every parsing and then if attribute is quantity you can fetch the corresponding tags.
    4) Something similar to this:
    org.jdom.Document document = parser.build(file);
                    org.jdom.Element rootElement = document.getRootElement();
                    org.jdom.Element childElement = rootElement.getChild("file");
                    Element xmlElement = childElement.getChild("item");
                    if (xmlElement != null) {
                        List itemElementsList = xmlElement.getChildren("item1");
                        if (itemElementsList != null) {
                            Iterator iterator3 = itemElementsList.iterator();
                            while (iterator3.hasNext()) {
                                //For each group get quantity
                                Element itemElement = (Element) iterator3.next();
                                List quantityElementsList =
                                        itemElement.getChildren("quantity");
                                if (quantityElementsList != null) {
                                    Iterator iterator2 =
                                            quantityElementsList.iterator();
                                    while (iterator2.hasNext()) {
    // Your code                                                                               
    You might need to make some changes as per your rquirement. Just use this sample to understand how you need to parse the xml
    Hope it helps.
    Regards.
    Rajat
    Edited by: Rajat Jain on Jan 22, 2009 9:51 AM

  • How to improve the speed of creating multiple strings from a char[]?

    Hi,
    I have a char[] and I want to create multiple Strings from the contents of this char[] at various offsets and of various lengths, without having to reallocate memory (my char[] is several tens of megabytes large). And the following function (from java/lang/String.java) would be perfect apart from the fact that it was designed so that only package-private classes may benefit from the speed improvements it offers:
        // Package private constructor which shares value array for speed.
        String(int offset, int count, char value[]) {
         this.value = value;
         this.offset = offset;
         this.count = count;
        }My first thought was to override the String class. But java.lang.String is final, so no good there. Plus it was a really bad idea to start with.
    My second thought was to make a java.lang.FastString which would then be package private, and could access the string's constructor, create a new string and then return it (thought I was real clever here) but no, apparently you cannot create a class within the package java.lang. Some sort of security issue.
    I am just wondering first if there is an easy way of forcing the compiler to obey me, or forcing it to allow me to access a package private constructer from outside the package. Either that, or some sort of security overrider, somehow.

    My laptop can create and garbage collect 10,000,000 Strings per second from char[] "hello world". That creates about 200 MB of strings per second (char = 2B). Test program below.
    A char[] "tens of megabytes large" shouldn't take too large a fraction of a second to convert to a bunch of Strings. Except, say, if the computer is memory-starved and swapping to disk. What kind of times do you get? Is it at all possible that there is something else slowing things down?
    using (literally) millions of charAt()'s would be
    suicide (code-wise) for me and my program."java -server" gives me 600,000,000 charAt()'s per second (actually more, but I put in some addition to prevent Hotspot from optimizing everything away). Test program below. A million calls would be 1.7 milliseconds. Using char[n] instead of charAt(n) is faster by a factor of less than 2. Are you sure millions of charAt()'s is a huge problem?
    public class t1
        public static void main(String args[])
         char hello[] = "hello world".toCharArray();
         for (int n = 0; n < 10; n++) {
             long start = System.currentTimeMillis();
             for (int m = 0; m < 1000 * 1000; m++) {
              String s1 = new String(hello);
              String s2 = new String(hello);
              String s3 = new String(hello);
              String s4 = new String(hello);
              String s5 = new String(hello);
             long end = System.currentTimeMillis();
             System.out.println("time " + (end - start) + " ms");
    public class t2
        static int global;
        public static void main(String args[])
         String hello = "hello world";
         for (int n = 0; n < 10; n++) {
             long start = System.currentTimeMillis();
             for (int m = 0; m < 10 * 1000 * 1000; m++) {
              global +=
                  hello.charAt(0) + hello.charAt(1) + hello.charAt(2) +
                  hello.charAt(3) + hello.charAt(4) + hello.charAt(5) +
                  hello.charAt(6) + hello.charAt(7) + hello.charAt(8) +
                  hello.charAt(9);
              global +=
                  hello.charAt(0) + hello.charAt(1) + hello.charAt(2) +
                  hello.charAt(3) + hello.charAt(4) + hello.charAt(5) +
                  hello.charAt(6) + hello.charAt(7) + hello.charAt(8) +
                  hello.charAt(9);
             long end = System.currentTimeMillis();
             System.out.println("time " + (end - start) + " ms");
    }

  • Creating Multiple Ringtones from 1 song

    Does anybody know whether or not we'll be able to make multiple ringtones from one song with out having to pay 99 cents for each one? i.e. you buy one song, +another one bites the dust+, and then you want to make 4 different ringtone from the same song, do we have to pay for each one, even though they're from the same song technically?

    Hi Greg,
    Many thanks for your answer. And yes this would be a solution. However I just simplified my case as the decision to create an second record and where to post is depending on more than 1 field in the source.
    But I will keep it in mind, because I also can opt for a solution to store data differently in BPC fac-tabels which will help me to use script logic.
    If it is not possible to create multiple records from a single records in the standard functionality in the Transformation and/or Conversion file, I have to create a custom DTSX or change my way of storing data.
    Anyone else who is having an alternative idea like Greg came up with?
    Please let it know!
    Best regards,
    Johan

  • Creating multiple PDFs from an xml form

    Hello--
    I am a LiveCycle Designer beginner, so please bear with me.
    I'm hoping to automate the creation of multiple PDFs from within a LiveCycle XML form I created.  We have a database with vendor contact information. Each vendor could have multiple records within our database (currently they range from 2-60). We currently send to a pointperson at each vendor an Excel spreadsheet that contains all the records associated with that vendor. That person then modifies, adds and deletes the records in that spreadsheet. We then input those updates into our database.  
    We recognize that this is an antiquated form of contact management, and want to improve. Of course, the challenge is that we do not have our own server to use, and we are not able to use any third party service that costs anything. Since we already have LiveCycle Designer, I'm hoping XML forms can make things easier for our administrators. I really hope there is a scriptable solution for this. 
    Here is what I've done (much of it to learn how LiveCycle Designer works).
    I created an XDP with all the appropriate fields. 
    I also created separate XML files for each vendor.
    I was able to create individual PDFs when I associate the vendor-specific XML file to the XDP using the Locate Data File field in the Defaults tab of the Form Properties.
    While this works, I essentially have just done the same amount of work as our current solution. Nonetheless, since LiveCycle is scriptable, I'm hoping that I can automate a number of these tasks. Is it possible to automate from within Designer, the creation of multiple PDFs—one for each vendor—using the same XDP form?  Do I need to make the XDP form a TDS file? Is this even the right approach? Is there a way to connect to the database and filter out by vendor the information I need? 
    I apologize if this is all over the place. Any and all advice would be most appreciated!!!

    The Split command also allows you to do this with a few more options like contol of the file naming and number of pages. Here is a quick tip on how to do this if you're interested.
    [Click to watch on the AdobeTV site]

  • Acrobat 9 Pro - Batch Create Multiple Files from InDesign CS5 files

    When attempting to batch create PDFs from Indesign CS5 files using Acrobat Pro 9's File>Create PDF>Batch Create Multiple Files ... option the operation fails with the error 'Could not find the application that created this file: [path to file] Please select a file created by an application that resides on your computer.' as shown in the screenshot below:
    Acrobat 9 Professional was bundled with Creative Suite 5 Design Standard so shouldn't this work? My machine is running OS X 10.6.7, Acrobat Pro 9.44 and InDesign CS5 7.04.
    Any help to solve this issue would be most gratefully received - this feature had previously saved me a lot of time on my old machine with 10.5.8, Acrobat Pro 9 and CS4.

    I have uploaded the files and shared them.  These are the links
    Grade 11 Maths Standardisation Project Paper 2 2013.doc
    https://files.acrobat.com/preview/9694310d-ca7f-4919-883d-c53b36215d89
    Grade 11 Maths Standardisation Project Paper 2 Analysis Grid 2013.doc
    https://files.acrobat.com/preview/97da9e5f-d412-4d25-9bbc-d1a525d90826
    Grade 11 Maths Standardisation Project Paper 2 Diagram Sheet 2013.doc
    https://files.acrobat.com/preview/f50dd62e-af04-4060-85c5-fa81ce6803d8
    Grade 11 Maths Standardisation Project Paper 2 Formula Sheet 2013.doc
    https://files.acrobat.com/preview/7fc6007b-aaa6-4d65-9a8c-bf99818474a5
    Grade 11 Maths Standardisation Project Paper 2 Marking Guidelines 2013.doc
    https://files.acrobat.com/preview/b3a715bb-3683-48df-b0ec-3d17442275be
    Grade 11 Maths Standardisation Project Paper I Analysis Grid 2013.docx
    https://files.acrobat.com/preview/ab62e6b6-0261-434e-8a2f-382f74335685
    The first file is the problem file.  If you create this file separately, Acrobat will convert it perfectly.  But "Batch create multiple files" and the graphics are deconstructed on page 8

  • Create a Database from xml

    Hi,
    I'm using javaDb embedded and I trying to find the best way to create a database from a xml file.
    I managed to do this, previously with netbeans 6.9, jdk 6 and apache ddlutils.
    Unfortunately this method as proven to be not so good, and and can't get it to work with netbeans 7.
    Is there a best way to do this?? Any recommendation on this matter will be appreciated.
    Thanks in advance,
    Hugo

    s3c wrote:
    Hi,
    I'm using javaDb embedded and I trying to find the best way to create a database from a xml file.
    I managed to do this, previously with netbeans 6.9, jdk 6 and apache ddlutils.
    Unfortunately this method as proven to be not so good, and and can't get it to work with netbeans 7.
    Is there a best way to do this?? Any recommendation on this matter will be appreciated.
    Thanks in advance,
    Hugowhat does question or solution have to do with forum TOPIC Oracle RDBMS?

Maybe you are looking for

  • Print out of Depot excise invoice

    Hi all, Please let me know is there any standard process in which depot excise invoice can be printed. If not what changes to be made to get it in the form of an output. The functional flow is that a sale is not happening directly between a plant and

  • Exporting report to PDF error

    This code has worked for years, but now I'm getting the following error when programmatically exporting a report to PDF: "File does not begin with %PDF-" My environment info: Crystal Reports Developer XI Release 2 sp1 VS 2005 - .NET 2.0 IIS 6 Few lin

  • Signed messages are missing from search results in a shared mailbox

    We recently completed moving all user mailboxes to Exchange 2013 from Exchange 2010.  We also have a policy that disables the 'download shared mailboxes' option in Outlook as it cause .ost files to get cumbersome and cause performance problems.  This

  • Cannot send photo's from iPhoto by email my server settings are correct

    I cannot send photo's by email or iCloud from iPhoto. My server is Virginmedia, i have spoken to them and they have checked my password and all settings and they are correct. They said it would better for me to contact Apple as something might have c

  • Integrating EBS 12.1.1 with P6R8 using the EBS PIP 2.5

    We are trying to implement P6R8 (fresh install), an integrating with EBS (12.1.1 production system) through the EBS PIP. We have been told by our sales rep & developer (PIP) that Oracle cannot provide a backport of Patch 10281857:R12.PJF.B - R12.1 Lo