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"/>
and then,
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:
<Y1ReferenceLine> <ReferenceLine index="0" visible="true" lineWidth="2" text="My Ref Line" value="550.0" displayedInLegend="true" lineColor="#3366ff"/> </Y1ReferenceLine>
and finally
Trend Lines
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
<SeriesItems defaultFitlineType="FT_LINEAR"/>
Valid vaues for fitlinetype are FT_LINEAR|FT_LOGARITHMIC|FT_EXPONENTIAL
if you want multiple lines fitted to data points
<SeriesItems>
<Series id="0" fitlineType="FT_LOGARITHMIC"/>
<Series id="1" fitlineType="FT_EXPONENTIAL"/>
</SeriesItems>
I'll blog em as they come in and we manage to answer them. Happier charting!
Comments (2)
Hi Tim,
Sorry about the race ;), didn't think, with whom am racing
~Vetri
Posted by Vetri | August 20, 2009 11:21 AM
Posted on August 20, 2009 11:21
Tried the Regression suggestion, and the chart does not render at all. Just a blank page.
Am I doing something wrong?
Posted my syntax here (not working if i post it here)
http://forums.oracle.com/forums/thread.jspa?threadID=946048&tstart=30
thanks for helping
Posted by PC | August 24, 2009 7:22 AM
Posted on August 24, 2009 07:22