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     [CLOSED] How to Set the color of the legend marker in a line graph

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] How to Set the color of the legend marker in a line graph
 Login/Join
 
Member
posted
The problem is: for the line graph, the color of the series and the legend marker is coming different. Is it possible to set the color of the legend marker. I am setting the color of the series according to the group values but the legend marker is showing a different color than that.

This message has been edited. Last edited by: Kerry,
 
Posts: 4 | Registered: June 26, 2009Report This Post
Virtuoso
posted Hide Post
How about posting some code you already have




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Member
posted Hide Post
Hi Frank. Here is the code what I have

ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO ON
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 470
ON GRAPH SET VAXIS 305
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET GRID ON
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/IBIDefault.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setTransparentBorderColor(getSeries(5),true);
setTransparentBorderColor(getSeries(6),true);
setTransparentBorderColor(getSeries(7),true);
setTransparentBorderColor(getSeries(8),true);
setTransparentBorderColor(getSeries(9),true);
setTransparentBorderColor(getSeries(10),true);
setMarkerDisplay(true);
setConnectLineMarkers(true);
setConnectScatterMarkers(true);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(false);
setO1MinorGridDisplay(true);
setO1MinorGridStyle(3);
setAxisAssignment(0,0);
setSeriesType(0,2);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MustIncludeZero(true);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setTextJustHoriz(getO1Title(),1);
setFontSizeAbsolute(getO1Title(),true);
setFontSize(getO1Title(),12);
setTextRotation(getO1Title(),0);
setTextWrap(getO1Title(),false);
setTextJustHoriz(getO1Label(),0);
setTextWrap(getO1Label(),false);
setPlaceResize(getO1Title(),0);
setPlaceRotate(getO1Title(),0);
setPlaceAlign(getO1Title(),0);
setPlaceWordWrap(getO1Title(),0);
setPlaceResize(getO1Label(),0);
setPlaceRotate(getO1Label(),0);
setPlaceAlign(getO1Label(),0);
setPlaceWordWrap(getO1Label(),0);
setPlace(true);
setDepthRadius(0);
setDepthAngle(0);
setTransparentFillColor(getLegendArea(),false);
setLegendOrient(1);
setDisplay(getBeveledLegend(),false);
setFillColor(getLegendArea(),new Color(255,255,255));
setLineStyleLegendMarkers(2);
setMarkerShape(getLegendLabelMarker(0),1);
setColorMode(0);
setFontName(getDataText(),"Arial");
setFontName(getPieLabel(),"Arial");
setFontName(getPieBarLabel(),"Arial");
setFontName(getPieBarLabel(),"Arial");
setFontName(getPieRingLabel(),"Arial");
setFontName(getPieSliceLabel(),"Arial");
setFontName(getLegendText(),"Arial");
setFontName(getO1Title(),"Arial");
setFontName(getX1Title(),"Arial");
setFontName(getY1Title(),"Arial");
setFontName(getO2Title(),"Arial");
setFontName(getY2Title(),"Arial");
setFontName(getY3Title(),"Arial");
setFontName(getY4Title(),"Arial");
setFontName(getY5Title(),"Arial");
setFontName(getTitle(),"Arial");
setFontName(getSubtitle(),"Arial");
setFontName(getFootnote(),"Arial");
setUseSeriesShapes(true);
setSquareMarkers(true);
setCurveFitType(getSeries(0),0);
setTransparentFillColor(getSeries(1),false);
setMarkerShape(getSeries(0),3);
setMarkerShape(getSeries(1),5);
setMarkerShape(getSeries(2),1);
setTextString(getO1Title(),"");
setTextString(getY1Title(),"");
setDisplay(getReferenceLineY1(0),false);
setDisplay(getY1MajorTick(),true);setTickStyle(getY1MajorTick(),4);
setDisplay(getBeveledRiser(),false);
setExtendToFrameEdge(false);
setTextRotation(getDataText(),0);
setLabelStagger(getY1Label(),false);
setFontName(getO1Label(),"Arial");
setTextRotation(getO1Label(),3);
setTransparentBorderColor(getChartBackground(),false);
ENDSTYLE
ON GRAPH SET STYLE *
DEFMACRO=COND0001, COLOR=RGB(0 0 255), WHEN=N1 EQ 'A', $
DEFMACRO=COND0002, COLOR=RGB(255 0 255), WHEN=N1 EQ 'B', $
DEFMACRO=COND0003, COLOR=RGB(0 255 0), WHEN=N1 EQ 'C', $
TYPE=REPORT, FONT='ARIAL', SIZE=10, GRID=OFF, SQUEEZE=ON, $
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=TEXT, FONT='ARIAL', SIZE=10, STYLE=BOLD, JUSTIFY=RIGHT,COLOR=RGB(150 150 150),BACKCOLOR='NONE',$
TYPE=DATA, ACROSSCOLUMN=N1, MACRO=COND0002, $
TYPE=DATA, ACROSSCOLUMN=N1, MACRO=COND0001, $
TYPE=DATA, ACROSSCOLUMN=N1, MACRO=COND0003, $
ENDSTYLE
END
 
Posts: 4 | Registered: June 26, 2009Report This Post
Expert
posted Hide Post
I used the style with one of my graphs and it looks fine.

Could it be something to do with the template? Confused


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
If all the group values are there(eg:A,B,C) it works fine but if one of the group is absent then it displays differently. Like if A is absent then the legend marker will still display the color of series A.


Web Focus 7.6.9
Platform – Windows
Output formats - HTML,PDF,Excel
 
Posts: 4 | Registered: June 26, 2009Report This Post
Expert
posted Hide Post
Are you able to repro with one of the IBI sample files ?

This way we can run the code and check it.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
GRAPH FILE CAR
SUM DEALER_COST
BY CAR
ACROSS COUNTRY
WHERE CAR IN('ALFA ROMEO','DATSUN','BMW','JAGUAR');
HEADING
""
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO ON
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET GRID ON
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/IBIDefault.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setTransparentBorderColor(getSeries(5),true);
setTransparentBorderColor(getSeries(6),true);
setTransparentBorderColor(getSeries(7),true);
setTransparentBorderColor(getSeries(8),true);
setTransparentBorderColor(getSeries(9),true);
setTransparentBorderColor(getSeries(10),true);
setMarkerDisplay(true);
setConnectLineMarkers(true);
setConnectScatterMarkers(true);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(false);
setO1MinorGridDisplay(true);
setO1MinorGridStyle(3);
setAxisAssignment(0,0);
setSeriesType(0,2);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MustIncludeZero(true);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setTextJustHoriz(getO1Title(),1);
setFontSizeAbsolute(getO1Title(),true);
setFontSize(getO1Title(),12);
setTextRotation(getO1Title(),0);
setTextWrap(getO1Title(),false);
setTextJustHoriz(getO1Label(),0);
setTextWrap(getO1Label(),false);
setPlaceResize(getO1Title(),0);
setPlaceRotate(getO1Title(),0);
setPlaceAlign(getO1Title(),0);
setPlaceWordWrap(getO1Title(),0);
setPlaceResize(getO1Label(),0);
setPlaceRotate(getO1Label(),0);
setPlaceAlign(getO1Label(),0);
setPlaceWordWrap(getO1Label(),0);
setPlace(true);
setDepthRadius(0);
setDepthAngle(0);
setTransparentFillColor(getLegendArea(),false);
setLegendOrient(1);
setDisplay(getBeveledLegend(),false);
setFillColor(getLegendArea(),new Color(255,255,255));
setLineStyleLegendMarkers(2);
setFillColor(getLegendLabelMarker(1),new Color(255,0,128));
setMarkerShape(getLegendLabelMarker(0),1);
setColorMode(0);
setFontName(getDataText(),"Arial");
setFontName(getPieLabel(),"Arial");
setFontName(getPieBarLabel(),"Arial");
setFontName(getPieBarLabel(),"Arial");
setFontName(getPieRingLabel(),"Arial");
setFontName(getPieSliceLabel(),"Arial");
setFontName(getLegendText(),"Arial");
setFontName(getO1Title(),"Arial");
setFontName(getX1Title(),"Arial");
setFontName(getY1Title(),"Arial");
setFontName(getO2Title(),"Arial");
setFontName(getY2Title(),"Arial");
setFontName(getY3Title(),"Arial");
setFontName(getY4Title(),"Arial");
setFontName(getY5Title(),"Arial");
setFontName(getTitle(),"Arial");
setFontName(getSubtitle(),"Arial");
setFontName(getFootnote(),"Arial");
setUseSeriesShapes(true);
setSquareMarkers(true);
setCurveFitType(getSeries(0),0);
setTransparentFillColor(getSeries(1),false);
setFillColor(getSeries(1),new Color(255,0,255));
setMarkerShape(getSeries(0),3);
setMarkerShape(getSeries(1),1);
setTextString(getO1Title(),"");
setTextString(getY1Title(),"");
setDisplay(getReferenceLineY1(0),false);
setDisplay(getY1MajorTick(),true);setTickStyle(getY1MajorTick(),4);
setDisplay(getBeveledRiser(),false);
setExtendToFrameEdge(false);
setTextRotation(getDataText(),0);
setLabelStagger(getY1Label(),false);
setFontName(getO1Label(),"Arial");
setTextRotation(getO1Label(),3);
setTransparentBorderColor(getChartBackground(),false);
setTextFormatPreset(getY1Label(),1);
ENDSTYLE
ON GRAPH SET STYLE *
DEFMACRO=COND0001, WHEN=N1 EQ 'DATSUN', $
DEFMACRO=COND0002, WHEN=N1 EQ 'ALFA ROMEO', $
DEFMACRO=COND0003, WHEN=N1 EQ 'BMW', $
DEFMACRO=COND0004, WHEN=N1 EQ 'JAGUAR', $
TYPE=REPORT, FONT='TIMES NEW ROMAN', SIZE=10, GRID=OFF, SQUEEZE=ON, $
TYPE=DATA, ACROSSCOLUMN=N1, MACRO=COND0001, COLOR=RGB(0 0 255), $
TYPE=DATA, ACROSSCOLUMN=N1, MACRO=COND0002, COLOR=RGB(255 0 255), $
TYPE=DATA, ACROSSCOLUMN=N1, MACRO=COND0003, COLOR=RGB(0 128 0), $
TYPE=DATA, ACROSSCOLUMN=N1, MACRO=COND0004, COLOR=RGB(0 128 255), $
ENDSTYLE
END

I have created the graph with the CAR file. You can see that I am not able to control the color of the marker in the legend. I want the marker in the legend to have the same color as the series.


Web Focus 7.6.9
Platform – Windows
Output formats - HTML,PDF,Excel
 
Posts: 4 | Registered: June 26, 2009Report This Post
Expert
posted Hide Post
Looks like it is something to do with the conditional styling.

ON GRAPH SET STYLE *
DEFMACRO=COND0001, WHEN=N1 EQ 'DATSUN', $
DEFMACRO=COND0002, WHEN=N1 EQ 'ALFA ROMEO', $
DEFMACRO=COND0003, WHEN=N1 EQ 'BMW', $
DEFMACRO=COND0004, WHEN=N1 EQ 'JAGUAR', $
TYPE=REPORT, FONT='TIMES NEW ROMAN', SIZE=10, GRID=OFF, SQUEEZE=ON, $
TYPE=DATA, ACROSSCOLUMN=N1, MACRO=COND0001, COLOR=RGB(0 0 255), $
TYPE=DATA, ACROSSCOLUMN=N1, MACRO=COND0002, COLOR=RGB(255 0 255), $
TYPE=DATA, ACROSSCOLUMN=N1, MACRO=COND0003, COLOR=RGB(0 128 0), $
TYPE=DATA, ACROSSCOLUMN=N1, MACRO=COND0004, COLOR=RGB(0 128 255), $
ENDSTYLE


I removed it and the markers ended up the same as the lines.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report 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     [CLOSED] How to Set the color of the legend marker in a line graph

Copyright © 1996-2020 Information Builders