Focal Point
[SOLVED] Setting Legend Scroll on the graph

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6301051471

June 29, 2006, 11:06 AM
texascyclone
[SOLVED] Setting Legend Scroll on the graph
Can somebody help me with this.

I am trying to send a legend scroll on the graph but I am getting an exception error and the graph doesnt dislpay at all when I try to add the legend scroll.

This is the code below as to how I add the legend scroll.

setLegendAutomatic(true);
setLegendScroll(2);
setLegendSeriesCount(6);
setLegendSeriesStart(0);
setLegendOrient(2);
setLegendRect(new Rectangle(-15340,-2478,5948,17550));

Any help will be greatly appreciated.

This message has been edited. Last edited by: Kerry,
June 30, 2006, 10:20 AM
texascyclone
Anybody?
June 30, 2006, 11:04 AM
Francis Mariani
What's the error?

What version are you running?

I'm not sure what scrolling legends would do, but I added your lines of code to an existing graph and got not errors. By the way, the code did not make any change to the graph.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
June 30, 2006, 11:21 AM
texascyclone
Francis,

I am not getting any error. The graph shows fine, however, I dont get the legend scroll to display on the graph.

The problem I am having is, I am having a lot of legends and I am not able to display all of them at once. So I wanted to use a legend scroll to display sum and scroll to display others.

Thanks for your help.
June 30, 2006, 11:22 AM
texascyclone
Oh, and I am running 7.1.3.
June 30, 2006, 12:31 PM
Francis Mariani
Are you sure that 7.1.3 supports scrolling legends?

I don't have WebFOCUS 7 so I can't verify that.

Perhaps the Perspective Java thingy supports scrolling legends, but WebFOCUS does not.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
June 30, 2006, 01:05 PM
texascyclone
Yes it does, here is the link to the features:
http://documentation.informationbuilders.com/masterinde...wf713graph/index.htm

But I couldnt get it to show up on my graph.
June 30, 2006, 01:19 PM
Francis Mariani
The dreaded phrase "Open a case with tech support" comes to mind!


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
June 30, 2006, 02:07 PM
texascyclone
Thanks for trying to help!
I will see what I can do.
June 30, 2006, 04:09 PM
EJL
It's not clear what you are trying to do as far as the graph output but I was under the impression that scrolling legends would only work using the Applet approach.
June 30, 2006, 04:34 PM
texascyclone
EJL,

Run the code below:

****************************************

GRAPH FILE CAR
PRINT
RCOST AS ''
ACROSS MODEL AS 'MODEL'
BY COUNTRY
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID OFF
ON GRAPH SET VAXIS 330
ON GRAPH SET HAXIS 560
ON GRAPH SET GRMERGE ON
ON GRAPH PCHOLD AS OUTFILE FORMAT HTML
ON GRAPH SET GRAPHSTYLE *
setSeriesType(0,0);
setSeriesType(1,0);
setMarkerDisplay(true);
setUseSeriesShapes(true);
setConnectLineMarkers(true);
setConnectScatterMarkers(true);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,2);
setAxisAssignment(1,1);
setSeriesType(1,2);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setLegendDisplay(true);
setTextJustHoriz(getTitle(),1);
setFontSizeAbsolute(getTitle(),true);
setFontSize(getTitle(),11);
setTextJustHoriz(getSubtitle(),1);
setFontSizeAbsolute(getSubtitle(),true);
setFontSize(getSubtitle(),10);
setFontSizeAbsolute(getFootnote(),true);
setFontSize(getFootnote(),9);
setFontStyle(getFootnote(),0);
setLegendTextAutofit(true);
-*
-*setLegendMarkerSizeMax(500);
-*setLegendMarkersPerRow(7);
-*
setFontSizeAbsolute(getY1Title(),true);
setFontName(getY1Label(),"Dialog");
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setTextJustHoriz(getO1Label(),1);
setY1TitleString("CAR");
setX1TitleString("MODEL");
setO1LabelAutofit(true);
setTextRotation(getO1Label(),0);
ENDSTYLE
END
-RUN
-EXIT


*********************************************

Now my program has a lot of legends, something like 24 and I cant show all the legends down at the bottom of the graph(ENGLAND, FRANCE..). So I wanted to add a legend scroll to show, let say, 6 legends and the user could scroll to view the rest.

Does this make sense now?
June 30, 2006, 05:16 PM
EJL
But isn't the result of this going to be a static image displayed in a browser? What I think you need to do to get a dynamic graph is to use client side processing.

I've only played around with the WF graph stuff and found it not very clear on many things so maybe my understanding of what's going on isn't complete.
July 03, 2006, 06:26 AM
<JG>
This is a bug in the new graph engine and you need to open a case with support.

switch back to the old engine and it works

SET GRAPHENGINE=OLD
July 03, 2006, 11:23 AM
texascyclone
Thanks JG!
That did take care of the scroll to appear on the graph. However, I am not able to scroll ( as EJL pointed out ).

Any idea on how I could get the scroller to work, or any documentation that would help me figure that out?

Thanks again all for your ideas.
July 03, 2006, 11:40 AM
<JG>
All I added to your code was

SET GRAPHENGINE=OLD

and

setLegendDisplay(true);
setLegendAutomatic(true);
setLegendScroll(2);
setLegendSeriesCount(2);
setLegendSeriesStart(0);
setLegendOrient(0);
setLegendRect(new Rectangle(-15340,-2478,5948,17550));
setFillColor(getLegendScrollerThumb(),new Color(0,255,0));

It's import that you use FORMAT HTML otherwise its a static image.

Also its a drag activated scroller not a point and click one.
July 03, 2006, 11:50 AM
texascyclone
Awesome! It works perfect.
Thank you very much (yea, I didnt have the FORMAT HTML).
March 03, 2010, 06:41 AM
Suji
Texascyclone,
Can you please send us the working code with HTML format?

Thanks,
Suji.


WebFOCUS 7.7.02(Production)
WebFOCUS 7.7.02(Test region)
Oracle backend (10g)and Windows Frontend.
HTML,PDF,EXL2K,FLEX,AHTML
March 03, 2010, 08:31 AM
<JG>
Picking up a 3 1/2 year old post and asking someone to send you code is very very lazy.

If you bother to read the post then all you need to do is take the original code make the amendments as posted
you have the answer.

The forum is to help where help is genuinely needed.
Not to do the work for someone who can't be bothered