|
How to change layer in it's value = 0? |
Posted by steven ho on Aug-17-2016 15:23 |
|
as update picture
Because these points(07-30 and 07-31) in layers is = "null" or "",
the point down to 0 in Y-axis
I want to change it.
How to cancel these points??
Ignore these two points in the values , it has become a line on the picture
Thank you.
|
Re: How to change layer in it's value = 0? |
Posted by Peter Kwan on Aug-18-2016 00:54 |
|
Hi Steven,
In most of the programming language, it is impossible to pass "null" or "" to ChartDirector in the data. It is because ChartDirector uses "double[]" for data (an array of double), and most programming languages do not allow setting a text string "null" or "" to variable of type "double".
If your original data contain text strings (like "null" or ""), it is likely your code contains some lines that convert the text string to a number in order to create the "double[]". Those lines may have converted "null" or "" to 0. If you want the points to be missing, please convert them to Chart.NoValue instead (or NoValue, or cd.NoValue other similar syntax depending on your programming language).
In some weakly typed languages (such as VBScript, Perl, PHP) that allow mixing text strings and numbers in an array, non numbers are equivalent to 0 when used in numeric context, so "null" or "" will be treated as 0.
If your original data are from a database, the code that retrieves the data from the database to a "double[]" may have converted "null" or "" to 0 (since it is not allowed to put a text string in a double variable). One method is to modify your SQL to retrieve the null" or "" as 1.7E+308 (which is the numeric equivalent to Chart.NoValue). Another method is to retreive the null" or "" as some impossible value (eg. -9999), then in your code, you can scan the array and replace -9999 with Chart.NoValue.
The following example demonstrates the use of Chart.NoValue for missing data points:
http://www.advsofteng.com/doc/cdnet.htm#missingpoints.htm
Hope this can help.
Regards
Peter Kwan |
Re: How to change layer in it's value = 0? |
Posted by steven ho on Aug-19-2016 08:14 |
|
Thank you~~ |
|