Definition of the data to a chart

AS:

Hi all

I'm new to Flex but have a simple question about the definition of the data to a bar chart.  Curious, the code below the values in my BarChart become every 4 because of the link to the table?  If MyArray is local to the button click function, which only becomes a problem when execution leaves the service since the DataProvider will demonstrate to a table that does not exist.  Although it seems not work properly.  Thanks Bob

protected function button1_clickHandler(event:MouseEvent):void
{
TODO self-generating method stub
var MonTableau: Array = new Array();
MyArray [0] = 1;
MyArray [1] = 2;
MyArray [2] = 3;

Series1.DataProvider = MyArray;

barchart1.invalidateSeriesStyles ();

MyArray [0] = 4;
MyArray [1] = 4;
MyArray [2] = 4; }

MX:

< mx:BarChart = "27" x y = '91' id = 'barchart1' height = '259' type = 'bunk' >
< mx:series >
< mx:BarSeries id = "series1" displayName = "Series 1" xField = "" / >
< mx:BarSeries id = "series2" displayName = "Series 2" xField = "" / >
< / mx:series >
< / mx:BarChart >

Basically, when you say series.dataProvider = myArray, the source property of the collection object that is created will have a source property which will reference the same memory (say 0x000000) referenced by myArray.Whenever you say MonTableau [0] = 5, you change the memory referenced by the handle myArray.Therefore, the change will be reflected in the collection too. When the function ends, what happens is that the handful of myArray to memory 0 x 000000 is lost. But the content of the memory will remain as there are a handful through the source of the collection.

It's my explanation for the scenario. I guess it's okay. In my view, it is best to confirm with other experts in the forum before coming to a conclusion.

Tags: Flex

Similar Questions

  • How to move a rule definition with the data store for esx alarm without re-creating the rule?

    Hi, I would spend my rule of definition of alarm of the data at the level of esx store, without re-creating the rule. Is this possible?

    In the Act, I don't want no definition of the alarm at the data store level. So, what is the best practice?



    Best regards

    It is currently not possible.  The rules are hierarchical, and there is no way to stop the inheritance, or move messages.  You will have to re-create them at the appropriate level.

    -KjB

    VMware vExpert

  • Cannot display the data in a chart, received the error: no connection is possible.

    Hi Expert,

    I am under sample SH in OracleBI response. Extract them from data in a table are fine, but I can't view a chart.

    Thank you
    Helen

    Here is the error message:
    -----
    Graphic generation error
    An error occurred during the execution of 'connect' No connection could be made because the target machine actively refused it. [Socket: 764]
    Error details
    Error codes: ETI2U8FA
    -----

    I use oc4j

    Here is the site:
    http://5y2xch1:9704/Analytics/saw.dll?answers & SubjectArea = SH


    This is SQL
    ----
    SELECT products. Prod name' saw_0, calendar. "" Calendar month Desc ' saw_1, calendar. "" Calendar Month Name "saw_2,"sales facts. " "" Amount sold "saw_3 OF SH ORDER BY saw_0, saw_1, saw_2
    Here is xml in advance
    -------

    "< xmlns:saw="com.siebel.analytics.web/report/v1 saw: report "container ="http://www.w3.org/2001/XMLSchema"xmlVersion ="200705140"xmlns: xsi ="http://www.w3.org/2001/XMLSchema-instance"xmlns:sawx="com.siebel.analytics.web/expression/v1 ">"
    < subjectArea saw: criteria = "SH" >
    < saw: columns >
    < formula saw: column = 'products. & quot; Prod name & quot; ' columnID = "c2" / >
    < formula saw: column = "calendar. & quot; Calendar month Desc & quot; ' columnID = 'c0' / >
    < formula saw: column = "calendar. & quot; Calendar Month Name & quot; ' columnID = "c1" / >
    < formula saw: column = "& quot; Made sales & quot;. & quot; Amount sold & quot; ' columnID = 'c3' / > < / saw: columns > < / saw: criteria >
    < saw: views currentView = "2" >
    < saw: view xsi: type = "saw: compoundView" name = "compoundView! 1"rptViewVers ="200510010">
    < saw: cvTable >
    < saw: cvRow >
    < viewName saw: cvCell = "titleView! 1 ">
    < saw: displayFormat / > < / saw: cvCell > < / saw: cvRow >
    < saw: cvRow >
    < viewName saw: cvCell = "tableView! 1 ">
    < saw: displayFormat / > < / saw: cvCell > < / saw: cvRow > < / saw: cvTable > < / saw: see >
    < saw: view xsi: type = "saw: titleView" name = "titleView! 1"rptViewVers ="200510010"/ >
    < saw: view xsi: type = "saw: tableView" name = "tableView! 1"rptViewVers ="200510010"more ="false"/ >
    < saw: view xsi: type = "saw: staticchart" name = "staticchart! 1"rptViewVers ="200510010">
    < tid="charts/column.cxml"/ saw: model >
    < saw: selections >
    < saw: Categories >
    < position saw: category = "0" >
    < columnID saw: column = "c2" / > < / saw: category > < / saw: Categories >
    < saw: measures >
    < columnID saw: column = position 'c3' = '0' / > < / saw: measures >
    < saw: seriesGenerators >
    < saw: measureLabels / > < / saw: seriesGenerators > < / saw: selections >
    < saw: canvasFormat / > < / saw: view > < / saw: views > < / saw: report >

    Published by: user914594 on February 4, 2011 08:22

    Hello
    Check the Oracle BI server Javahost weather is on or not. If the server is.
    Click Start-> Run-> Services.msc

    What version of OBIEE do you use?

    Kind regards
    Srikanth

  • Definition of changing data Access set in R12

    Hello

    I tried to change DAS in R12. But Oracle does not allow to change or update. This is a standard feature, or miss me something?

    Thank you

    Andréanne

    Hi Manish,

    I have spoken here data access custom only sets.

    The trick is to change all of the access of the data in terms of accounting change or accounting is firstly delete the row and add a new.

    The foregoing is confirmed by Oracle and I tested it. However the header like calendar, costs, or access options set type cannot be changed once it is created. In this case a new complete DAS must be created.

    MOS reference - R12: how to change the definition for the data access sets? (Doc ID 1902182.1)

    Thank you

    Andréanne

  • How can I create a chart that creates new series each year when the data are not collected on a daily basis?

    I collect numbers "occasionally" of my solar system and to create a standardized chart that shows that the generation on an annual basis, so I can compare fall in the fall of each year, etc..

    Because the information is not strictly 'daily' (just whenever I get to it), I don't know how it normalize for several years.

    For example, if I had

    Date - Kw/day

    15/01/10 - 14

    03/04/10 - 18

    18/04/10 - 17

    01/06/10 - 19

    21/09/10 - 15

    03/12/10 - 9

    07/02/11 - 13

    02/05/11 - 16

    17/08/11 - 18

    01/11/11 - 12

    02/11/11 - 12

    05/01/12 - 9

    04/06/12 - 12

    and so on.

    What I'd like to see is a line graph for each year from January to December with these datapoints on it. I have much more "incremental data" that I presented above, but it's on "random dates" during the last 8 years, and I'm just trying to see how each year compared to other years.

    To be at the front, I tried to understand how this in Excel as well, but he could not understand where the other.

    DRM for any tips/tricks/tips!

    Steve

    This might work for you...

    I placed your data in a table named "Data."

    Create a second (in this example, titled 'Table 1')

    In the table 'Table 1' months are in the first column and the first row (which is a header row) contains the years - add columns to add new year:

    B2 = if (SUMIFS (data: $B, data: $A, "> =" & (B$ 1, $A2, 1), DATE data: $A, "<" & EOMONTH(A1,0) will GET (DATE B$ 1, $A2, 1, 0) "" "") > 0, SUMIFS (data: $B, given: $A, "> =" & (B$ 1, $A2, 1), DATE data: $A, "<" & EOMONTH(A1,0) will GET (DATE B$ 1, $A2, 1, 0) "" ""), "")

    It's abbreviation dethrone select cell B2 and type (or copy and paste it here) the formula:

    = IF (SUMIFS (data: $B, data: $A, "> =" & (B$ 1, $A2, 1), DATE data: $A, "<" & EOMONTH(A1,0) will GET (DATE B$ 1, $A2, 1, 0) "" "") > 0, SUMIFS (data: $B, given: $A, "> =" & (B$ 1, $A2, 1), DATE data: $A, "<" & EOMONTH(A1,0) will GET (DATE B$ 1, $A2, 1, 0) "" ""), "")

    Select copy of cell B2

    Select the cells B2 at the end of F13, dough

    now select cells A2 through F13 and add a graphic (the XY scatter diagram)

    Add new year add one (or more) new columns for "table 1", then add the year to the top:

    Now alone, click the chart to activate the chart.  then click on the button 'change data references '.

    now, drag the data reference control handle to the right to add the new year to the table:

    You can add several years to the time, so you don't have to it very often

  • [chart] not always showing the data

    First of all, I use CVI2012SP1 with the CVI2013SP2 runtime.

    I ve you have the problem that the same program and version works fine on my pc, but not on a pc for a customer.

    The problem is that on my pc, I can see the data, but on the pc of the client it is from no data. As I use the manual scaling, I know that the data, which should be drawn, are just. The thing that bothers me the most is that I use a graph for other things in this program, and here they are still working.

    I Don t know if it helps, but I also had the problem that Auto scale does not work for me on these graphs.

    I can´t really make a cut from the version of this, because it seems that it is only a problem for the graphics on a table of many.

    More information about the graphics. I had 4 panels with graphics on it. 3 panels is loaded only once and works perfectly, but a single panel that I load many times that I need and it got 2 graphics in it and these 2 graphics aren´t works as expected.

    Nobody knows what this could be or could tell me what to try to find out what is wrong of will?

    Problem found and solved.

    Before I used a chart to display the data, I used a stripchart and as I ve changed the code I misplaced a parameter to the PlotXY function. So instead I put the thickness of line as a parameter to set the line style, and so the plots disappeared for the thickness of the line 2.

    It was a hard to find bug

  • Save the data in the chart to the file constantly

    I'm analog data Aqcuerir of USB 6000 data acquisition and display on the chart. I have to save all the data in a file as well (text or excel... or at least a file). It is easy to configure so that the data is saved after the stop button was so press until the end of the race. However, I need to write to a file when running because he could be running for days. In such a period extended, the buffer is an overload, and the data is lost.

    Could you please indicate some kind of how to write data to a file constantly during measurement, wthout record in the buffer?


  • Is it possible to reset the date of the last virus and update the spyware definitions in XP?

    I have xpsp3.  I was looking at my calendar to find out what day of the week, an event that happens in November, and unfortunately I forgot to go back to the date of the day before I have updated the definitions of viruses and spyware on MSE.  Now, MSE think my latest definitions of viruses and spyware are obsolete, because they were supposed to be updated three months from now.  So my question is: is it possible to reset the date of the last virus and update the spyware definitions in XP?

    Correct the date on your computer. Remove the antivirus/malware product and reinstall.

    -OR-

    To restore before the update, use the system restore. Make sure the date is correct. Update.

    Tom Ferguson

  • How to integrate the dynamic SQL generated in the data definition XML file?

    Hi all

    I have it here is the XML file that is attached to the definition of data model RTF as below. Also, I have a function that will return to create a dynamic query as shown below.

    <?xml version="1.0" encoding="UTF-8"?> 
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0"> 
    <dataQuery> 
    <sqlStatement name="Q2"> 
    <![CDATA[
    

    Hi guys,.

    I was able to solve above the requirement. It was not possible to create only from SQL dynamically. Instead, I created a procedure that would create & update (attached to the data definition) XML file dynamically for each race.

    Kind regards

    Patricia K.

  • problems with the date in the chart in the first instance

    Hello

    I have a date selection field (P2_START_DT), which has a default value in a table

    Here's the code I used to set the default (thanks again to the expert for assistance)

    Start

    Select max (REC_DATE) dt in: P2_START_DT

    from TABLE_A;

    return: P2_START_DT;

    end;

    on the same page, I have a report (Type: SQL query) and a chart that takes P2_DATE as a parameter

    This is a sample report SQL condition

    ...

    where

    RECORD_DATE >: P2_START_DT

    This is a condition of samlpe SQL used for the graphics

    ...

    where

    RECORD_DATE >: P2_START_DT

    condition is about the same for both

    My problem is that when the page is loaded for the first time, the P2_DATE field and the report shows good data but my chart shows nothing.

    to test, I added a button to submit the page.

    When I click on the button both my chart and the report shows the right data... suggesting that for some reason any graph is not picking up the default value for P2_START_DT when the page is first loaded

    Please notify.

    The default value for your item is not saved in session state until you offer page.  When your chart is rendered the first time the value of your object in session state (which makes graphic references) is not defined.

    Create a calculation for your section header to set the value of the element in the session before the rendering of the graphics state.

    Calculate the point: P2_START_DT

    Calculation Point: before header

    Type of calculation: (single return value) SQL query

    Calculation:

    select max(REC_DATE) dt
    from TABLE_A;
    

    Condition Type: point value / Expression 1 a NULL column

    Expression 1: P2_START_DT

  • Order of the data rows of Gantt chart does not match the order of the lines in the timeline

    Hello

    I have a project with tasks parent and child gantt chart. It works fine except that the order of the rows in the datagrid control does not always match the order of the lines in the timeline. If it should not match? In addition, in the timeline, in some cases the period of the child does not appear directly under the parent period. Is this a bug or am I missing something? How to get the lines in the correct order?



    Tiina

    Published by: Tiina on 11.11.2010 01:08

    Tiina salvation,

    Thank you update data, which solved one of the questions. Now for the actual order of the elements in the timeline - if you take a look at the order of the data in the XML table, calendar entries are just that reflects the order in which the data was returned by the query. So although I suggested using an ORDER BY ID condition on your request, you are actually better off using a START WITH... CONNECT BY clause for resultset hierarchical of output.

    I created 2 page in your application (a copy of page 1), where you can compare the difference between the paintings pages 1 & 2, in terms of appearance and also the order of the tasks in the XML file.

    I hope this helps.
    Kind regards
    Hilary

  • How to display the date (instead of number) along of there axis of column chart?

    Hello

    I have a requirement in which I need to display the date on the projects along the x axis and y Axis. It is essentially a graph of milestone. Something like this:

    Capture.PNG

    Here is my code:

    < mx:ArrayCollection id = "acProjects" >
    < mx:Object PROJID = 'A1' projDesc = 'Execution of Civil engineering works' plandate = '2009-12-23' actualdate = "2009-11-25" / >
    < mx:Object PROJID = "A2" projDesc = 'Installation of equipment' plandate = '2010-02-15' actualdate = "2010-03-25" / >
    < mx:Object PROJID = 'A3' projDesc = 'Comissioning of Equipment' plandate = '2010-05-30' actualdate = "2010-06-15" / >
    < mx:Object PROJID = 'A4' = 'Transfer to regular use' projDesc plandate = "2010-04-23" actualdate = "2009-03-30" / >

    < / mx:ArrayCollection >

    < mx:ColumnChart id = "columnchart1" width = "100%" height = "100 percent" color = "black" dataProvider = "{acProjects}" >
    < mx:horizontalAxis >
    < mx:CategoryAxis categoryField = "projDesc" / >
    < / mx:horizontalAxis >
    < mx:series >
    < mx:ColumnSeries displayName = "Date" xField = 'projDesc"yField ="plandate"/ >

    < / mx:series >
    < / mx:ColumnChart >

    But with this code, I get something like this:

    Capture2.PNG

    In general, by default, the y-axis is always numbered. Is there a way where we can change to display date?

    Appreciate your help...

    -Deepak

    Use the DateTimeAxis:

    http://livedocs.Adobe.com/Flex/3/langref/MX/charts/DateTimeAxis.html

  • Flex 3 charts don't load the data and labels to display only [object Object]

    I have a Flex 3 table that gets its data from .NET Web Service. The card works fine when I test Flex Builder 3 but the chart does not display columns or labels when you access it from the server, for example http://localhost:2459/FlexChart/main.html

    Labels may not appear correctly. It just display [object Object] instead of the actual label and there are no columns/bars in the chart. Also, I traced the same data source for the chart to a data grid to make sure it receives the data from the web service and found out that he received the data correctly.

    Any ideas / thoughts will be appreciated. Thank you!

    So, I thought about it. It was because of the issue of security, but also something to do with the stack of view is displayed in the same order from the server, as it would locally.

  • How to compare the length of the data to a staging table with the definition of the base table

    Hello
    I have two tables: staging of the table and the base table.
    I get flatfiles data in the staging of the table, depending on the structure of the requirement of staging of the table and the base table (length of each column in the staging table is 25% more data dump without errors) are different for ex: If we have the city long varchar 40 column in table staging there 25 in the base table. Once data are discharged into the intermediate table that I want to compare the actual length of the data for each column in the staging table with the database table definition (data_length for each column of all_tab_columns) and if no column is different length that I need to update the corresponding line in the intermediate table which also has an indicator called err_length.

    so for that I use the cursor c1 is select length (a.id), length (b.SID) of staging_table;
    c2 (name varchar2) cursor is select data_length all_tab_columns where table_name = 'BASE_TABLE' and column_name = name;
    But we get atonce data in the first query while the second slider, I need to get for each column and then compare with the first?
    Can someone tell me how to get the desired results?

    Thank you
    Manoi.

    Hey, Marco.

    Of course, you can set src.err_length in the USING clause (where you can reference all_tab_columns) and use this value in the SET clause.
    It is:

    MERGE INTO  staging_table   dst
    USING  (
           WITH     got_lengths     AS
                     (
              SELECT  MAX (CASE WHEN column_name = 'ENAME' THEN data_length END)     AS ename_len
              ,     MAX (CASE WHEN column_name = 'JOB'   THEN data_length END)     AS job_len
              FROM     all_tab_columns
              WHERE     owner          = 'SCOTT'
              AND     table_name     = 'EMP'
              )
         SELECT     s.ename
         ,     s.job
         ,     CASE WHEN LENGTH (s.ename) > l.ename_len THEN 'ENAME ' END     ||
              CASE WHEN LENGTH (s.job)   > l.job_len   THEN 'JOB '   END     AS err_length
         FROM     staging_table     s
         JOIN     got_lengths     l     ON     LENGTH (s.ename)     > l.ename_len
                             OR     LENGTH (s.job)          > l.job_len
         )     src
    ON     (src.ename     = dst.ename)
    WHEN MATCHED THEN UPDATE
         SET     dst.err_length     = src.err_length
    ;
    

    As you can see, you have to hardcode the names of the columns common to several places. I swam () to simplify that, but I found an interesting (at least for me) alternative grouping function involving the STRAGG user_defined.
    As you can see, only the subquery USING is changed.

    MERGE INTO  staging_table   dst
    USING  (
           SELECT       s.ename
           ,       s.job
           ,       STRAGG (l.column_name)     AS err_length
           FROM       staging_table          s
           JOIN       all_tab_columns     l
          ON       l.data_length  < LENGTH ( CASE  l.column_name
                                              WHEN  'ENAME'
                                    THEN      ename
                                    WHEN  'JOB'
                                    THEN      job
                                       END
                               )
           WHERE     l.owner      = 'SCOTT'
           AND      l.table_name     = 'EMP'
           AND      l.data_type     = 'VARCHAR2'
           GROUP BY      s.ename
           ,           s.job
           )     src
    ON     (src.ename     = dst.ename)
    WHEN MATCHED THEN UPDATE
         SET     dst.err_length     = src.err_length
    ;
    

    Instead of the user-defined STRAGG (that you can copy from AskTom), you can also use the undocumented, or from Oracle 11.2, WM_CONCAT LISTAGG built-in function.

  • How to sort the data in the chart

    Hi, the data feeds that I show on my chart are a kind of account for each of their life cycle. For example, we have 20 in lifecycle = Production, 15 to life = pre direct cycle, 15 = testing life cycle, so on. I want to be able to sort the data by the nature of the life cycel, so in this case, the test-> advance live-> production rather than alphabetically. How to do this?

    Put a 2nd column in your report by using the field of life cycle and then write a CASE statement WHEN:

    CASE {cycle} during the 'Test' THEN 1
    WHEN 'pre Live' THEN 2
    and so on...
    ELSE 0 END

    Hide this column and use it as the sort order.

    see you soon
    Alex

Maybe you are looking for

  • Tecra R850, battery "plugged in, not charging".

    HelloI'd appreciate some thoughts on the problem. The problem:The battery is not charged. The icon in the status bar indicates that the battery is "connected" but that it is 'not charging' and 'remember to change your battery.Something similar to:htt

  • Computer stops unexpectedly

    While work just with my computer, the computer shuts down, no no warning, no blue screen no nothing. I downloaded the application log.  Here is the content of a newspaper at the time. Event type: errorEvent source: .NET Runtime Optimization ServiceEv

  • LaserJet Pro 400 (M401dn) paper jams of all trays

    Our Organization has just bought a M401dn brand new, and I've been setting up out of the box. After you have configured the IP, I went to print a report. The jams from tray 2 with the message "paper jam in cartridge area. Open door and clear jam'.» I

  • folder Windows will compress not do I need shellbrd.dll

    I tried to reduce my windows folder (in this moment is 17 GB) to give me more disk space (very slow pc) on a 32 GB L/top. All the others check the pc is clean, defraged, swept, blown, washed and dried. Told me to compress the folder but it stops sayi

  • All my programs have gone there program default open in Word 2007 how to change all the programs back to defuault there?

    All my programs are passed to the default opening program here as Word 2007 How do I change all the acknowledgement of programs to defuault there? I uninstalled the steps and it made no difference so I reinstalled and opened. Then he did the same as