|
Python, NoValue and data table |
Posted by Ashish on Jan-17-2010 05:58 |
|
I am using NoValue in python version for missing data. In associated data table, chart is showing 1.7e+308 as value. How do I suppress that in data table to show blank? |
Re: Python, NoValue and data table |
Posted by Peter Kwan on Jan-17-2010 09:51 |
|
Hi Ashish,
When you create a data table using Axis.makeLabelTable, ChartDirector will create a data table consisting of one row, which are the axis labels.
The "Data Table" sample code also illustrates how one may insert more rows to the table using CDMLTable.appendRow and CDMLTable.setText. These rows can display any text you want, as they are inserted with your own code. The "Data Table" sample code uses them to display the data values.
If the NoValue labels you are referring to are labels inserted by your own code, your code can always choose not to insert them.
For example, in the "Data Table" sample code, one of the lines is:
table.setText(i, 1, str(data0[i]))
The above insert a label to the table, using the Python "str" function for formatting. You can change the above to:
if data0[i] != NoValue:
table.setText(i, 1, str(data0[i]))
Hope this can help.
Regards
Peter Kwan |
|