Line chart with nested < XML > node

Hello

I use a Flex 3 line chart.

The table gets its data from a remote through < mx:HTTPService > as XML file:

< mx:HTTPService id = "myServ" url = "MyChartData.xml" / >

I want the chart to draw for all nodes that fall under each set of nodes for the < node > values:

nodes <>

< nodeset id = "1" >

<>node

<>node

< / nodeset >

< nodeset id = "2" >

<>node

<>node

< / nodeset >

< / node >

The graph is get mapped out when I use the dataProvider for only the first internal as node:

myServ.lastResult.nodes.nodeset [0] .node

How to get the graph plotted for all interior nodes?

The mxml:

--------------------------

< mx:LineChart id = "myChart" width = "100%" height = "100%" showDataTips = "true" dataProvider = "{myServ.lastResult.nodes.nodeset.node}" >

< mx:horizontalAxis >

< mx:CategoryAxis categoryField = "time" title = "Node value" / >

< / mx:horizontalAxis >

< mx:verticalAxis >

< mx:LinearAxis title = "Interval" / >

< / mx:verticalAxis >

< mx:series >

< mx:LineSeries id = "myLineSeries1" xField = "time" yField = "value" / >

< / mx:series >

< / mx:LineChart >

The XML code example:

--------------------------

<? XML version = "1.0" encoding = "utf-8"? >

nodes <>

< id nodeset = "1" >

< period node = "01" >

< value > - 115 < / value >

    </node>

< period node "02" = >

< value > - 115 < / value >

    </node>

< period node = "03" >

< value > - 114 < / value >

    </node>   

< period node '04' = >

< value > 0 < / value >

    </node>

</nodeset>

< nodeset id = "2" >

< period node '05' = >

< value > - 114 < / value >

    </node>

< period node "06" = >

< value > 0 < / value >

< / node >

< period node "07" = >

< value > 0 < / value >

< / node >

< period node '08' = >

< value > 0 < / value >

    </node>

< / nodeset >

< / node >

HTTPService.resultFormat = "e4x";

The default value is object that will play not well what attributes. XML would work too, but e4x extends with a few useful shortcuts.

Tags: Flex

Similar Questions

  • line chart with a single point of data not displaying not

    I work with the line chart and I am facing problem
    (1) if I get a data with a single point to draw, the graphic is not
    the graphic line required at least 2 data raising the graph appear
    How to make a graph to display when I get one record in my
    data provider.

    I'm housing one gettong point (x, y) in a single record.
    so this table does not appear I need two points, two points (x 1, y1) and
    (x 2, y2)
    y at - it a solutioin to draw the line chart with a point (x, y) and
    show some points in the chart?

    Looking forward to hear from you guyzz, thanks for looking into it.

    Thank you

    I tried in IE and Firefox - everything is OK.

    What version on FP for IE and Firefox are you using?

  • Fill Combobox with nested XML

    Hello!
    How can I fill a ComboBox with an XML retrieved via a HTTPService?

    My XML looks like

    <? XML version = "1.0" encoding = "iso-8859-1? >
    < xml >
    < node label = value '1' = 'a' / >
    < node label = value "2" = "b" >
    < node label = "21" value = "ba" / >
    < node label = '22' value = 'bb' / >
    < node label = "23" value = "bc" / >
    < / node >
    < node label = '3' value = 'c' / >
    < node label = "4" value = "d" / >
    < node label = '5' value = 'e' / >
    < / xml >

    The output you want in the drop-down list would be

    one
    b
    -ba
    -bb
    Colombia-British
    c
    d
    e

    < mx:ComboBox id = "selectedLevel" dataProvider = labelField 'structure of {}"="label"/ >

    'structure' is an XMLListcollection, looks like my Resulthandler

    structure = new XMLListCollection (event.result.node);


    Can someone give me a hint what is missing?

    Thank you.

  • Creating a line chart series multi with different data providers

    I have 3 providers of data of the same structure that is ArrayCollection of data collection and that you want to use to create a line chart multiseriate. I don't have just 1 dataProvider that can be used but 3 different data providers of the same structure I want to use each different series.

    [Bindable] private var orangeSales: ArrayCollection = collection

    new ArrayCollection collection)

    [{sale: 101000, month: new Date (January 1, 2008 "")},]

    {sale: 960000, month: new Date (February 1, 2008 ')},

    {sale: 475000, month: new Date (March 1, 2008 ')},

    {sale: 425000, month: new Date (April 1, 2008 "")}

    ] );

    [Bindable] private var appleSales: ArrayCollection = collection

    new ArrayCollection collection)

    [{Sales: 991000, month: new Date (January 1, 2008 "")},]

    {sale: 140000, month: new Date (February 1, 2008 ')},

    {sale: 565000, month: new Date (March 1, 2008 ')},

    {sale: 255000, month: new Date (April 1, 2008 "")}

    ] );

    [Bindable] private var bananaSales: ArrayCollection = collection

    new ArrayCollection collection)

    [{sale: 891000, month: new Date (January 1, 2008 "")},]

    {sale: 147560, month: new Date (February 1, 2008 ')},

    {sale: 295000, month: new Date (March 1, 2008 ')},

    {sale: 574000, month: new Date (April 1, 2008 "")}

    ] );

    I want to create a line chart with orangeSales, appleSales and bananaSales as three different lines on the graph for different specified dates.

    < mx:ColumnChart showDataTips = "true" >

    < mx:horizontalAxis >

    < mx:CategoryAxis

    dataProvider = "{orangeSales}".

    categoryField = 'months '.

    / >

    < / mx:horizontalAxis >

    < mx:series >

    < mx:LineSeries displayName = "OrangeSales" yField = "sale" xField = "month" dataProvider = "{orangeSales}" / >

    < mx:LineSeries displayName = "AppleSales" yField = "sale" xField = "month" dataProvider = "{appleSales}" / >

    < mx:LineSeries displayName = "BananaSales" yField = "sale" xField = "month" dataProvider = "{bananaSales}" / >

    < / mx:series >

    < / mx:ColumnChart >

    Help, please!

    Sorry for the confusion. In fact I do something wrong, such as using ColumnChart to display a line chart or something like that.

    Now, I realized that a multi series line graph can be built by the presence of a different data provider for each of the LineSeries object.

    If the code below would create a multi series line graph:

    [Bindable] private var orangeSales: ArrayCollection = collection

    new ArrayCollection collection)

    [{sale: 101000, month: new Date (January 1, 2008 "")},]

    {sale: 960000, month: new Date (February 1, 2008 ')},

    {sale: 475000, month: new Date (March 1, 2008 ')},

    {sale: 425000, month: new Date (April 1, 2008 "")}

    ] );

    [Bindable] private var appleSales: ArrayCollection = collection

    new ArrayCollection collection)

    [{Sales: 991000, month: new Date (January 1, 2008 "")},]

    {sale: 140000, month: new Date (February 1, 2008 ')},

    {sale: 565000, month: new Date (March 1, 2008 ')},

    {sale: 255000, month: new Date (April 1, 2008 "")}

    ] );

    [Bindable] private var bananaSales: ArrayCollection = collection

    new ArrayCollection collection)

    [{sale: 891000, month: new Date (January 1, 2008 "")},]

    {sale: 147560, month: new Date (February 1, 2008 ')},

    {sale: 295000, month: new Date (March 1, 2008 ')},

    {sale: 574000, month: new Date (April 1, 2008 "")}

    ] );

    I want to create a line chart with orangeSales, appleSales and bananaSales as three different lines on the graph for different specified dates.

    <>

    dataProvider = "{orangeSales}".

    categoryField = 'months '.

    />

  • help in hiding and showing the series in a line chart

    Hello world

    I have a line chart with 8 sets of data and I would have checkboxes to show and hide each series, if the graph is not too busy.

    How can I do this?

    Thank you
    Ryan

    Hello Ryan,

    If you use the library AnyChart which is provided by default in the APEX of the following links may help:

    [url http://www.anychart.com/products/anychart/docs/users-guide/livesamples/js-series/index.html] Adding, deleting, changing, hiding and showing Series - AnyChart JavaScript interactivity

    {: identifier of the thread = 2201947}

    I hope that helps!
    Kind regards
    Kiran

  • Find the empty XML node on a table with 15 M lines

    I have a query that runs to always seek to empty xml node.

    CREATE TABLE TEST_TAB (ID number, doc XMLTYPE);

    SELECT COUNT (1)

    OF test_tab

    WHERE ((XMLEXISTS (declare default element namespace "http://oracle.com/»;)))  * / EmployeeNode / text () [not (empty (.))]'

    PASSAGE DOC)));

    Are there specific oracle or operator XML text that is more effective to check null values or a specific type of text/xml index that is best suited looking for nulls in the whole of nodes?

    Thank you

    Kevin

    In the meantime, here's a test on a similar scenario.

    It seems that the structured XMLIndex gives the best response time. The obvious drawback is that she is very specific and cannot be used to solve other queries.

    SQL > drop table test_tab is serving;

    Deleted table.

    SQL > create table test_tab like

    2. select id, cast (level as number)

    3, xmlparse (document

    4'http://xmlns.example.org ">"

    5         || -case when mod (level 5) = 0 then end level

    6         || '' correct

    (7) doc

    8 double

    9 connect by level<= 100000="">

    Table created.

    SQL > set timing on

    SQL > define pages 100

    SQL > set lines 200

    SQL > set autotrace on explain

    SQL >

    SQL > exec dbms_stats.gather_table_stats (user, 'TEST_TAB');

    PL/SQL procedure successfully completed.

    Elapsed time: 00:00:00.92

    SQL > select count (*)

    2 of test_tab

    3 where (xmlexists)

    4 ' declare default element namespace "http://xmlns.example.org"; / root/item/Text () '

    5 passage doc

    6  ) ;

    COUNT (*)

    ----------

    20000

    Elapsed time: 00:00:09.09

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 2371188561

    --------------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    --------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |          |     1.   125.   271 (1) | 00:00:04 |

    |   1.  GLOBAL TRI |          |     1.   125.            |          |

    |*  2 |   FILTER |          |       |       |            |          |

    |   3.    TABLE ACCESS FULL | TEST_TAB |   100K |    11 M |   269 (1) | 00:00:04 |

    |   4.    XPATH EVALUATION.          |       |       |            |          |

    --------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    2 filter (EXISTS (SELECT 0 FROM))

    XPATHTABLE ('/ oraxq_defpfx:root / oraxq_defpfx:Item / Text () ' PASSING: B1)

    PATH OF XMLTYPE COLUMNS ' C_00$ ' '.')  "P"))

    SQL >

    With the index structured:

    SQL >

    SQL > create index test_tab_sxi on test_tab (doc)

    2 indextype is xdb.xmlindex

    () 3 parameters

    4Q ' {XMLTABLE test_tab_xt

    5 XMLNAMESPACES (default 'http://xmlns.example.org'),

    6 ' / root/item / text () '

    {7 item_value PATH VARCHAR2 COLUMNS (30) '.'} "

    8  ) ;

    The index is created.

    Elapsed time: 00:00:10.13

    SQL >

    SQL > exec dbms_stats.gather_table_stats (user, 'TEST_TAB');

    PL/SQL procedure successfully completed.

    Elapsed time: 00:00:01.69

    SQL >

    SQL > select count (*)

    2 of test_tab

    3 where (xmlexists)

    4 ' declare default element namespace "http://xmlns.example.org"; / root/item/Text () '

    5 passage doc

    6  ) ;

    COUNT (*)

    ----------

    20000

    Elapsed time: 00:00:00.18

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 3461631238

    -------------------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    -------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |             |     1.    28.   290 (1) | 00:00:04 |

    |   1.  GLOBAL TRI |             |     1.    28.            |          |

    |*  2 |   HASH JOIN RIGHT SEMI |             | 22015 |   601K |   290 (1) | 00:00:04 |

    |*  3 |    TABLE ACCESS FULL | TEST_TAB_XT | 22015 |   343K |    20 (0) | 00:00:01 |

    |   4.    TABLE ACCESS FULL | TEST_TAB |   100K |  1171K |   269 (1) | 00:00:04 |

    -------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    2 - access ("TEST_TAB". ROWID = "SYS_SXI_0." ("' RID ')

    3 - filter("SYS_SXI_0".") ITEM_VALUE' IS NOT NULL)

    With an index not structured:

    SQL > drop index test_tab_sxi;

    The index is deleted.

    Elapsed time: 00:00:00.11

    SQL >

    SQL >

    SQL > create index test_tab_uxi on test_tab (doc)

    2 indextype is xdb.xmlindex

    3 parameters ("PATH of TABLE test_tab_pt

    4 PATHS (INCLUDE (/ root/point))

    (5 MAPPING of namespace (xmlns = "http://xmlns.example.org"))');

    The index is created.

    Elapsed time: 00:01:20.99

    SQL >

    SQL > exec dbms_stats.gather_table_stats (user, 'TEST_TAB');

    PL/SQL procedure successfully completed.

    Elapsed time: 00:00:06.56

    SQL >

    SQL > select count (*)

    2 of test_tab

    3 where (xmlexists)

    4 ' declare default element namespace "http://xmlns.example.org"; / root/item/Text () '

    5 passage doc

    6  ) ;

    COUNT (*)

    ----------

    20000

    Elapsed time: 00:00:00.45

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 2464052102

    ---------------------------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | TempSpc | Cost (% CPU). Time |

    ---------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |             |     1.    42.       |   773 (1) | 00:00:10 |

    |   1.  GLOBAL TRI |             |     1.    42.       |            |          |

    |*  2 |   HASH JOIN RIGHT SEMI |             |  6547 |   268K |  2176K |   773 (1) | 00:00:10 |

    |*  3 |    TABLE ACCESS FULL | TEST_TAB_PT | 53020 |  1553K |       |   283 (2) | 00:00:04 |

    |   4.    TABLE ACCESS FULL | TEST_TAB |   100K |  1171K |       |   269 (1) | 00:00:04 |

    ---------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    2 - access ("TEST_TAB". ROWID = "SYS_P0." ("' RID ')

    3 - filter("SYS_P0".") PATHID "= HEXTORAW ('061D') AND"

    SYS_XMLI_LOC_ISTEXT ("SYS_P0". "LOCATOR", "SYS_P0" "." " PATHID') = 1)

    (tested on 11.2.0.2)

  • 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"? :-)

  • Creating a line chart PDF-report generator model with APEX

    Hi all

    I would like to create a PDF report with a chart using Apex and the generator plugin model for Word.

    My Select statement, which I use as the report (shared components) query returns the data in the following way:

    Date Description amount

    ----                 -----                -----

    01.01.2014 has 1.2

    02.01.2014 has 1.3

    03.01.2014 has 0.5

    01.01.2014 B 0.3

    02.01.2014 B 4.5

    03.01.2014 B 4.8

    The XML document obtained, which creates the APEX, is:

    <? XML version = "1.0" encoding = "UTF-8"? >

    < DOCUMENT >

    < DATE > 08/10/2014 < / DATE >

    ADMIN < user_name > < / username >

    < > 102 APP_ID < / APP_ID >

    < APP_NAME > Oracle APEX AppBuilder < / APP_NAME >

    < /Title > < TITLE > graph

    < REGION ID = "0" >

    rowset <>

    < ROW >

    < date > < / Date >

    < DESCRIPTION > < / DESCRIPTION >

    < value > < / value >

    < / ROW >

    < / LINES >

    < / REGION >

    < / DOCUMENT >

    What I would like to have is a line graph with:

    • Date on the x-axis
    • Length of value on axis y
    • for each Description of Type single line

    The names and numbers of the discription varies a lot (as well as the values that they are related to the Description and date).

    What I tried:

    A lot, trying to make this work for 4 weeks, on and outside.

    Tried to edit the chart XML in Word, edit the SQL query, pivot the result SQL to get the Descriptions as columns and of course a lot of Googling.

    Please let me know if you have any advice.

    Thanks in advance,

    Thomas

    Oracle DB: 11g

    ApEx Version: 4.2.5.00.08

    Last Oracle BI Builder Plugin for Word template

    Finally found my Solution. What I was looking for is:

  • XML nodes with periods Plugin-reading

    We use the XML plugin to read the answer and create queries for REST operations, and it works pretty well until some new rest calls.  We can now retrieve XML containing periods in node names.  We cannot find a way to read this.  Here's a simple example, because there is a period between node.one I can't seem to get the value of ID.  I tried to use a------escape characters for the period, but the vCO throws an exception.

    Any help would be greatly appreciated.

    contentAsString = < root >

    < node.one >

    < id > 5 / < ID >

    < node.one >

    < / root >;

    contentAsString = contentAsString.toString ();

    XmlDocument = new XML (contentAsString);

    System.log ("Total Machine Count:" + xmldocument.node.one.id);

    Note: if I take the period off node.one it will work fine, but I have no control over the XML I was getting, so I can't do that.

    Hello

    You can try with the XMLManager and its objects associated with this (a little more talkative) approach and scripts:

    var document = XMLManager.fromString (contentAsString) .getDocumentElement ();
    var count = document.getElementsByTagName("node.one").item (0).getElementsByTagName("id").item (0) .textContent;
    System.log ("Total Machine Count:" + count);

    The problem with the direct approach, it is in line with the 'xmldocument.node.one.id' script code, it is not possible to say if 'on' part of the name of the node ("node.one") or it is a property of the node 'node' (once again "node.one"). The same thing happens if instead of a point ("". "") you have a hyphen (""-"") for example, from writing scripts inside it would be interpreted as a subtraction of two variables. But if you had a line of underscores ('_') it should work.

    I hope it helps.

    Sergio

  • Replace the current XML node with another node in XML fragments

    Hello

    Please help, trying to replace an XML node with other fragments XML using XML DB, updateXML/deleteXML functions don't receive the desired result, on the front of the image below, this is what I have, and the transom is the replacement with new values XML fragment, I expect to see, there is a list of records from the XML that I need to open and do the replacement of the < broker-retail > according to the number of records to be inserted.

    Before the photo:

    < Broker-benefits-link >

    < hpp-rule > 0 < / hpp-rule >

    LISP < in.-CVCA-benefits-type > < / po-CVCA-benefits-type >

    < commit / >

    <broker-retail >

    < broker-entity-not > 1000947836 < / broker-entity-not >

    < broker-pct > 100 < / broker-pct >

    Y < principal > < / main >

    < / broker-retail >

    < / Broker-benefits-link >


    After photo (expected result):

    < Broker-benefits-link >

    < hpp-rule > 0 < / hpp-rule >

    LISP < in.-CVCA-benefits-type > < / po-CVCA-benefits-type >

    < commit / >

    <broker-retail >

    < broker-entity-not > 65656524 < / broker-entity-not >

    < broker-pct > 25 < / broker-pct >

    N < principal > < / main >

    < / broker-retail >

    <broker-retail >

    < broker-entity-not > 122224444 < / broker-entity-not >

    < > 75 broker-pct < / broker-pct >

    Y < principal > < / main >

    < / broker-retail >

    < / Broker-benefits-link >

    Kind regards

    Qwestion

    You can use DELETEXML and INSERTCHILDXML

    SQL> set long 10000
    SQL> column xmldata_new format a100
    SQL> set linesize 150
    SQL>
    SQL> with t
      2  as
      3  (
      4  select
      5  xmltype('
      6    0
      7    LISP
      8    
      9    
     10      1000947836
     11      100
     12      Y
     13    
     14  ') xmldata from dual
     15  )
     16  select xmlserialize
     17         (
     18             document
     19             insertchildxml
     20             (
     21                deletexml
     22                (
     23                    xmldata
     24                  , '/broker-benefit-link/broker-detail'
     25                )
     26              , '/broker-benefit-link'
     27              , 'broker-detail'
     28              , xmltype
     29                (
     30                '
     31                    
     32                        65656524
     33                        25
     34                        N
     35                    
     36                    
     37                        122224444
     38                        75
     39                        Y
     40                    
     41                 ').extract('/broker-master/broker-detail')
     42             )
     43             as clob indent size = 2
     44         ) xmldata_new
     45    from t;
    
    XMLDATA_NEW
    ----------------------------------------------------------------------------------------
    
      0
      LISP
      
      
        65656524
        25
        N
      
      
        122224444
        75
        Y
      
    
    
    SQL>
    
  • Anyway do not draw data points as nodes on a line chart?

    I have no use for the each data point = function node on my chart, and I suspect that's the reason why in my application performance is very poor. I have a line chart which can be composed of several hundreds, or even thousands, individual data points----> I can not afford to draw a node for each of these points when he didn't need to do. I just need the line between the drawn points.

    A quick ogle at the JavaDoc reveals no obvious way to do it. I can remove the Visual effect in CSS - and I have - but the nodes are still created.

    How can I prevent the JavaFX creating a node for each point?

    I have the same problem: try to use

    lineChart.setCache(true);
    lineChart.setCacheHint(CacheHint.SPEED);
    

    This should speed up your data series

  • Help with the line chart

    I created a line chart in Illustrator CS3.  Everything is great, except that I need to change the colors of the lines.  There are two lines total.  I can't select just one line to change the color.  When I use the white arrow selection tool he will choose only a point-by-point and not the whole line.

    If I use the black arrow selection tool then selects all of the chart.

    Thanks a lot for any help on this!

    It's fine even if you have a selected point you can change the color of the line, make sure you change the color of the outline, not the color of the file.

    If you want to be treated and have all selected Bézier points (or select all lines in a group), hold the option key and click with the hollow tool to select all Bézier points. Option click again to select multiple levels within the group. The result will be the same whether in the postscript file produced Illustrator.

  • Chart with graphic behavior

    I would ask for advice about how to best manage the following scenario:

    I often update a XY Chart, with 12 curves. I created a Subvi ActionEngine which acts as a buffer (add points, read out data) of the graph, and has a few other actions, like emptying the buffer, decimating the data points, etc. So at 1 Hz rate I send data to this XYGraph 12 curves, and it will redraw, everything is OK.

    There are 12 permanent tasks of data acquisition, with a frequency of 1 Hz, I want to show the user how to change the curves. It is also important to have a line of vertical slider so that the user can examine the values to different timestamps (X - values are absolute timestamps). Everything works fine, except that when I turn off the X-autoscale, if the user cannot see lets say the last hour of data points (3600 X 12 points curves, I know I should decimate usually, but LabView usually completely manipulates the situation OK when you have several points and pixels... at least then I can live with that).

    So the problem: If X autoscale is disabled and I have send new data to the chart sets every second, the chart does not display the points on the right side, as in the case of a graph. Shell how I make the chart handle this situation? Shell, I put the 'max' (X-scale - range - Maximum property) of the scale-x via property nodes every second? Is this OK to do? Any other idea?

    A kind of workaround would be to use a chart XY-Graph. The user could inspect lets say later 1 hour of data with the table (or disable autoscale, the last minutes if necessary) and the XY-Graph would work as an overview, the user can manually update by a button and after the game with the zoom features, etc...

    What do you think? How do you manage such a request for data acquisition? If the user needs to see what is happening recently with curves (pressure, flow rates, temperatures), but also be able to examine the evolution of the curves of the last 24 hours...

    Edit: hmm, usually I get new ideas after writing my problem I think I try to attack the problem from the wrong side: instead of fighting with the properties of the graph, I could just create a 'Set Range' action in my Subvi buffer, so when the user wants to see lets say that the last 10 minutes of data , I only send these data to the Subvi points to the curve... hmm I think this would be a more pleasant solution... What do you think?

    Here are a few options. You may want to consider depending on your actual application:

    1. A graph-based mouse event opens a new VI, where you put all the data that you want and let the user to play with him. When they are done, they close and you will return to the live graph. It's somehow easier, because you are working on a separate copy.
    2. The range of the actual data fed to the curve is controlled by a separate scrollbar X. The scale is then set to autoscale. When the user changes the value of the bar to scroll or zoom, you stop the chart update. That you take back the update after a time-out or after the user makes the scrollbar of the max value or after they have pushed a button to refresh.
    3. Feed you all the data in the chart, but you control the X scale. In this case, you must still decide when to stop the change of scale and when come back.
  • generated writing XML to a file after comparing with other XML

    Hello

    I made the comparison of the two XML now, I have an obligation to concat these two xml but also necessary to add the XML code with a status node that is after comparing the two displayed XML is Y or N, so if it is there then a node with

    < status > Y < / status >

    < of table > t1 < / table >

    then by completing the tasks that I have to write to a file

    declare

    p_emp_info CLOB.

    l_emp_tab xmlsequencetype: = xmlsequencetype();

    BEGIN

    I'm IN (SELECT id from emp WHERE emp_name = 'ABC') LOOP

    l_emp_tab.extend;

    SELECT XMLELEMENT ("ABCD",

    XmlElement ("ID", i.ID))

    IN l_emp_tab (i)

    FROM dual;

    END LOOP;

    SELECT XMLELEMENT ("EMP"

    XMLAGG (t.column_value))

    IN p_emp_info

    TABLE (l_emp_tab) t;

    -Dbms_Output.put_line (getclobval (1,2));

    EXCEPTION

    WHILE OTHERS THEN

    Dbms_Output.put_line(SQLCODE||) SQLERRM);

    END;

    I'm using this query, but it gives me an error that the expression is of the wrong type on this line {IN l_emp_tab (I)}

    I am unable to find the error what I'm missing here!

    You have changed the data type of I the example that Odie that gave you in

    repeating nodes using loop but when XML string concating then concating only last iteration of the loop FOr?

    In his case, I was a number.  In your code above, I have now is the set of rows in a cursor.

    You can rewrite your version to look like

    declare
      p_emp_info     XMLTYPE;
      l_emp_tab      xmlsequencetype := xmlsequencetype();
      l_pos          PLS_INTEGER;
    
      CURSOR c_info IS
        SELECT id
          from emp
         WHERE emp_name='ABC';
    
    BEGIN
    
      FOR r_info IN c_info LOOP
        l_emp_tab.extend;
        l_pos := c_info%ROWCOUNT;
        SELECT XMLELEMENT("ABCD",
               XMLELEMENT("id",r_info.id))
          INTO l_emp_tab(l_pos)
          FROM dual;
      END LOOP;
      SELECT XMLELEMENT("EMP"
                           ,XMLAGG(t.column_value))
        INTO p_emp_info
        FROM TABLE(l_emp_tab) t;
    
      --Dbms_Output.put_line(p_emp_info.getclobval());
    END ;
    

    You can use the % c_info number of LINES in the INTO clause, hence the l_pos.

    Or you can rewrite to be

    declare
      p_emp_info   XMLTYPE;
      l_clob       CLOB;
    BEGIN
    
      SELECT XMLElement("EMP",
               XMLAgg(XMLElement("ABCD",
                        XMLElement("id",e.id))))
        INTO p_emp_info
        FROM emp e
       WHERE emp_name = 'ABC';
    
      SELECT XMLSERIALIZE(DOCUMENT p_emp_info AS CLOB)
        INTO l_clob
        FROM DUAL;
    
      Dbms_Output.put_line(l_clob);
    END;
    

    Both produce the same XML file.

  • Alteration of the content of an XML node in java

    Hi all

    I change the contents of an XML node using java, using the method of setTextContent() a node.

    Sometimes I also add child nodes of a node. In this case, when I add the child nodes of a given node, when I print the xml data, I see the added nodes.

    for example:

    Initial XML:

    < a > < / a >
    < b > < / b >
    < c > < / c >


    For my project requirement, based on certain conditions, I do 'a' 'b', 'c' as children nodes nodes. I reached this output.


    The problem is

    FINAL XML:

    < a > < b > < / b > < c > < / c > < / a >


    I get the nodes children in the same line as above. But the power required should be as below.


    REQUIRED XML

    < a >
    < b > < / b >
    < c > < / c >
    < /a >

    I also used the Doc.normalize () function. But still, it helps strength.

    Kindly help me in this regard.

    Thank you
    Sabarisri. N

    Hello

    You can try to transform the result as below:

    Transformer transformer = TransformerFactory.newInstance () .newTransformer ();
    transformer.setOutputProperty (OutputKeys.INDENT, 'yes');

    initialize the StreamResult with the object of the file to save to file
    StreamResult result = new StreamResult (new StringWriter());

    DOMSource source = new DOMSource (doc); Here, the doc is you XML document.
    transform. Transform (source, result);

    String xmlString = result.getWriter (m:System.NET.SocketAddress.ToString ());
    System.out.println (xmlString);

    Thank you best regards &,.
    Nilesh Sahni (www.infocepts.com)

    Published by: Nilesh on August 30, 2011 12:31

Maybe you are looking for