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     [SOLVED] Changing the colour of datatext in a graph

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Changing the colour of datatext in a graph
 Login/Join
 
Expert
posted
Posting on behalf of Mary Sparks

I was wondering if you were able to change the color of the datatext (not the bar) in a graph, unique to the series.
The quick chart in advanced graph assist, does it for all series.

The highlighted code below against the car file, shows what I’m trying to do, but 7703 just ignores it.


Any suggestions?



GRAPH FILE CAR
-* Created by Advanced Graph Assistant
SUM CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
CAR.BODY.SALES
ACROSS CAR.BODY.SEATS
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 440
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBAR
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("/images/tdg/template/IBISouthWestern.txt");
setDepthRadius(5);
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);
setReportParsingErrors(false);
setSelectionEnableMove(false);
setTransparentBorderColor(getChartBackground(),true);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setPlace(true);
setSeriesType(getSeries(1),2);
setBorderColor(getSeries(1),new Color(255,255,128));
setMarkerSize(getSeries(1),30);
setLineWidth(getSeries(1),0);
setDisplay(getDataText(1),true);
setFontName(getDataText(1),"Arial");
setFontSizeAbsolute(getDataText(1),true);
setFontSizeInPoints(getDataText(1),8);
setPlaceResize(getDataText(1),0);
setFontStyle(getDataText(1),0);
setTextFormatPreset(getDataText(1),2);
setBorderColor(getSeries(2),new Color(106,189,187));
setSeriesType(getSeries(2),2);
setDisplay(getDataText(2),true);
setFontName(getDataText(2),"Arial");
setFontSizeAbsolute(getDataText(2),true);
setFontSizeInPoints(getDataText(2),8);
setPlaceResize(getDataText(2),0);
setFontStyle(getDataText(2),0);
setTextFormatPreset(getDataText(2),2);
setDisplay(getDataText(),true);
setFillColor(getDataText(0),new Color(255,255,255));
setFillColor(getDataText(1),new Color(255,255,255));
setFillColor(getDataText(2),new Color(0,0,24));
setFontName(getCurveFitEquationText(),"Arial");
setTextJustHoriz(getCurveFitEquationText(),0);
setDataLineThickness(0);
setLineWidth(getSeries(0),0);
setSeriesType(getSeries(0),1);
setMarkerShape(getSeries(1),3);
setLineWidth(getSeries(2),0);
setFontName(getDataText(),"Arial");
setFontName(getPieLabel(),"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");
setFontName(getAllText(),"Arial");
setDataTextDisplay(true);
setDataTextPosition(5);
setDataTextRadiusDefault(30);
setDataTextAngleDefault(60);
ENDSTYLE
END

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


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
Guru
posted Hide Post
Hi Waz and Mary,

This is the code you need;
  
setFillColor(getDataText(1),new Color(218,165,32));
setFillColor(getDataText(2),new Color(0,0,255));
setFillColor(getDataText(0),new Color(128,0,255));
 


The (1), (2), and (0) are the series numbers.

Hope it helps.

P.S. you can't do this from the GUI, you have to add the code.

Michelle


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Member
posted Hide Post
Thank you, I had something similar above (the highlighting did not carry through), but my did not work, while yours did, so....., again thank you!

I did find that if you also have setDataTextFormat(28); (which prints the datatext values as percentages disables the color)
 
Posts: 15 | Registered: October 17, 2012Report 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     [SOLVED] Changing the colour of datatext in a graph

Copyright © 1996-2020 Information Builders