|
Errors (or mis-handlind data) on NO VALUE ie 1.7E+308. in box plots |
Posted by Daniel on Mar-31-2017 19:04 |
|
Hi Peter,
As a general pattern Chartdirector is quite efficient when when handling missing values. Which is a very good point!
But I recently discovered our box plots were not using the ChartDirector.API.NoValue CONSTANT when building Tukey's data boxes.
I just tried since we have use-cases when:
A) the midpoint is known and the boxes values are not,
B) the box top and bottom values are unknown and the is not,
C) cases were whiskers are incomplete as well.
It looks like Chartdirector does not the case A) like been fed with a midpoint only. In this case it looks like feeding ChartDirector.API.NoValue is not working properly.
As a replacement, we will of course feed the the box top and bottom values with the midpoint values, but sure that would be fine if the addBoxWhiskerLayer could handle the NO VALUE in a way that would be consistent with the API.
That's possibly just a minor tweak:)
Thanks for this wonderful product again by the way!
Regards - Daniel in Paris |
Re: Errors (or mis-handlind data) on NO VALUE ie 1.7E+308. in box plots |
Posted by Peter Kwan on Mar-31-2017 23:26 |
|
Hi Daniel,
Are you using ChartDirector for ASP/COM/VB?
I am not sure exactly what is known and what is unknown in case (A). I have attached a box-whisker chart example for your reference. In "Group C", I have set the boxTop and boxBottom to cd.NoValue. In "Group F", I have set everything to cd.NoValue except the midpoint. In both cases, it works correctly.
Is it possible to modify the attached sample code to illustrate (A) so as to help me understand the issue?
Regards
Peter Kwan
|
Re: Errors (or mis-handlind data) on NO VALUE ie 1.7E+308. in box plots |
Posted by Daniel on Apr-01-2017 19:16 |
|
Hi Peter,
Thanks for the detailed and fast answer:)
Are you using ChartDirector for ASP/COM/VB?
Yes, I do
I am not sure exactly what is known and what is unknown in case (A). I have attached a box-whisker chart example for your reference. In "Group C", I have set the boxTop and boxBottom to cd.NoValue. In "Group F", I have set everything to cd.NoValue except the midpoint. In both cases, it works correctly.
From what I see in your samples it should work properly. I am using here the tool for relatively heavy display - these Tukey's boxes work quite well on heavy data sets.
That's can possibly be related to the tool used- via COM - and improper type-casting. That may as well be an error on my side on these heavy data sets. The sheer number of boxes may have some side impact.
Is it possible to modify the attached sample code to illustrate (A) so as to help me understand the issue?
I'll make sure to build one in the coming days.
Regards - Daniel |
Re: Errors (or mis-handlind data) on NO VALUE ie 1.7E+308. in box plots |
Posted by Daniel on Apr-02-2017 17:50 |
|
Just a short addendum,
This is all about the whiskers:) Not the boxes themselves, not top and bottom values. I just ran a short test pushing 0 instead of 1.7E+308. It just works fine with zeros. It looks like, possibly, NO VALUE may not be welcome in extrema values (min and max values in CD API).
Will come with a detailed sample later. As I said, this all about thick samples that are database-driven, it's a bit tedious to investigate.
Thanks again for the great work and effective support on this forum:)
Daniel |
Re: Errors (or mis-handlind data) on NO VALUE ie 1.7E+308. in box plots |
Posted by Daniel on Apr-02-2017 17:58 |
|
Error on this addendum! Forget about it. This hurried post is just plain wrong!
I'll come back with detailed and ad hod information in a post later this weeK.
Sorry for the disturbance - Daniel |
Re: Errors (or mis-handlind data) on NO VALUE ie 1.7E+308. in box plots |
Posted by Peter Kwan on Apr-03-2017 22:29 |
|
Hi Daniel,
One issue you may look at is how your code actually creates the cd.NoValue. I mentioned this because in your subject you mentioned 1.7E+308, not cd.NoValue.
Normally, people would store cd.NoValue in the database. It is because cd.NoValue is a ChartDirector constant. If it is stored in the database, then other software that may use the database would not understand what it means. Instead, the missing value should be represented using "null" or some value supported by your database.
After the data are read from the database, your code then replace the "null" with cd.NoValue because passing the data arrays to ChartDirector. In the code, there should be no reference to 1.7E+308, only cd.NoValue.
Regards
Peter Kwan |
Re: Errors (or mis-handlind data) on NO VALUE ie 1.7E+308. in box plots |
Posted by Daniel on Apr-04-2017 22:28 |
|
Hi Peter,
Thanks a lot for the message
One issue you may look at is how your code actually creates the cd.NoValue. I mentioned this because in your subject you mentioned 1.7E+308, not cd.NoValue.
...
After the data are read from the database, your code then replace the "null" with cd.NoValue because passing the data arrays to ChartDirector. In the code, there should be no reference to 1.7E+308, only cd.NoValue.
The reason I mentioned the value itself, is related to the fact that we made sure to store this value right into the DB itself in order to save time when delivering output. This, of course, requires proper data type engine data types - not your mothers' integer!
As you are aware, I have used CD quite extensively over the last 10-15 years. In this case Ihave tried the both the cd.NoValue and, nominally 1.7E+308. It looks more like the COM-based "type casting à à la VB" on the big data arrays may truncate or miss the big value of this cd.NoValue. I'll come back to you with more detailed information. Possibly via email.
Regards - Daniel
PS: as an addition info to this post on "big data" Tukey's boxes, a sample db-based data box plot that was produced as PDF vectorial output.
A tribute paid to CD superb "vectorial pdf" support. This is always in a snap thanks to your highly optimized code base! Great stuff. Of course we could "cram" even more information in these compact pdfs. But most users will need the 200-400% pdf viewer factor to get a hold on the data on their screens!
|
|