Focal Point
[SOLVED] Is it possible to control graph/chart formatting with CSS?

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

December 10, 2008, 07:10 PM
PeterV
[SOLVED] Is it possible to control graph/chart formatting with CSS?
I'm new to FOCUS in general, so I'm not sure if I'm even asking this question correctly.

The dashboard that my team is creating is, in typical fashion, a mix of summarized values and a series of graphs and charts.

Using external style sheets to format the fex's that contain the rollups of values went along just fine.

Formatting Charts/Graphs hasn't worked yet. I'm reading on formatting through the API's, however for consistency, I still hoped that it was possible to control how graphs & charts are formatted through the same style sheets we reference elsewhere.

Could someone tell me if this is a possibility? If not, is editing of the generated API scripts the only way to control the look/feel of charts and graphs?

Thanks for the help Smiler

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


WebFOCUS v. 7.6.10
___________________
Win2k3 Server
Intel Xeon 2.3Ghz/4Gb Ram Apache / IIS / SQL Srvr 2005
December 10, 2008, 09:55 PM
Waz
What you have asked is a simple question, but the answer is not so simple.

The graph is self is formatted by the graph control language, check the documentation.

Around the graph is wrapped a "HTML report", this can be styled with CSS.

What sort of styling did you want to do ?


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!

December 10, 2008, 09:59 PM
PeterV
Hi, thanks for your response.

The goal is to standardize things like font properties (family, scalable sizes, color), and potentially the graphed colors, the background color on the page. At least, these are the things that come most readily to mind.

I have been reading the documentation, however there's quite a lot in PDF that we've been reading through, however I hadn't landed on an absolute answer and thought to turn to the actual user base for help.

Appreciate you taking the time to respond!


WebFOCUS v. 7.6.10
___________________
Win2k3 Server
Intel Xeon 2.3Ghz/4Gb Ram Apache / IIS / SQL Srvr 2005
December 11, 2008, 01:14 AM
<JG>
A graph it's self is an image and as such its properties cannot be controlled by CSS

Changes in a graph are controlled using the API. Which is either generated using the
graph tools (I would use the advanced graph assistant as much as possible) or by
manually coding the API calls in the graph style section of any generated code.

You can apply a template that sets all the basic properties of a graph. The default templates
are in drive:\ibi\srv76\home\graph\ called IBIsomething.TXT you can customize these and decide on
one as your standard. However if you upgrade WebFocus the customizations will be lost unless you
manually copy any changes back.

It really is a case of play and decide.
December 11, 2008, 02:27 PM
PeterV
Thanks so much JG. I think that's probably the answer I was looking for, even if not the one I was hoping for.

Appreciate your response Smiler
I'll check out the template idea, too.!


WebFOCUS v. 7.6.10
___________________
Win2k3 Server
Intel Xeon 2.3Ghz/4Gb Ram Apache / IIS / SQL Srvr 2005
December 11, 2008, 02:58 PM
Waz
If you have the css file accessible to the WebFOCUS server, you may be able to read it with WebFOCUS and extract fonts sizes and colours. Then use them in the graph control language.


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!

December 17, 2008, 06:00 PM
Doug
How about the following method which I have used in in the past? That is, put your "standard" graph formatting commands in a fex and simply -INCLUDE it. I've used that along with &Variable based fexes to maintain colors for pie slices and bars as well.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206