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] Has anyone ever changed the series color of a chart dynamically....

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Has anyone ever changed the series color of a chart dynamically....
 Login/Join
 
Guru
posted
I have a line (JSCHART) chart with many many lines, each representing a 24hr period of the date range selected. It reminds me of like Widows Performance Monitor.

Just like performance monitor, I'd like to click on a series and turn the color to black so that I can see it among the many colored lines.

Anyone done anything like that?

I was thinking I could have the chart drill down to itself, pass the series id and change the color in the style sheet. Currently the series colors are automatically assigned so I'll probably have to take control of that.

I'll probably also want to capture the current color of the selected series so I can restore it when they click on another line.

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Expert
posted Hide Post
I did play around with this a couple of months ago.

Mine was based on mouse-over on the legend to highlight the series.

I'll see if I can find the technique.


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
Expert
posted Hide Post
This is the example of events on charts I did.

It may give some insights on what you want to do.

http://forums.informationbuild...317005486#8317005486


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
Expert
posted Hide Post
OK, this is a bit complicated, but with the events, you can change colour with :

With what I did, I had to "backup" the colours so I could restore them on mouse out.

for (var cs=0;cs<eventobject.chart.series.length;cs++) {
	if (eventobject.chart.getSeries(cs)) {
		if (cs == eventobject.series) continue ;
		if (eventobject.chart.getSeries(cs)) {
			eventobject.chart.set({series: [{series:cs,color: MyColour }]});
		}
	}
}
eventobject.chart.redraw();


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
nice idea.

Thank you,


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Gold member
posted Hide Post
Save this as jeffrey999.fex

-DEFAULTH &COUNTRY='_FOC_NULL';
GRAPH FILE CAR
HEADING
SUM CAR.BODY.DEALER_COST
BY COUNTRY NOPRINT
ON GRAPH SET LOOKGRAPH HBAR
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB ON
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET STYLE *
DEFMACRO=COND0001,COLUMN=N2,MACTYPE=RULE,WHEN=COUNTRY EQ '&COUNTRY',$
DEFMACRO=COND0002,COLUMN=N2,MACTYPE=RULE,WHEN=COUNTRY NE '&COUNTRY',$
TYPE=DATA,COLOR=RGB(194 11 11),MACRO=COND0001,$
TYPE=DATA,COLOR=RGB(11 11 194),MACRO=COND0002,$
$
TYPE=DATA,
COLUMN=N2,
FOCEXEC=jeffrey999( \
COUNTRY=N1 \
),
TARGET='_self',
$
ENDSTYLE
END


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 74 | Registered: December 23, 2013Report This Post
Expert
posted Hide Post
Can you use "seriescolor(#)=&Color1"
Or something like that?
Or, do you want the series colors to be always consistent throughout?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report 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] Has anyone ever changed the series color of a chart dynamically....

Copyright © 1996-2020 Information Builders