Focal Point
Changing color in 1 series

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

October 25, 2007, 04:47 AM
RJL
Changing color in 1 series
Hello,

I can't find in the documentation how I can change te color of a bar. I have a graph with 1 series and 3 different bars. I would like to assign different colors to the different bars. How can I change the colors.

Cheers Richar
October 25, 2007, 09:01 AM
Prarie
RJL,
Please go into your Profile and add a signature line with what version you are using. Can make a difference in answering questions.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
I think these commands change the colours of the first four bars in a graph:

setFillColor(getSeries(0),new Color(0,0,255));
setFillColor(getSeries(1),new Color(255,0,0));
setFillColor(getSeries(2),new Color(255,255,0));
setFillColor(getSeries(3),new Color(0,255,0));



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
Hello Francis,

That worked fine, thanks for the help. Do you also have an answer concerning my question about changing the font of the DATATEXT??

Cheers Richard
I'm not sure what
quote:
DATATEXT
is, but this might help:

-*TITLE OF GRAPH==========================================
setFontSizeAbsolute(getTitle(),true);
setFontName(getTitle(),"Arial");
setFontSize(getTitle(),14);
setTitleString("Daily Regional Net Sales");

-*X AXIS NUMBER ==========================================
setFontName(getO1Label(),"Arial Narrow");
setFontSize(getO1Label(),9);
setFontSizeAbsolute(getO1Label(),true);
setTextJustHoriz(getO1Label(),0);
setO1LabelAutofit(true);
setO1LabelWrap(false);

-* Y AXIS TITLE =========================================
setFontName(getY1Title(),"Arial Narrow");
setFontSize(getY1Title(),13);
setFontSizeAbsolute(getY1Title(),true);
setFontStyle(getY1Title(),2);

-* Y AXIS NUMBER =========================================
setFontName(getY1Label(),"Verdana");
setFontSize(getY1Label(),10);
setFontSizeAbsolute(getY1Label(),true);
setTextFormatPreset(getY1Label(),8);



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
How do you change the colors if you don't know the number of series you are going to have? Today can be 2 series, tommorrow 4, depending on that data for that day.


Dev: WebFOCUS 7.6.10, Data Migrator 7.6.10
QA: WebFOCUS 7.6.10, Data Migrator 7.6.10
Prod: WebFOCUS 7.6.2, Data Migrator 7.6.8
Windows 2K3, Tomcat 5.5.17, IIS 6
Usage: HTML, PDF, Excel, Self-serve, BID and MRE
I would suggest to download the pdf file wf713graph.pdf from the Information builders website.
It is for me a big helpful document. 1400 pages, don't print it!!!

Al the things you asked are in there and much more!




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

there wasn't any code in that manual
the entire thing is just pictures
a big catalog
but no 'how to'
or am i insane?




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Susannah,

Is this the manual you downloaded?
  http://documentation.informationbuilders.com/masterinde...ics/wf76graphics.pdf



Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
Thanks. I've downloaded the file and will review it.


Dev: WebFOCUS 7.6.10, Data Migrator 7.6.10
QA: WebFOCUS 7.6.10, Data Migrator 7.6.10
Prod: WebFOCUS 7.6.2, Data Migrator 7.6.8
Windows 2K3, Tomcat 5.5.17, IIS 6
Usage: HTML, PDF, Excel, Self-serve, BID and MRE
quote:
That worked fine, thanks for the help. Do you also have an answer concerning my question about changing the font of the DATATEXT??


Richard, there are about 9 properties for DataText listed in the manual but none of them refer to font. DataText is the text that sits on the bars to show the value. You can format how the number is displayed. Maybe you can combine one of the DataText properties with others that adjust the font.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
yes PB, that's the one.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Susannah
I always use that manual if I want something that (obviously) not can be done with the GUI.




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

I use the 5.3 version of it. It has lots of examples, but take another look there are instruction to go with them.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
Thanks, Leah. Calling up a new windows sessions seems to have corrected the problem.


WebFOCUS 7.6.2
AIX
Output: HTML, AHTML, Excel, and PDF