LineChart with unknown amount and name of elements

Hi!
I want to create a LineChart. This charts displays a changing
number over a period of time.
<?xml version="1.0" encoding="utf-8"?>
<root>
<poll>
<id>1</id>
<answerIDs>
<id>a1</id>
<id>a2</id>
</answerIDs>
<resultsByDate>
<entry date="03/01/2007">
<1><results>15</results></1>
<2><results>18</results></2>
</entry>
<entry date="03/02/2007">
<1><results>25</results></1>
<2><results>8</results></2>
</entry>
<entry date="03/03/2007">
<1><results>45</results></1>
<2><results>38</results></2>
</entry>
</resultsByDate>
</poll>
</root>
<mx:LineChart id="chart"
dataProvider="{service.lastResult.root.poll.resultsByDate.entry}"
>
<mx:horizontalAxis>
<mx:CategoryAxis categoryField="date" />
</mx:horizontalAxis>
<mx:horizontalAxisRenderer>
<mx:AxisRenderer labelRotation="45" />
</mx:horizontalAxisRenderer>
<mx:series>
<mx:LineSeries displayName="1" xField="date"
yField="results" />
<mx:LineSeries displayName="2" xField="date"
yField="results" />
</mx:series>
</mx:LineChart>
It only works when I don't use <results> in the XML and
set the yField to "1" or "2".
Later In the application I don't know the amount and name of
the elements (1,2,44,4564, ..), so I will use AS for that:
var ls:LineSeries = new LineSeries();
chart.series = [ls]; // associate the array
var answers:Array = ["1", "2"];
for (var i:uint = 0; i < 2; i++)
trace(i);
ls = new LineSeries();
ls.displayName = answers
.toString()
ls.xField = 'date';
ls.yField = 'results';
chart.series = ls;
This code works, but only without 'results'.
Maybe can someone help me? I sit not possible to have nested
objects as provider for xField and yField?

By using a temporary table instead of a permanent.SET @query =
'SELECT * INTO #NewPivotTable
FROM
SELECT productId,_year,amount
FROM Products
)t
PIVOT (SUM(amount) FOR _year
IN ('+@years+')) AS pvt; SELECT * FROM #NewPivotTable '
EXECUTE (@query)
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence

Similar Messages

  • Importing CD to Artist folder\Album folder\file with track number and name:

    I have a problem then importing my cd’s to my harddisk using iTunes.
    On my previous pc I got what I want, Artist folder, Album folder and file with track number and name:
    e.g.
    D:\My Music\B.B. King\Blues On The Bayou\01 Blues Boys Tune.mp3
    D:\My Music\B.B. King\Blues On The Bayou\02 Bad Case Of Love.mp3
    D:\My Music\B.B. King\Blues On The Bayou\03 I'll Survive.mp3
    But now I get:
    D:\My Music\Compilations\Blues On The Bayou\01 Blues Boys Tune.mp3
    D:\My Music\ Compilations \02 Bad Case Of Love.mp3
    D:\My Music\ Compilations \03 I'll Survive.mp3
    In iTunes my settings are Edit -> Preferences -> Advanced: iTunes Music folder: D:\My Music and checkmark in both: “Keep iTunes Music folder organized” and “Copy files to iTunes Music folder when adding to library”.
    My version of iTunes is 8.0.1.11
    Thanks in advance
    Peter

    It will depend on the album. Gracenote considers anthologies, a collection of tracks by the same artist taken from different albums, as a compilation. In iTunes the compliation setting should really only be applied to a collection of tracks by different artists.
    tt2

  • Hey all just trying to set up my ipad synced up with itunes but now if i try to download any apps i put my password in then comes up with unknown error and wont download any help would be great

    hey all just trying to set up my ipad synced up with itunes but now if i try to download any apps i put my password in then comes up with unknown error and wont download any help would be great

    Reset your iPad and see if that helps.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • How do  create a slide show with both video and photos in elements 12

    how do  create a slide show with both video and photos in elements 12

    Hi Brian
    You can batch process a set of prepared slides from Full Edit (see image) using:
    File >> Process Multiple Files
    In the PMF dialog you can choose filename, date, or description (caption)
    Make sure you choose a separate destination folder to your source folder so as tot to permanently overwrite your originals.
    Click image to view

  • TS3048 My bluetooth mouse usually loss with unknown reasons and it then automatic connected again after some clicks.

    Dear Sir or Madam,
    I have bough my Macbook Pro since 8 months ago and it seams quite good upto now, however in these days my Bluetooth mouse ussually lossed with unknow reasons and it then automatic connected again after some clicks.
    I have check mouse battery as well as relevent reasons like turn-on, but it still repeated and I don't know what is exact problem, it due to my mouse or my mac?
    Thank you very much and looking forward to your help.
    BR

    Check your Bluetooth, do you have a bunch of stuff listed in there that you are no longer using?
    Or another peripheral you stored away in a cabinet near by?

  • L use lion OS and still the appstore want to upgrade iPhoto 9.2 but with (unknown) other account name. So in the dock is 1 upgrade  mensionned but l can't upgrade ! What can l do ?

    When l want to upgrade in Appstore a message tells me that this update is available for another account...but not for mine !
    l think that this upgrade is part of a upgrade for OS Lion because l did not bought iPhoto in the appstore.

    You must get help from App Store support. They are the only people who can help with this.
    Regards
    TD

  • Address labels with BOTH company and name?

    I was hoping with Snow Leopard, that Mail would allow one to print address labels with BOTH the company and the name of the recipient.
    I can only seem to print one or the other... but not both.
    Is is possible to print an address label with both?
    This would be a label with 4 lines... doesn't seem like rocket science to do this? What am I missing?
    I can do this with Pearlabelizer. But I've tried everything in Mail to no avail.
    Even when I print a PDF of a mail list, I can't have both the Company and the Name together. This is very frustrating.
    Thanks for any tips...
    jn

    I see there's a workaround, if you don't have the Company name checked.
    I wonder now if there's any way to uncheck the 'company' box from 450 addresses all at once? Or does one do those sorts of things one at a time?
    Thanks for any tips!
    :0)
    jn

  • Report for wage type with number, amount and amount per unit?

    Hi friends.
    I would like to know if there exits a report for wage type (like the PC00_M99_CWTR) that shows the number (anzhl), amount per unit (betpe) and the amount (betrg) of a person for a specific wage type.
    The standar report PC00_M99_CWTR does not display the amount per unit (betpe).
    Thanks in advance.
    Albio.-
    Edited by: Albio Manuel Vivas on Oct 20, 2011 6:13 PM

    Thanks,
    could you tell me what transaction i'll should use?
    thanks in advance
    Albio.-

  • G/L Account Display with Vendor Number and Name -Urgent-

    Hi Experts!
    Is there a transaction, report, or table that can show a list of all the vendor names/numbers for transactions posted to a specific G/L account for a specified period?  If so, please let me know.  Thank you for your time!
    Best Regards,
    WC

    We can display the Vendor number from the layout in FBL3N report, but the Vendor number will be displayed only if the document is posted from MM module. If the posting is from normal FI, it will not be displayed.
    Other option is to develop a simple ABAP report to display Vendor.
    Thanks
    Murali.

  • Purchased new mac book pro with Adobe Photoshop and Adobe Premiere elements 13 - no CD drive on new Mac - how to install?

    Can I download the software somehow since my MacBook Pro does not have a CD drive?

    Says Warning
    The following disk images couldn't be opened
    image not recognized
    Hmmm....

    Julie Olson
    Select Realty
    REALTOR/Lic. Assistant to Sean Leahy
    [email protected]
    (906) 250-0893
    http://about.me/calljulieolson
    <http://t.senalcinco.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XYg7fJZVMVQK8y87gbJVsW3 MhGXn56dKj6f7JKsKx02?t=http%3A%2F%2Fabout.me%2Fcalljulieolson&si=6310784313327616&pi=4a807 543-1e8e-4e0a-9063-8091e5e55d29>
    <http://t.senalcinco.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XYg7fJZVMVQK8y87gbJVsW3 MhGXn56dKj6f7JKsKx02?t=http%3A%2F%2Fwww.seanleahyrealtor.com%2F&si=6310784313327616&pi=4a8 07543-1e8e-4e0a-9063-8091e5e55d29>
    <http://t.senalcinco.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XYg7fJZVMVQK8y87gbJVsW3 MhGXn56dKj6f7JKsKx02?t=http%3A%2F%2Fwww.facebook.com%2FseanleahyREALTOR&si=631078431332761 6&pi=4a807543-1e8e-4e0a-9063-8091e5e55d29>
    <http://t.senalcinco.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XYg7fJZVMVQK8y87gbJVsW3 MhGXn56dKj6f7JKsKx02?t=http%3A%2F%2Fwww.youtube.com%2Fuser%2Fseanleahyrealtor&si=631078431 3327616&pi=4a807543-1e8e-4e0a-9063-8091e5e55d29>
    On Tue, Dec 30, 2014 at 4:15 PM, Julie Olson <[email protected]>

  • How to find open orders with amount and open deliveries?

    Hi All,
    I want to find out the open orders with open amount and open deliveries for a particular customer.
    We need this for credit check purpose.
    Kindly guide us for this.
    Regards,
    Satish.

    Hi,
    To find out open order:
    data: c_bef_pgi(1) TYPE c VALUE 'A',
    RANGES: rg_wbstk FOR vbuk-wbstk."range for wbstk
      rg_wbstk-sign = 'I'.
      rg_wbstk-option = 'EQ'.
      rg_wbstk-low = 'C'.
      APPEND rg_wbstk.
      rg_wbstk-low = 'A'.
      APPEND rg_wbstk.
    1.first put query on vbak table
    2.Put query on vbuk table as
          SELECT vbeln bestk lfstk gbstk FROM vbuk
                  INTO TABLE it_vbuk_open
                  FOR ALL ENTRIES IN it_vbak
                  WHERE vbeln = it_vbak-vbeln AND
                        bestk IN rg_wbstk AND
                        lfstk = c_bef_pgi.
    so this wil give u open orders.
    3. Then according to vbuk, get the details from vbap.
    To find open delivery
    1. First put query on vbak table
    2. Put query on vbfa as
      SELECT vbelv posnv vbeln posnn vbtyp_n vbtyp_v FROM vbfa
                 INTO TABLE it_vbfa
                 FOR ALL ENTRIES IN it_vbak
                 WHERE vbelv = it_vbak-vbeln AND
                       vbtyp_n = 'J' AND
                       vbtyp_v = 'C'.
    3.Then from VBfa,get the details from LIkp
    4.Then put entry on vbuk as
    *entries from vbuk
          SELECT vbeln wbstk fkstk gbstk FROM vbuk
                 INTO TABLE it_vbuk_del
                 FOR ALL ENTRIES IN it_likp
                 WHERE vbeln = it_likp-vbeln AND
                       wbstk IN rg_wbstk AND
                       fkstk = c_bef_pgi.
    Thanks & Regards,
    Anagha Deshmukh

  • Sections and its data elements

    Hello experts,
    Finally we have began to work in AdminConsole... step by step I have been familiarized with the application and its funtions, but right now I have a doubt:
    I will try to explain myself the best I can:
    1.- How could I know which "data element" is used in a section/element/object? I mean: In the Detail Designer - Top Level Details, there are a list of Top Level, as you knows, there are a several elements (row table, detail header, sections...), so, when I edit a element or object using "+" button, a contextual menu is displayed with the sections and other objetcs. I would like to know which "data element" is used by these section.. There is any doc with the section and their "data elements"?
    Thanks and best regards

    Hi Emilio,
    I recommend that you hover over a section to get the name of the detail and then trace back to the data element from the configuration file. In the detail configuration (e.g. PositionChartDetails in ../root/XML/AppResources/detailconfiguration) will be a tag called configuration that contains the name of the detail data configuration (e.g. PositionChartDetailsData). Open the detail data configuration (in the folder detaildataconfiguration in AppResources) and you will see the data element listed there (which will be in dataelementconfiguration).
    Good luck!
    Luke

  • How can i transfer my iTunes library from old computer to new with all artwork and tags intact?

    Is it possible to just copy the iTunes folder on my Windows PC from the old computer to a hard drive and then to the new Mac Book, and have the library look the same?  Importing the files using the "add folder to library" function results in many files coming up with "unknown artist" and/or "unknown album."  But I didn't think just copying the iTunes folder from one computer to the other would work, without somehow also using the "add folder to library" function.
    I know there are other questions on site (one by me, actually), but I was hoping for any more information.  Many thanks, in advance.

    FYI, just in case anyone sees this and has the same problem, I posted another question beginning with the words "How can I get all music "tags" to transfer . . . " which outlines a solution.  Good luck to anyone with the same issue - the transfer can be done!

  • Clearing items with New GL and document split

    Hello gurus,
    When clearing 2 items with opposite amount and the same account assignment, the system generates 2 clearing items for the same account whereas I am expecting to have a clearing document without any item (as it is wotking without document split)! In such situation there is no reason to enlarge the credits and debits into the Balance sheet.
    Has anyone of you already faced such situation and have any solution for me?
    Thank you in advance for your help
    Best regards
    Pascal.
    Edited by: Sylvie EHM on May 27, 2009 10:33 AM

    Hi Abhijit and thank you for your first answer,
    I agree with you if more than one segment is used into the same posting but in my case there is only one segment !
    I think that this logic is applied for technical reason as explained into the OSS note N°950773.
    Does any one of you have a genious solution for me or know whether SAP has changed his standard solution?
    For french customers this technical postings are not acceptable since debit and credit variations has to be functionaly justified...
    Thank you in advance for your help.
    Best regards
    Pascal.

  • Restritions on id and name attributes?

    Are there any known restrictions in respect to what ascii characters are valid for object id and name attribute?
    I created (via xml file) a ObjectGroup (aka Organization) with id='#ID#ObjectGroup:Approve_org' name='Approve_org' displayName='Approve_org'
    The Organiozation did not open and did not show the contained users.
    With this id and name it worked fine.
    id='#ID#ObjectGroup:ApproveOrg' name='ApproveOrg' displayName='Approve_org'
    Any thoughts?
    Ugato

    From my experience, the name and id attribute may contain pretty much every character - at least I have yet to find anything that isn't accepted. I even tried your example "Approve_org" and it worked (in IDM 8.1).
    This is what I uploaded:
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE ObjectGroup PUBLIC 'waveset.dtd' 'waveset.dtd'>
    <!--  MemberObjectGroups="#ID#Top" displayName="Approve_Org" name="Approve_Org"-->
    <ObjectGroup
          id='#ID#ObjectGroup#Approve_Org'
          name='Approve_Org'
          displayName='Approve_Org'
          creator='Configurator'
          primaryObjectClass='ObjectGroup'>
      <PathFromTop>
        <List>
          <String>#ID#Top</String>
          <String>#ID#ObjectGroup#Approve_Org</String>
        </List>
      </PathFromTop>
      <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
      </MemberObjectGroups>
    </ObjectGroup>Maybe you had something else wrong?

Maybe you are looking for

  • How to view capacity evaluation in the past ?!?!

    Hi friends, I'm writing a report to show the capacity evaluation within date range. I found t-code CM50 but it just show result from current date to future. Please tell me how to view it in the past. Thanks, Hau

  • I need a list of printers that will work with Mac 9.1.

    The 2 printers I have bought for my iMac 9.1 have permanently crashed and I need to see a list of under $150 printers that are compatible. I want something like the discontinued hp 4215. I was oblivious to this problem and purchased a hp 4315 that wo

  • Unable to delete JCA resource adapters

    Hi All, I am unable to delete resource adapter. Please help Here is the error "Deleting JCA Connection Factory: InboundRA_QN1_100 failed due to: Removing or adding connection definition "InboundRA_QN1_100" failed because "It is not allowed to remove

  • Rename column !!

    Can oracle 8i gives a facility to rename column ? How ? Thanks in Adv.

  • Itunes DB is corrupt

    I keep getting this message when trying to update iPod mini: The file or directory\Ipod_control\ItunesDB is corrupt and unreadable. Please run the chkdsk utility. How do I do this?? Also my Ipod says it's updating and the songs wont appear on my Ipod