in

Software FX Community

Discuss and find help for all Software FX products.

how to handle missing/null values ?

Last post 07-06-2009 1:52 AM by shobhit. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-26-2009 3:46 AM

    how to handle missing/null values ?

     Hi all,

    I have read few post earlier before posting this. I have one query which was not answered yet.

    I am using ChartFX 7 server for java installation on tomcat. I want to show  a line chart which is getting its data source from xml file which is composed in chartfx specific format.

    Question: If in my chartfx xml i have null values, how do i make chartfx aware of it and handle it appropriately? I just want a single API call to handle this situation instead of iterating through my data points and setting some different property for the missing value.

    Behavior Desired:  I want the chart fx to show the null value, plot it on the graph differently from the lines so the user is intimated of a missing value.


    R&D Done: I tried chartCurve.getData().setInterpolateHidden(false);  without success.

     

    Example of input XML: 

    <?xml version="1.0"?> <CHARTFX>
        <COLUMNS>
        <COLUMN NAME="c0" TYPE="String" DESCRIPTION="Product"/>
        <COLUMN NAME="c2_c1_0" TYPE="Double" DESCRIPTION="ABC PRODUCT"/>
        <COLUMN NAME="c2_c1_1" TYPE="Double" DESCRIPTION="KLM PRODUCT"/>
        <COLUMN NAME="c2_c1_2" TYPE="Double" DESCRIPTION="XYZ PRODUCT"/></COLUMNS>
        <ROW c0="PRODUCT NAME" c2_c1_0="4692.5" c2_c1_1="null" c2_c1_2="4118.8"></ROW></CHARTFX>

  • 07-03-2009 4:00 PM In reply to

    • Frank
    • Top 10 Contributor
    • Joined on 11-30-2006
    • USA

    Re: how to handle missing/null values ?

    Instead of setting the attribute to "null" simply remove the attribute from that row:

        <ROW c0="PRODUCT NAME" c2_c1_0="4692.5" c2_c1_2="4118.8"></ROW></CHARTFX>

    Francisco Padron
    www.chartfx.com
  • 07-06-2009 1:52 AM In reply to

    Re: how to handle missing/null values ?

    Yes Frank. That is the default thing which is happening currently.

     

    But omitting the null values would not allow the chart fx to plot any thing on the chart (skip the data point) . But this is NOT what I want. I know by design Chartfx is build to behave in that way, but is thier an alternate aproach I can take to some how pass some place holder in the xml which states that the data point is "null" and do the desired behaviour customized by user??

     

    Thanks,

    Shobhit

Page 1 of 1 (3 items)
Copyright 2008 Software FX, Inc.