PlotSeries: Suppress Description
Author: Ben_Zurich
Creation Date: 4/22/2013 11:00 AM
profile picture

Ben_Zurich

#1
I have 5 series in a pane and want to suppress the description of 4 of them by setting

CODE:
Please log in to see this code.


for all 4 of them. However, the outcome is not what I intended but

QUOTE:

description of first symbol
_1
_2
_3
_4


How can I really suppress the plot of the description ?
profile picture

Eugene

#2
Simply use the PlotSeries overload that accepts custom label and pass "string.Empty" or "":

CODE:
Please log in to see this code.


Not only mangling .Description will not help, it's a poor idea since Wealth-Lab is no longer able to find the DataSeries in the Bars.Cache.
profile picture

Ben_Zurich

#3
To set label = "" does the same thing:

_1
_2
_3
_4

As soon as a label identical to a previous label within the same pane is detected, WL6 makes these replacements.

The only circumvention I've found so far is setting

label1 = " "
label2 = " "
label3 = " "
label4 = " "
profile picture

Ben_Zurich

#4
(Why are the blanks gone?)

I mean Label1 with 1 blank, label2 with 2 blanks, label3 with 3 blanks, label4 with 4 blanks.
profile picture

Eugene

#5
Good for you.
profile picture

Ben_Zurich

#6
No, I'm sorry, I am mistaken, it's not working at all.
profile picture

Eugene

#7
It works perfectly.

CODE:
Please log in to see this code.
profile picture

Ben_Zurich

#8
Please look at the attached picture and see the labels in the Price Pane (at the bottom):

Seasonality
Seasonality_1

I have set the label to "Seasonality" both times.

More generally, I can say that as soon as you have the same label two times, WL6 adds a "_1" at the label. The third identical label gets a "_2", the fourth a "_3", and so on. Of course this applies also to labels with no content, regardless whether it is null or "" or " ".

When you look at the first two panes, you can see that one cannot even have the same label in two different panes without suffering from the "_X" postfix.
profile picture

Eugene

#9
This is by good design: it helps distinguish between different series, purposefully or inadvertently marked with the same label. Unless you're plotting the same Seasonality series twice, intentionally or unintentionally, Wealth-Lab will be appending a "_" postfix to the end.

I'm sure that labels must be unique for Wealth-Lab's own purposes. A workaround is already known: append a few spaces past the end of "Seasonality ".
profile picture

Ben_Zurich

#10
This works for non-empty labels only, but I can live with that.

The _X thing is like Microsoft telling me that a cell in an array must begin with an uppercase letter. Kind of teacher-like mentality. Some like it, some not.
profile picture

Eugene

#11
QUOTE:
This works for non-empty labels only, but I can live with that.

A label can not be empty: it's some kind of key value. That's the whole point of the "invisible label" workaround for PlotSeries.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).