Misbehavin' Baa Chart Labels

Another charting 'tidbit' today  - for those of you in the UK substitute the 't' - its too rude for American ears/eyes so we use a 'd' here ... 'phnarr, phnarr' - sorry America another UK joke, that is, unless you read one of the more boorish comics from the UK in which case, Go Finbarr!
 
I wish I could find a way to help you more to relieve the pain and misery that is the fine tuning of charts in BIP. There is a new chart dialog coming with a property palette for all the finite control you might need but thats a little ways out.
When I get questions, I resort to trawling throu the graph DTD to try and find what I need to get some niggly piece of text to behave as I need - its a slow and laborious process. 
I received a mail from Mayur from Keste, an Oracle partner yesterday asking:


I want a simple Bar chart (Single Bar) with numbers on top. See below image.


I have following code for the image on the template.


ChartLabel1:

chart:


<Graph depthAngle="50" depthRadius="8" pieDepth="30" pieTilt="20" seriesEffect="SE_AUTO_GRADIENT">
<Title text="MBS Past 24hrs Dispatches" visible="true" horizontalAlignment="CENTER"/>
<MarkerText visible="true" markerTextPlace="MTP_TOP"/>
chart data definition ...
</Graph>


I am able to see the chart, with numbers. But numbers are with decimal points. Like 31.00, 20.00, 2.000 etc. I want to see number like 31, 20, 2, 13, 16 etc. I have tried to format using ViewFormat, but it痴 not working.


I have been playing with it on and off and getting annoyed, you may remember I documented the same thing for Pie charts a while back. Applying the same principles I started looking for the right elements to use in place of PieLabel - how about 'ColLabel' ... nope, not there, there is a ColLabels but thats no use. After a lot of frustration I came up with an idea this morning to load the DTD into XMLSpy and then convert it to a schema. XMLSpy has a nice expand and collapse feature for schemas that lets you see dependencies, etc. Within 2 mins I had the code I needed! 

So if you need to control the number format of your bar values then just add:


<MarkerText visible="true">
<Y1ViewFormat>
<ViewFormat decimalDigit="0" decimalSeparatorUsed="true" decimalDigitUsed="true"/>
</Y1ViewFormat>
</MarkerText>


under the <Graph> tag ... boo ya!

Comments:

Hi Tim, I have an issue. I have created a template which has a Chart. When i preview the report through Word in desktop, chart is coming . but when i run through the peoplesoft PIA chart is not coming. Kindly please suggest me how can i see the chart. Many thanks in advance. Regards, Dhaya.

Posted by Dhaya on May 10, 2009 at 10:30 PM MDT #

Awesome... this worked for me... This is exactly what I was looking for - controlling decimal points over the pillars in bar chart... Now, one more question .. can I display % sign next to the marker text? If so, how? Thanks for posting that Marker Text soultion...

Posted by Amar Mistry on September 03, 2009 at 07:06 AM MDT #

Hi Amar Yes you can display the % sign. You need two more attributes in the ViewFormat element numberTypeUsed="true" numberType="NUMTYPE_PERCENT" These will format the numbers to percentages Tim

Posted by Tim on September 03, 2009 at 07:51 AM MDT #

Tim That worked fine. Thanks again for your help. I really appreciated it. Amar

Posted by Amar on September 04, 2009 at 12:39 AM MDT #

Hi Man, It's not working with line chart. I get angry of always showing 100K instead of 100000. How to fix it friend? Please help me asap. Thank you in advance. Nam Nguyen

Posted by Nam Nguyen on September 29, 2009 at 09:19 PM MDT #

Dear Tim, I have an issue. I need to decrese the font size of the Bar Values in chart. Also i need to change the format of numbers displayed. They are getting displayed in #### form and i need in ## form only. How to achieve this. Mohit

Posted by Mohit on April 24, 2010 at 10:19 PM MDT #

Dear Tim, I have an issue. I need to decrese the font size of the Bar Values in chart. Also i need to change the format of numbers displayed. They are getting displayed in #### form and i need in ## form only. How to achieve this. regards, Mohit

Posted by Mohit on April 24, 2010 at 10:19 PM MDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Follow bipublisher on Twitter Find Us on Facebook BI Publisher Youtube ChannelDiscussion Forum

Join our BI Publisher community to get the most and keep updated with the latest news, How-to, Solutions! Share your feedback and let us hear your voice @bipublisher on Twitter, on our official Facebook page, and Youtube!

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today