Null value bug

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
rubby
Newbie
Newbie
Posts: 38
Joined: Mon Aug 12, 2013 12:00 am

Null value bug

Post by rubby » Sun Oct 20, 2013 3:02 am

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
Attachments
1.jpg
1.jpg (37.91 KiB) Viewed 3697 times

rubby
Newbie
Newbie
Posts: 38
Joined: Mon Aug 12, 2013 12:00 am

Re: Null value bug

Post by rubby » Thu Oct 24, 2013 2:49 am

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.

rubby
Newbie
Newbie
Posts: 38
Joined: Mon Aug 12, 2013 12:00 am

Re: Null value bug

Post by rubby » Thu Oct 24, 2013 3:08 am

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.

Yeray
Site Admin
Site Admin
Posts: 8726
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Null value bug

Post by Yeray » Thu Oct 24, 2013 8:56 am

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

rubby
Newbie
Newbie
Posts: 38
Joined: Mon Aug 12, 2013 12:00 am

Re: Null value bug

Post by rubby » Fri Feb 07, 2014 7:44 am

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.
Attachments
Null-1.png
Null-1.png (13.02 KiB) Viewed 3408 times
Null-2.png
Null-2.png (13.32 KiB) Viewed 3414 times

Yeray
Site Admin
Site Admin
Posts: 8726
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Null value bug

Post by Yeray » Fri Feb 07, 2014 4:32 pm

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply