Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Chart set to specific width but shrinking based on data
paqman
Hey BIRT Exchange,
I've set up a chart at the very end of a report, to show monthly averages for the data being reported on. It needs to only show the last 4 months (so 4 bars, 1 for each month). I've set the chart to be about 7.5 inches wide (width of the tables above it) but when I run the report the attached image is produced. It seems to ignore the width I've set and resize based off of only having a small number of bars (2 in the attachment, as there isn't any data for the prior 2 months).
Is this known behavior, or should it be set to 7.5 inches wide? We are using BIRT 2.6.2.
Thanks in advance
Find more posts tagged with
Comments
mwilliams
What is your BIRT version? Can you recreate this with the sample database?
paqman
We are using version 2.6.2. I will try to reproduce the problem in a brand new report using some sample data.
mwilliams
If you specify that the chart is 7.5 inches, it should be 7.5 inches wide regardless of bars. If you're able to reproduce this, I'll try it in 2.6.2 and 3.7.0 and see if I see the same. If so, I'll ask you to log a bug.
Let me know when you have a sample.
paqman
Sorry for the delay... I've tried creating a blank report and adding a scripted data set to get the same kind of values in my full report, and the **** chart works perfectly (correct width). I then figured it might be something corrupt in the existing report, so I deleted the chart and re-created it exactly as I had in the blank report, but it still is shrinking.
Not sure if indicates anything, but when I enabled the 'show value' option for the legend it expanded the chart a little bit, which forced the HTML version to show horizontal and vertical scroll bars (it really wants it to be that exact size). But I don't know if that indicates anything useful.
Perhaps I can send you the full report with sample XML for the data source...? Otherwise I'm about to start over with these reports from scratch
Thanks for all the help!
paqman
The plot thickens... In the process of creating the report from scratch, I've re-created the exact same problem! I haven't included any of the old report elements - this is a brand new design file. In the preview in BIRT Designer the chart is the correct width, but when our report application generates the report files it has the old fixed width again (should be 8 inches but ends up being about 2 and a bit):
paqman
Found the cause of the problem at long last - user error! I was using BIRT Designer 2.6.2 while our application was using the 2.6.1 engine. This caused things to look like they were working fine (most things did work) but there were some minor inconsistencies (like this). Sorry to waste your time!
mwilliams
Sorry for the delay. I was out with a long weekend and was in the middle of catching up. Glad you found the solution!
Let us know whenever you have questions!
jain
Hi is it possible to keep the bar width constant? I have mapped the xaxis and yaxis of the bar chart to the dataset column.In my application,i dont know the number of items that will be shown in the bar chart ,after i run the chart.Number of items to be shown in the bar chart are random ,coming from my database.So if the item is 1,then the width of bar in the bar chart increases ,if the items are 10,then the width of bar in the bar chart decreases. I want to keep the bar width constant. So how can I do it?
mwilliams
Something like this devShare example might help you out:
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1409-resize-bar-chart-based-on-the-number-of-bars/