Focal Point
how to turn off the color key in the graph legend? [SOLVED]

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

February 01, 2011, 02:07 PM
Tomsweb
how to turn off the color key in the graph legend? [SOLVED]
I have coded the graph captioned below as an example:

quote:

GRAPH FILE CAR
SUM SALES
BY MODEL
ACROSS COUNTRY

ON TABLE PCHOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT ON
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405

ON GRAPH SET LOOKGRAPH VBAR

ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBIColorToWhite.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(5);
setPlace(true);
setCurveFitEquationDisplay(false);
setDisplay(getDataText(), true);
setFillColor(getDataText(),new Color(0,0,225);
-*
-** Position totals relative to &XBAR
-*
setDataTextPostion(0);
setDataTextRadiusDefault(30);
-*
-** Use setSeriesLabel
setSeriesLabel(0,"");
-*setSeriesLabel(1,"Apples");
-*setSeriesLabel(2,"Oranges");
-*setSeriesLabel(3,"Cherries");
-*setSeriesLabel(4,"Bananas");

-*
-** Control fonts of X-axes
-*
setFontName(get01Label(0),"TimesNewRoman");
setAutoFit(get01Label(0),false);
setFontSizeAbsolute(get01Label(0),true);
setFontSize(get01Label(0),12);
-** Control fonts of Y-axes
setFontName(getY1Label(0),"TimesNewRoman");
setAutoFit(getY1Label(0),false);
setFontSizeAbsolute(getY1Label(0),true);
setFontSize(getY1Label(0),12);
ENDSTYLE
END
-RUN
-EXIT



I am aware of using the setSeriesLabel command to change the legendText in Graph, but when I do so, it continues to display the color of the data line in the legend.

Does anyone know how to disable the color key in the legend? Frowner

Thanks!

This message has been edited. Last edited by: Tomsweb,


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
February 03, 2011, 10:50 AM
Tomsweb
I created a small graph using graph assistant this morning.
I discovered that the command to enable display of the graph
legend is setLegendDisplay(true);.

Unfortunately my graphs - coded by hand with help from
focalpoint and research - did not contain this command, so
the default setting must be setLegendDisplay(true);.

I disabled the display of my legend by setting it to false.

setLegendDisplay(false); will disable legend display in graph.


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
February 03, 2011, 03:39 PM
Waz
Interesting, I didn't think you were trying to turn the legend off in you original post.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!