More Charting Tips
By Tim Dexter-Oracle on Aug 20, 2009
Too many questions on the love of my life, BIP charts. Oh the joy of finding out how to add a trendline or a fixed horizontal line, the list goes on. Its quite easy really but that's because I have an internal chart rendering tool that generates the XML I need to do cool stuff in charts. Some times I have to resort to scouring the chart DTD but the tool lets me test the feature I want. Sadly, the tool is not owned by BIP so we do not have the authority to make it public but I so wish it were. It would help you to help yourselves sooo much.
Two things to cover today ...
X Axis Labels
I've a Bar chart where X-axis labels are coming as horizontally-alligned and one value above, next value in a level below...so on.
Is it possible change the alignment to -45 degree as it is available in excel chart? x-axis data label points will be displayed in uniform way then.
45 degrees is not possible at the moment. you can get them to show at 90 or 270 degrees thou
<O1TickLabel textRotation="TR_HORIZ_ROTATE_90" automaticRotation="AR_NO_ROTATE"/>
you can influence other properties too
<O1TickLabel textRotation="TR_HORIZ_ROTATE_90" automaticRotation="AR_NO_ROTATE">
There was a followup kindly answered by Vetsrini
Fixed Axis Scale
Is it possible to define a fixed scale for x-axis? I see by default Bipublisher decides scale based on the value coming from dataset. I want to set scale always from 0 to 500 with label showing at interval of 10.
<X1Axis axisMinAutoScaled="false" axisMinValue="0" axisMaxAutoScaled="false"
axisMaxValue="500" majorTickStepAutomatic="false" majorTickStep="10"/>
Static Chart Line
How do I show a static line on my chart?
Vetsrini and I seemed to be in a race to answer charting questions yesterday :0)
Inside the Graph tag use:
<ReferenceLine index="0" visible="true" lineWidth="2" text="My Ref Line" value="550.0" displayedInLegend="true" lineColor="#3366ff"/>
Does BIP have the ability to create trend/regression lines?
Yep, it does, manual job like the others above but possible.
Under the Graph tag
Valid vaues for fitlinetype are FT_LINEAR|FT_LOGARITHMIC|FT_EXPONENTIAL
if you want multiple lines fitted to data points
<Series id="0" fitlineType="FT_LOGARITHMIC"/>
<Series id="1" fitlineType="FT_EXPONENTIAL"/>
I'll blog em as they come in and we manage to answer them. Happier charting!