From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph-legends

Hi

I am displaying a graph with changing numbers of plots. The problem is that
I cannot find a way to change the number of legends shown for the plot.
There seems to be no attribute node and I can only specify it at
design-time.
For example: The HTV (Historical Trend Viewer) in BridgeView allways shows
only as many legend-entries as there are plots.
Does anyone know how to control the number of legends shown
programmatically?
Thanks
0 Kudos
Message 1 of 5
(3,002 Views)
Stefan Schirmer wrote:

> Hi
>
> I am displaying a graph with changing numbers of plots. The problem is that
> I cannot find a way to change the number of legends shown for the plot.
> There seems to be no attribute node and I can only specify it at
> design-time.
> For example: The HTV (Historical Trend Viewer) in BridgeView allways shows
> only as many legend-entries as there are plots.
> Does anyone know how to control the number of legends shown
> programmatically?
> Thanks

what happens to the plots that disappear? If you are just plotting, say, a
blank array, then that might be your problem. zero is not a null entry, it is
an entry. Perhaps if you had some sort of loop that would only attach useful
arrays to your graph than this unpleasent
ness could be avoided.

just a thought.

Andrew B. Croll
0 Kudos
Message 3 of 5
(3,002 Views)
Thanks for your reply but I think there is a misunderstanding of what I'm
trying to do.

I want to programmatically control the number of legend-entries for a
waveform-chart.E.g. Plot 1 to Plot 5 and then change the legend so it will
only display Plot 1 to Plot 3 etc. Right now I allways see as many legend
entries as defind at design-time.
In other words I want to 'resize' the legend so it displays only as many
entries as I want.

Stefan


"Croll, Andrew [SKY:1V43:EXCH]" schrieb im
Newsbeitrag news:391C0023.5BF491F3@americasm01.nt.com...
> Stefan Schirmer wrote:
>
> > Hi
> >
> > I am displaying a graph with changing numbers of plots. The problem is
that
> > I cannot find a way to change the number of legends shown for the pl
ot.
> > There seems to be no attribute node and I can only specify it at
> > design-time.
> > For example: The HTV (Historical Trend Viewer) in BridgeView allways
shows
> > only as many legend-entries as there are plots.
> > Does anyone know how to control the number of legends shown
> > programmatically?
> > Thanks
>
> what happens to the plots that disappear? If you are just plotting, say,
a
> blank array, then that might be your problem. zero is not a null entry,
it is
> an entry. Perhaps if you had some sort of loop that would only attach
useful
> arrays to your graph than this unpleasentness could be avoided.
>
> just a thought.
>
> Andrew B. Croll
>
0 Kudos
Message 2 of 5
(3,002 Views)
How about changing the color of the legend entries to the background color?
They are still there but invisible.

John


Stefan Schirmer wrote in message
news:391c177f@newsgroups.ni.com...
> Thanks for your reply but I think there is a misunderstanding of what I'm
> trying to do.
>
> I want to programmatically control the number of legend-entries for a
> waveform-chart.E.g. Plot 1 to Plot 5 and then change the legend so it will
> only display Plot 1 to Plot 3 etc. Right now I allways see as many legend
> entries as defind at design-time.
> In other words I want to 'resize' the legend so it displays only as many
> entries as I want.
>
> Stefan
>
>
> "Croll, Andrew [SKY:1V43:EXCH]" schrieb
im
> Newsbeitrag news:391C0023.5BF491F3@americasm01.nt.com...
> > Stefan Schirmer wrote:
> >
> > > Hi
> > >
> > > I am displaying a graph with changing numbers of plots. The problem is
> that
> > > I cannot find a way to change the number of legends shown for the
plot.
> > > There seems to be no attribute node and I can only specify it at
> > > design-time.
> > > For example: The HTV (Historical Trend Viewer) in BridgeView allways
> shows
> > > only as many legend-entries as there are plots.
> > > Does anyone know how to control the number of legends shown
> > > programmatically?
> > > Thanks
> >
> > what happens to the plots that disappear? If you are just plotting,
say,
> a
> > blank array, then that might be your problem. zero is not a null entry,
> it is
> > an entry. Perhaps if you had some sort of loop that would only attach
> useful
> > arrays to your graph than this unpleasentness could be avoided.
> >
> > just a thought.
> >
> > Andrew B. Croll
> >
>
>
0 Kudos
Message 4 of 5
(3,001 Views)
> I am displaying a graph with changing numbers of plots. The problem is that
> I cannot find a way to change the number of legends shown for the plot.
> There seems to be no attribute node and I can only specify it at
> design-time.
> For example: The HTV (Historical Trend Viewer) in BridgeView allways shows
> only as many legend-entries as there are plots.
> Does anyone know how to control the number of legends shown
> programmatically?

The built-in legend doesn't have an attribute to do that, yet. I don't
remember for sure, but HTV either built their own legend out of an array
of clusters of strings and color numerics, or they have a Boolean indicator
that they are resizing to cover the legend entries they don't want you to
see.

Greg McKaskle
0 Kudos
Message 5 of 5
(3,001 Views)