DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Poner dos leyendas en la misma gráfica 2D de un Report

Solved!
Go to solution

Hola a todos,

 

  estoy codificado la introducción de una Leyenda en una gráfica 2D ("2DAxis1"). 

 

  El problema me aparece cuando, en la leyenda, intento poner informaciones distintas para los canales que se muestran, es decir,

  para unos canales quiero que se muestre su chnname, y para otros un texto libre.

 

  Creo que dentro de la misma leyenda esto no es posible.

 

  Si estoy en lo cierto, y no hay más remedio, alguien sabe si se pueden poner dos leyendas en la misma gráfica?

 

Muchas gracias.

0 Kudos
Message 1 of 5
(4,054 Views)

Hi jmpons,

 

Sorry, I never learned Spanish.  It was way easier to decipher the Italian post yesterday, which surprises me.  It sounds like you're wanting to programmatically set something about a legend on a 2D axis, perhaps which channels appear or what the display is for each channel (Channel Name vs. Free Text, etc.), but I can't really tell what you're asking specifically.

 

It is possible to set any parameters programmatically that you can set interactively in the configuration dialog, so once I understand better what you're after, I'll be able to tell you the exact code lines to achieve your goal programmatically, as long as you can achieve your goal interactively.

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 2 of 5
(4,049 Views)

Hi Brad,

 

firstly, thank you for your answer. It's quite close to what I'm trying to sort out.

 

What I need is to solve the next problem:

 

I have an only "2DAxis" graph, which contains two "2DCurves", and a Legend.

 

Inside the Legend I want to show chnname for the first curve, and a Free Curve Text for the second. 

 

The question is: is this possible?

 

If not, can I add a second legend to show different type of information depending on  the curve?

 

Thank you in advance.

 

0 Kudos
Message 3 of 5
(4,023 Views)

Hi jmpons,

 

Thanks for answering in English.  From your answer it sounded like a static TDR configuration might be sufficient.  Let's start with that, and then if you really need to make programmatic changes, we can talk through the VBScript commands to do that.  The key point here is to use the "Curve-related text" legend setting-- that way you can assign a different expression to each channel you want to have show up in the legend.  Here's an example of configuring the first channel to display its channel name and the second channel to display its channel length property:

 

@@ChnName(CCN)@@

Length = @@ChnPropValGet(CCN, "Length")@@

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 4 of 5
(4,012 Views)
Solution
Accepted by topic author jmpons

Hello Brad,

 

I think you found the right answer for me.

 

Thank you for your useful help.

 

Josep Maria

0 Kudos
Message 5 of 5
(4,000 Views)