Hello Everyone,
Just
want to share with you regarding the BI Publisher tips and tricks or issues
that I faced while working on the tool. You may have seen or read this issue at
some other blogs or using some other ways you may have figure out.Just started
my blog to explore more on BI Publisher issues and tried to consolidate all at
one place.
BI Publisher Working with Graphs:
Line Graph:
Default Line chart in rtf template looks like one shown
in the figure below.
As you can see in the default graph above prepared in
rich text format does not provide us much flexibility.
So as per my requirement, need the below mention points
to be solved in my graph:
a) Thickness
of the line graph should be less.
b) Data
labels should not contains any decimal place
c) Data
labels should not overlap with the Y-Axis
d) Data
labels should be displayed by a Marker on the line graph.
So for doing the same we will solve the
issue one by one by using the Advanced tab in the charts.
Thickness
of the line graph should be less :-
For
doing so we just need to add a lineWidth="2" in the seriesitem tag in
the advanced option of the charts.
<SeriesItems><Series
id="0" color="#C0C0C0" lineWidth="2"
/></SeriesItems>
After
making the changes please find the reduction in the thickness in line graph as
shown below.
Data
labels should not contains any decimal place:-
As by
selecting the decimal place value as zero then also it always shows with one
decimal points.
So
for achieving the same please find the changes that needs to be done in the
advance chart option.
<Y1ViewFormat><ViewFormat
decimalDigit="0" decimalSeparatorUsed="true"
decimalDigitUsed="true" /></Y1ViewFormat>
Add
this in tags after the <MarkerText visible="true"
markerTextPlace="MTP_OUTSIDE_MAX"> tags as we are using the
measure in our Y-Axis so formatting tag contains Y1ViewFormat.
So by
doing so we will be able to remove the decimal from the data label please see
the figure below:
Data labels should not
overlap with the Y-Axis:
As you can see the data
label for the Quarter 2008Q1 is overlapping the Y-Axis and it little difficult to
see as well. So for the same we will use some tags or parameter to re arrange
the datalabel i.e marker text on the graph.
<MarkerText
visible="true" markerTextPlace="MTP_CUSTOM"
markerTextAngleDefault="45"
markerTextRadiusDefault="25">
Where markerTextAngleDefault
specifies at which angle the data marker should be present.
markerTextRadiusDefault
specifies from how much distance from the center of the marker should value be displayed.
markerTextPlace: for using
the adove parameter or tags we need to use MTP_CUSTOM as the value by default
there are other values like “MTP_OUTSIDE_MAX,MTP_ON_MAXEDGE,MTP_INSIDE_MAX,MTP_INSIDE_MIN”
But for using the above
parameter or tags we need to use markerTextPlace as “MTP_CUSTOM”
So by making the changes as
discussed above you can see there is a difference in the data label value
displayed and it is shown below.
Data
labels should be displayed by a Marker on the line graph:-
Ad
you can see the data label displayed on the line graph does not have any marker
or symbol on the line to represent it.
So
to achieve the same we will be adding some custom code to do the same.
Please
add the mention stuff in the advance chart option to achieve it markerDisplayed="true"
markerShape="MS_DIAMOND"
You
can use different shape for marker like MS_SQUARE, MS_CIRCLE,
MS_DIAMOND, MS_PLUS,MS_TRIANGLE_DOWN & MS_TRIANGLE_UP
<Graph
seriesEffect="SE_AUTO_GRADIENT" graphType="LINE_VERT_ABS"
markerDisplayed="true"><SeriesItems><Series
id="0" color="#C0C0C0" lineWidth="2"
markerShape="MS_DIAMOND" />
After
making this changes it will be displayed on graph as shown below.
So
by using the above options was able to achieve some of the formatting as
required.
Will
be coming up with Part 2 for BI Publisher Graph Formatting soon.