Page 1 of 1

Null value bug

Posted: Sun Oct 20, 2013 3:02 am
by 17466735
1. I want to know how to add "null" value to a Bar.
Please refer to the attchment, which is waht i want.
There is an empty value among a value list.e.g.,[2,4,3, ,44,55]
How can i create a bar based on this value list?

In TeeChart, I try the following code, but it fails..

Bar series = new bar(tChart2.getChart());
series.add(2);
series.add(4);
series.add(3);
series.add(null); //this is impossible
series.add(44);
series.add(55);


2. by the teechart example,
I know that i can use the following code to do this:
series.setNull(3);//index 3
Are there any other method to do this task?


What's more, in the example: "Chart Styles/ Standard /Line(Strip)/ Line/Horizontal line TreatNulls"
When i choose "Don't paint", the 12th is not painted, but the 13th still is painted.
I think both of them should not be painted.



Thanks

Re: Null value bug

Posted: Thu Oct 24, 2013 2:49 am
by 17466735
I want to add null to a bar.
The TeeChart example is about line.
So i use bar.addNull().

there are several null values, so i use
bar.add(3); bar.addNull(). bar.add(4), then bar.addNull()

IndexoutofBoundsExpection Error happens.

Re: Null value bug

Posted: Thu Oct 24, 2013 3:08 am
by 17466735
Because the above approach fails.
So i search this forum to find more useful information.

I find http://www.teechart.net/support/viewtop ... ull#p56858
which contain the following code:

Code: Select all

  tChart1.getAspect().setView3D(false);
      
      for (int i=0; i<3; i++) {
         Bar b = new Bar(tChart1.getChart());
         b.fillSampleValues();
         b.setNull(2);
         if (i>0) b.setNull(3);
         if (i>1) b.setNull(4);
      }
I try the code, but my result is different , all the bars are painted even setNull().
I am using the latest version.
Could you please try it in the latest version..
Thanks.

Re: Null value bug

Posted: Thu Oct 24, 2013 8:56 am
by yeray
Hi,

It's a known bug already int he wish list to be fixed for future releases (TJ71016752). We'll try to fix it for the upcoming releases.
I'm afraid I can't think on a workaround at the moment.

Re: Null value bug

Posted: Fri Feb 07, 2014 7:44 am
by 17466735
Hello, I try the new version TeeChart Java v3.2013.1219 version.

I find a problem, it as follows.

Code: Select all

        tChart = new TChart();
    Series bar = new Bar(tChart.getChart());
    bar.add(-10); //null  showed
    //bar.add(10);  //null  not showed.
    bar.addNull();
    bar.add(5);
    bar.add(6);
if i use bar.add(-10), it will result that Null will be showed. (Null-2.png)
however, if i use bar.add(10), it will result that Null will not be showed. (Null-1.png)

I think in both cases the null should not be showed.
Thanks.

Re: Null value bug

Posted: Fri Feb 07, 2014 4:32 pm
by yeray
Hi,
rubby wrote:if i use bar.add(-10), it will result that Null will be showed. (Null-2.png)
however, if i use bar.add(10), it will result that Null will not be showed. (Null-1.png)
If I scroll down the chart, I also see the null value drawn when bar.add(10) is being used. It's just that it's so thin that it's not visible with the default axis scale.
rubby wrote:I think in both cases the null should not be showed.
I've added it to the bug tracker:
http://bugs.teechart.net/show_bug.cgi?id=565
Feel free to add your mail to the CC so you'll receive an notice when the status of the ticket will change.