Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314708 - Chart ellipsis don't work when the chart axis are flipped
Summary: Chart ellipsis don't work when the chart axis are flipped
Status: VERIFIED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal with 2 votes (vote)
Target Milestone: 3.7.0 M7   Edit
Assignee: Heng Li CLA
QA Contact: Xiaoying Gu CLA
URL:
Whiteboard: Obsolete
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-27 11:44 EDT by wrestle145 CLA
Modified: 2011-05-13 01:58 EDT (History)
3 users (show)

See Also:


Attachments
Birt design file (55.97 KB, application/octet-stream)
2010-05-27 11:46 EDT, wrestle145 CLA
no flags Details
Flat data set file (1.80 KB, text/plain)
2010-05-27 11:47 EDT, wrestle145 CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description wrestle145 CLA 2010-05-27 11:44:19 EDT
Build Identifier: v20100210-0630

When using a bar chart with the axis flipped so the categories are along the left of the chart, if the labels are too long the chart does not apply an ellipsis to the label, it simply drops the chart.

Reproducible: Always

Steps to Reproduce:
1. Create a data set that has label values that are really long (60+ characters)
2. Create a bar chart and set the axis to be flipped
3. Set the chart to use the data set
4. Size the chart to use about half the width of the page (may need to vary this based on label values)

When you run this chart labels do not display at all.  If your chart is sized differently you might get the case where the labels take up most the to space of the chart and the bars themselves are squished to the point that they are illegible.  Using the ellipsis setting and/or the label span setting does not seem to have any affect.  

I think ideally the chart would have a max label width value.  Any labels past this length would be truncated but would still display.  I see this as slightly different than the label span value as this seems to force a set width all the time for the labels.  If all the labels all shorter than the max width the chart should still adjust itself to allocate the remaining space the plot portion.
Comment 1 wrestle145 CLA 2010-05-27 11:46:13 EDT
Created attachment 170211 [details]
Birt design file
Comment 2 wrestle145 CLA 2010-05-27 11:47:05 EDT
Created attachment 170212 [details]
Flat data set file

Note that you will need to update the datasource value to point to the location of the data file.
Comment 3 Michal Tkacz CLA 2010-11-13 12:26:17 EST
Can anyone please take a look at this bug? If ellipsis is already working fine when axis are not flipped, I guess it shouldn't be very hard to fix. Thanks.
Comment 4 Mike Pawlowski CLA 2011-04-22 16:45:23 EDT
Any update on this? 
This is a major issue for Rational Quality Manager 3.0.1.

I tried numerous scripting work arounds based on this forum post - none of which worked:
http://www.eclipse.org/forums/index.php?t=tree&th=168733&#page_top

* Axis label ellipsises have no effect
* Fixed label spans cause the label to disappear and prevent the chart from rendering to fill all availabe area (reserved space for labels)
* Truncating the labels via beforeDrawAxisLabels works but is done after the charting engine has already allocated space for the labels / chart
* Truncating the labels via afterDataSetFilled works but screws up the chart generation because the labels are not matched to the data series
Comment 5 Heng Li CLA 2011-04-27 04:00:05 EDT
We looked into the behavior of Excel, and found excel limits the max length of axis label can't exceed half of chart width. Now we use the same behavior for our chart, if length of axis label is tool long, chart will truncate the label to half of chart width and add ellipsis in tail automatically.
Comment 6 Xiaoying Gu CLA 2011-05-13 01:58:24 EDT
Verified in daily build 3.7.0.v20110512-0630