Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Hiding a Data Series line and Legend item

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Hiding a Data Series line and Legend item
 Login/Join
 
Virtuoso
posted
Does anyone know of an API command or some other way to hide a data series line and the corrosponding legend item? I would like to hide these when the values for that data series are all zero. I already have code setup to identify when all values are zero. I currently change the SeriesType to a BAR for that series when it is all zeros. This "hides" the data series because bars with a value of zero really arent visible with a 2D graph. This works great for the actual line being hidden but the legend item still appears. Any thoughts? I checked the Graph API book and didn't see anything obvious.
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
Mickey,

How about setting them to "missing" or nulls and then use SET VZERO=OFF so that they aren't displayed? That will really get rid of the data line, but the legend is another matter. I can only suggest setting the LegendText colour to match the background colour as well as that of the marker and marker border.

There may be other methods and I'll check them out for you when I can.
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Mickey,

Thought that there should be an easier method which is, apparently, -

setIgnoreSeries (2, true);

or

deleteSeries(2);

Steps over the series, and doesn't draw it, in the data and legend display (allegedly).
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Tony, thanks for the suggestion. I'll give it a try when I can.
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
Well it looks like this does not chart the line but still shows the item in the Legend. This is good enough for me. I was able to find setIgnoreSeries but did not find deleteSeries in the documentation.
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
Didn't see it in the documentation but deleteSeries seems to work OK with WF 5.3.4 and also removes the items from the Legend area.

Thanks again Tony.
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
OK, here are the final findings for the two API commands setIgnoreSeries and deleteSeries:

WF523
setIgnoreSeries - Removes the series from the graph (a line in my case) AND removes the corresponding Legend item from the Legend area. Spacing in the Legend area is NOT adjusted due to the missing Legend item.

deleteSeries - Does not do anything.

WF534 - GRAPH53 Engine
setIgnoreSeries - Removes the series from the Graph (a line in my case) BUT DOES NOT remove the corresponding Legend item from the Legend area.

deleteSeries - Removes the series from the graph (a line in my case) AND removes the corresponding Legend item from the Legend area. Spacing in the Legend area IS adjusted due to the missing Legend item.


I cannot find deleteSeries anywhere. How did you know about this API command?
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
Thanks Mickey,

5.3.4 results compare to 5.3.2 on Win2K here.

I found the deleteSeries via the on-line manual under Methods - Series/Group Methods

I have an old copy that I use on my laptop for quick reference but it is probably out of date now, so the on-line manual is always in my fzavorites list.

Regards

T
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
A new graphing engine was added in 5.3.x. This is why I am experiencing different results from 5.2.x (Prd Env) to 5.3.x (Dev Env).

However, it is interesting that I cannot find deleteSeries in IBIs Graphing documentation. I will double check. Thanks for the link to PFJ documentation.
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
I hate to belabor this point but I began verifying my graphs against production versions and discovered the difference between the setIgnoreSeries and the deleteSeries API commands.

setIgnoreSeries acts as if a data series is there when assigning data series marker shapes and data series colors. Then, at the last minute, it hides the line.

deleteSeries completely removes the data series before assigning all these attributes.

This was a joy to discover. It yielded some interesting results.

I have a graph showing 4 lines. I apply the colors BLUE, GREEN, PINK, and YELLOW in this order to the data series. The shapes SQUARE, CIRCLE, DIAMOND, and CROSS are assigned in this order automatically.

If I setIgnoreSeries for the first data series, I will not see a BLUE line with SQUARE marker shapes. This is because the attributes get assigned before the line is hidden.

If I deleteSeries for the first data series, data series number TWO is assigned the BLUE color with SQUARE markers.

The interesting thing was when I had both setIgnoreSeries and deleteSeries in the graph commands. deleteSeries(0) caused the first data series to be completely deleted. I then had a setIgnoreSeries(0,true) which actually caused the SECOND data series to be ignored because it had previously deleted the first data series. Very interesting behavior. It makes sense but you really have to think about what you are doing.

I had both statements in my code in an attempt to support two different graphing engine versions (WF523 and WF534).
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
As we all know Mickey, you think you got the situation under control ....

And then it ups and bites you! Frowner

Thanks for sharing your experience though.

T
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Hiding a Data Series line and Legend item

Copyright © 1996-2020 Information Builders