Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] bar graph column name order
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] bar graph column name order
 Login/Join
 
Platinum Member
posted
In my example below the colors of the bars will not change colors correctly when I use the across statement, but it does work if I use the By field. I have to use the across columns statement because the order of the countrys must be in this format. How can I get the colors to changes on the bars correctly and maintain the country order that I need?

 DEFINE FILE CAR
SALES/D10=SALES/1000;
END
GRAPH FILE CAR
SUM SALES AS 'Sales for'
-*BY COUNTRY
ACROSS COUNTRY AS ''
COLUMNS 'W GERMANY' AND 'JAPAN' AND 'ITALY' AND 'FRANCE' AND 'ENGLAND'  
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET GRAPHSTYLE *
setLegendDisplay(false);
setGaugeBackgroundStyle(7);
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
PAGESIZE='Letter',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
BACKCOLOR='NONE',
STYLE=NORMAL,
$
DEFMACRO=COND0001,
MACTYPE=RULE,
WHEN=SALES LT 80,
$
DEFMACRO=COND0002,
MACTYPE=RULE,
WHEN=SALES GT 80,
$
DEFMACRO=COND0003,
MACTYPE=RULE,
WHEN=SALES LT 50,
$
TYPE=DATA,
COLOR='SILVER',
$
TYPE=DATA,
COLOR='YELLOW',
MACRO=COND0003,
$
TYPE=DATA,
COLOR='LIME',
MACRO=COND0002,
$
TYPE=DATA,
COLOR='RED',
MACRO=COND0001,
$

ENDSTYLE
END



 

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


Prod: WebFocus 7.7.3 Win 2003
Dev: WebFocus 7.7.3 Win 2003
 
Posts: 116 | Registered: April 23, 2007Reply With QuoteReport This Post
Guru
posted Hide Post
Donald

have you tried using BY and LOKGRAPH VBAR?

Håkan


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
 
Posts: 319 | Location: Stockholm, Sweden | Registered: February 04, 2004Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Please run the following code. It may be helpful for you to find a solution:
DEFINE FILE CAR
SALES/D10=SALES/1000;
SORTCOUNTRY/A25 = DECODE COUNTRY('W GERMANY' '    W GERMANY'
                                 'JAPAN'     '   JAPAN'
                                 'ITALY'     '  ITALY'
                                 'FRANCE'    ' FRANCE'
                                 'ENGLAND'   'ENGLAND' );
END
GRAPH FILE CAR
SUM CAR.BODY.SALES AS 'Sales for'
BY SORTCOUNTRY AS 'Country'
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO ON
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBAR
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 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(5); 
setTransparentBorderColor(getChartBackground(),true); 
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);
setLegendDisplay(false);
setGaugeBackgroundStyle(7);
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
DEFMACRO=COND0001, WHEN=N2 LE 50, $
DEFMACRO=COND0002, WHEN=N2 LT 80, $
DEFMACRO=COND0003, WHEN=N2 GE 80, $
TYPE=REPORT, FONT='ARIAL', SIZE=10, STYLE=NORMAL, $
TYPE=DATA, COLOR=RGB(192 192 192), $
TYPE=DATA, MACRO=COND0001, COLOR=RGB(255 0 0), $
TYPE=DATA, MACRO=COND0002, COLOR=RGB(0 255 0), $
TYPE=DATA, MACRO=COND0003, COLOR=RGB(255 255 0), $
ENDSTYLE
END
Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 7 - IE11.
in Focus since 1988
 
Posts: 1960 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] bar graph column name order

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.