Focal Point
(Closed) Report % NE Pie Chart feeler text % NE Hover %

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

June 20, 2014, 12:13 PM
mpbMDE
(Closed) Report % NE Pie Chart feeler text % NE Hover %
I have a report on a web page with a pie chart next to it. The hover text percentage is, in some cases, not equal to the text at the end of the feeler percentage. And sometimes one or the other is different from the report percentage. They are all carried out 1 decimal point...in other words: xx.x% format.
Report percentages are P7.1; The numbers are NOT computed; they are passed in as P7.1. The same is true of the pie chart.
I do have the following in the graph (pie chart):
 setTextFormatPreset(getPieSliceLabel(),3); 

I cannot find any infomation on the formats actually used in pie charts or if there is a way to make them match the report exactly.
Any help would be greatly appreciated.
Thanks in advance!
Marilyn

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


WebFOCUS 8.1.05 Windows 7, all output
June 22, 2014, 10:19 PM
StuBouyer
You want to have a look at the Using WebFOCUS Graphics chapter of the WebFOCUS Graphics manual - specifically the "Formatting Numbers" section.

It lays out all the preset number formats and how to create custom formats.

Cheers

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)
June 23, 2014, 12:03 PM
mpbMDE
All three are printing in the format xx.x%. The issue is that the percentages don't match. They are off .1% in some cases - so it has to be a rounding issue. The manual does not mention rounding differences or whhether the data is F (floating point) or P.
Granted, I haven't read every page of that manual; but the answer to the issue doesn't appear to be there.
Thanks for the clue, though.


WebFOCUS 8.1.05 Windows 7, all output
June 24, 2014, 08:10 PM
StuBouyer
Ahh, that would be a different manual then.

I remember from training that F/D values are treated differently than P when rounding.

F/D formats store the actual number (to the depth of the precision) and round only when being displayed.

P formats round at the time of assignment.

Here is an explanation from the Describing Data with WebFOCUS Language manual - http://documentation.informati...g/source/topic39.htm

Rounding

The details of rounding are handled in the following ways for the following numeric formats:

Integer format. When a value with decimal places is assigned to an integer field, the value is rounded before it is stored. If the value is assigned using a DEFINE or COMPUTE command, the decimal portion of the value is truncated before it is stored.

Packed-decimal format. When a value is assigned to a packed-decimal field, and the value has more decimal places than the field format specifies, the value is rounded before it is stored.

Floating-point single- and double-precision formats. When a value is assigned to one of these fields, and the value has more decimal places than the field format specifies, the full value is stored in the field (up to the limit of precision determined by the field internal storage type). When this value is later displayed, however, it is rounded.

Note that if the decimal portion of a floating-point value as it is internally represented in hexadecimal floating-point notation is repeating (that is, non-terminating), the repeating hexadecimal number is resolved as a non-repeating slightly lower number, and this lower number is stored as the field value. In these situations, if in the original value of the digit to be rounded had been a five (which would be rounded up), in the stored lower value it would become a four (which is rounded down).

Are yout ACTUAL and USAGE the same for your P7.1 field?

Regards

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)
June 25, 2014, 11:57 AM
mpbMDE
Thanks, Stu!
That is exactly the information I was looking for.

The issue was one within the data.

I appreciate your support!!
Marilyn


WebFOCUS 8.1.05 Windows 7, all output