07-24-2012 06:51 AM
How to add multiple graphs in one chart(ex.scatter chart) using labview excel report generation toolkit. Assume like my test data is like below:
| X-Axis | Data1 | Data2 |
| 1 | 1 | |
| 2 | 13 | 2 |
| 3 | 14 | 3 |
| 4 | 15 | 5 |
| 5 | 16 | 3 |
| 6 | ||
| 7 | 7 |
The above graph generated manually in excel. I want to generate the same using excel report generation toolkit. when I use Excel Insert Graph.vi where the input data is 2D array with numeric data but here labview converts the empty cells (eg.x -axis 1,data1- is empty) as zero and while plotting i am getting zero for empty cell values.
Can anyone please help me on how to plot the graph without adding zero for empty cells?
Thanks&Regards,
Bharathi T
TE
| X-Axis | Data1 | Data2 |
| 1 | 1 | |
| 2 | 13 | 2 |
| 3 | 14 | 3 |
| 4 | 15 | 5 |
| 5 | 16 | 3 |
| 6 | ||
| 7 | 7 |
07-24-2012 08:21 AM
Attached the manually generated excel plot file
07-25-2012 05:15 AM
Hi Bharathi,
The Excel Insert graph function takes in only 2d arrays as inputs. Since arrays can only have numeric values, any table with a null string is read as 0. Now to get a plot like you mentioned, you could read the table and replace blank Strings as NaN. NaN values in an array when plotted do not appear in the excel sheet. For reference I have attached a sample vi to help you understand.
Regards
Vijetha Nuthakki,
Applications Engineer
NI Systems India
07-25-2012 05:56 AM
Thanks for the reply. One question:
Suppose my test data is 1,2,3,NAN,6,NAN,7 after replacing empty with NAN. When I plot I am getting the plot as attached. If you see in the plot there is gap between 3 and 6 but my requirement is like if test data is empty or NAN it should not consider that point and continuity of the graph should maintained.
Thanks