DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Customize the way of defining Y axis channel in chart

Solved!
Go to solution

Hi,

 

Is there a way to define Y axis channel as variable.

 

Durai26_0-1685711305413.png

Durai26_1-1685711342832.png

Here the chart has X axis: Time and Y axis: Speed

 

But in my case,  the Y axis name is not fixed. sometime its test1_speed, test2_speed, test3_speed...

 

so, is it possible to use something like below,

1) Y axis:     [1]/type & "_speed"

 

where "type" is a global variable and that will have a value either test1, test2, test3.... based on condition.

 

2) Y axis:   @@Data.Root.ChannelGroups(1).Channels(type & "_speed")@@

 

thanks

Durai

 

 

 

 

 

0 Kudos
Message 1 of 5
(1,384 Views)

You can change it in script.  I don't think the 2D axis system configuration supports wildcards...  Are you working in VIEW or REPORT?

0 Kudos
Message 2 of 5
(1,341 Views)

Hi gsklyr,

 

I am trying to do it in report template. since many pages and multiple charts in each page, i am expecting option to do it in report template itself. 

 

regards,

Durai

0 Kudos
Message 3 of 5
(1,334 Views)

Maybe use channel numbers instead of names if you can anticipate their order?

Otherwise you can script changing a curve reference with something like that:

 

 

Dim atype: atype = "test1"
Dim o2DAxisSystem, o2DLine
Set o2DAxisSystem = Report.Sheets("Sheet 1").Objects("2DAxis1")
Set o2DLine = o2DAxisSystem.Curves2D.Item(1).Shape
o2DLine.YChannel.Reference = "[1]/" & atype & "_speed"

 

Here I assume you have a sheet named "Sheet 1" and a 2DAxisSystem in that sheet named "2DAxis1"

 

EDIT:

Actually this worked:

gsklyr_0-1685976700688.png

BUT it only plots the first occurrence it finds!  So if I change the order of the channels and put Speed1 on top, it will only plot Speed1

 

0 Kudos
Message 4 of 5
(1,329 Views)
Solution
Accepted by Durai26

As gsklyr has already written, the Y channel can be set by script.

 

If you want to get along without script, then the curve expansion of REPORT can be used. Set these settings in the Layout Parameters dialog. This will replace the wildcard * in your channel names of the REPORT layout.

AnJalpaka_0-1686148544350.png

 

Message 5 of 5
(1,267 Views)