Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Wayster (TechnicalUser) (OP)
26 Feb 04 3:58
Help !
I've just started learning to use WebFOCUS 436 and need to plot some dual Y axis bar/line combination graphs with
X axis = week number
Y1 axis (line)= "affected %"
Y2 axis (bar) = "total number"

I have been able to produce the necessary graphs quite easily using the WebFOCUS graphing tool, but I can't find a way to change the formats of the Y axis scales to give the desired format :

Y1 axis (line)= "affected %"
desired format : displayed to 3 decimal places eg. 10.241%)
current format : integer
(raw data already has 3 decimal places)

Y2 axis (bar) = "total number"
desired format : displayed as integer eg 50000 or 50K
current format : displayed as integer e.g 50K
(raw data is already integer)

Currently, the Y2 axis appears correctly but I cannot change the format of the Y1 axis to give what I need.

If I use the format option in the Graphing tool, it changes to X.XX%, but also automatically multiplies my data by 100 when it assigns the '%' symbol. This is a problem, as my data is already in % format (i.e. doesnt need to be multiplied by 100) and I don't want to have to divide my original data by 100 to account for this recalculation by WebFOCUS.

So, my questions :
1) Can anyone help me to display the Y1 axis to 3 decimal places without changing the format of the Y2 axis ?
2) How do you add an axis label instead of relying on graph legends alone ? Ideally, I want to show the Y1 axis data as X.XXX and have a label on the axis reading 'Affected %'. Is this possible ?

Any help would be much appreciated !!!
Helpful Member!  Tewy (Programmer)
31 May 04 16:56
Hi Wayster,

No doubt you have solved this by now, but just in case below is some text from a document I compiled for my own WebFOCUS users on Graphing. This gives the code required to enter into the edit text screen. To control the Y2 axis just change Y1 to Y2. As for controlling Axis titles, I have also included some text on this also from my own guide. Note there is a manual called something like graphing API which covers all this. The manual I compiled just takes the most common changes we need to make to graphs were I work and covers them in 'real' english.

Regards

Tewy

Changing Number format on Axis

setTextFormatPreset(getY1Label(), -1);
setTextFormatPattern(getY1Label(), “00.0”);

The first line tells Focus to set the Y1 label display to the user specified value. The second line tells Focus to set the pattern to 1 decimal space. The format can also be defined as ##.#, the difference being

00.0    will display 16.0 as 16.0
##.# will display 16.0 as 16

This command is particularly important when graphing data that sits below 1 (i.e. 0.99 and below) as Focus generally defaults to showing value below 0.5 as 0 and value above 0.5 as 1. Hence a graph with Y values of 0.2 0.4 0.6 0.8 would be displayed as 0 0 1 1 without the settings above.

Displaying Axis Titles (Instead of Fieldnames)

setY1TitleDisplay(true);
setY1TitleString(“Value”);

The first line tells Focus to display an axis title on the Y1 Axis. The second line sets the value of this title to the word Value. This can also be used for the Ordinate axis by replacing Y1 with O1 thus

setO1TitleDisplay(true);
setO1TitleString(“Week”);

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close