Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Shifting labels+bars in histogram
markcheung
Are there any way to shift the labels and the bars of a histogram? I also need to create a DateTime label at the origin. I would like the graph display the wholes of the bars, but the first and the last bars are only half shown.
I tried: xAxis.setLabelPosition(Position value) and it yields an error.
Find more posts tagged with
Comments
mwilliams
Hi MC,
Can you post a screenshot of what your chart looks like? Also, if you could, an example report design built off of a csv database or something that I can run, that may be helpful as well.
markcheung
I am using BIRT Chart Engine to create a histogram view rather than a report. The only way to do so using BIRT is by starting with a bargraph and making it look like a histogram. The label that I am getting is a set of x-axis scales (in CDateTime format), so it is something like 07/ 28 05:00, 7/28 10:00, 7/28 15:00, 7/28 20:00. I have already gotten the frequencies for the time range, and I would like to make it look like a histogram rather than a bar graph. I can either set the scales' label to a set of ranges (07/ 28 00:00 <strong class='bbc'>-</strong> 07/ 28 05:00, 07/ 28 05:00 <strong class='bbc'>-</strong> 7/28 10:00, etc) or insert a beginning scale label with no value and shift all the bars to the left.<br />
<br />
Code snippet:<br />
<br />
xAxis = chart.getPrimaryBaseAxes()[0];<br />
xAxis.getLabel().getCaption().getFont().setRotation(45);<br />
// xAxis.setLabelPosition(Position.RIGHT_LITERAL); //error<br />
xAxis.setGapWidth(10); //??<br />
xAxis.getTitle().getCaption().setValue("Time");<br />
xAxis.getTitle().getCaption().setColor(ColorDefinitionImpl.CREAM());<br />
xAxis.getTitle().setVisible(true); <br />
String k=xAxis.getLabel().getCaption().getValue();<br />
System.out.println("Value: "+k); -->print out "Value: " no k value?
markcheung
Here's a screenshot (attached). Same as the other thread.