LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the x-axis default series order in Excel chart

Hi,

      I am using ExcelRpt_ChartWizard() function for plotting an excel chart. But the x-axis series starts from 0,1,2,3...... But I would like to change the series according to the data present in a particular column of excel sheet. For eg if column 2 contains data 2, 4, 8, 6.2, 5 ....... then the x-axis series should be in the order 2, 4, 8, 6.2, 5 ....... I have attached the excel accordind to my requirement.

      Can anyone help me to change the x-axis default series order???

Regards

NB   

0 Kudos
Message 1 of 4
(4,397 Views)

Hi,

   This function should work.

ExcelRpt_ChartWizard (chartHandle, ExcelWorksheetHandle, "B3:D8",ExRConst_GalleryLine, ExRConst_Columns, 0, 1, 1, 1,"Expected Result", "Input", "Expected/Observed", NULL);
 ExcelRpt_SetChartAttribute (chartHandle, ER_CH_ATTR_CHART_TYPE, ExRConst_LineMarkers );

If we specify category label as 1, then the contents of column B3 will be taken as x-axis series.

0 Kudos
Message 2 of 4
(4,380 Views)

It's "B3 : D8"

0 Kudos
Message 3 of 4
(4,379 Views)

Hi,

Many thanks for this post, It's been quite helpful since there seems no to be so much info available about not so basic generation and manipulation of excels graphs with LabWindows (at least compared to C#).

I am struggling to set my own X-Axis as well but the best I can get is the graph looking like the one of the attached file.

The first row for the X-Axis is 11:47:00 and the last one is 17:46:25, however I get a graph between 0:00:00 and 19:12:00.

May thanks,

Best regards

0 Kudos
Message 4 of 4
(3,622 Views)