Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 170985

Summary: Strip Charts for Line Graphs
Product: z_Archived Reporter: looneytoons4000
Component: BIRTAssignee: Heng Li <liheeng>
Status: VERIFIED FIXED QA Contact: Maggie Shen <lshen>
Severity: enhancement    
Priority: P3 CC: bluesoldier, wenfeng.fwd
Version: 2.1.1Keywords: plan
Target Milestone: 2.5.0 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard: Autoed,G-text
Attachments:
Description Flags
Example none

Description looneytoons4000 CLA 2007-01-18 20:06:05 EST
Hello,

I am currently using BIRT v. 2.1.1 and I have a need to compare multiple entity value ranges against each other on a line graph.  The line graph is a single Cartesian coordinate system where the Y-axis represents units (say, bytes) and the X-axis represents time (say, a time range within a single day).  As an example, I may have a major entity (say, application) where each entity is a line with its own color.

I have encountered situations where one entity (say, "app1") has values which fall within a "big" range (say, 500,000 to 1,000,000) and another entity (say, "app2") that has a "small" range (say, 0 to 1000).  In this situation, "app1" completely overshadows "app2".  It is like trying to compare an elephant to an ant.  The ant is simply not visible.

Would it be possible to have both entities co-exist on the same line chart, but allow each entity to have its line segment of a single Y-axis (where each segment has it own lower and upper bound labels)?  In this case, all entities would share the same X-axis.  Other firms who provide this feature call this a "strip chart".

Any suggestions would be welcome.  Thanks.
Comment 1 David Michonneau CLA 2007-01-22 05:25:01 EST
I think what you refer to is a unique Y Axis which contains two scales, and is 
shown as dashed in between. This is indeed a possible enhancement, so I'm 
scheduling this as such.

However for now, you can create two Y Axes, each of them with one line series. 
That will solve your problem.
Comment 2 Hank Christensen CLA 2008-04-14 17:44:22 EDT
A more general enhancement that would cover this scenario is to extend the 
second y-axis so that instead of being drawn on the other side the chart from 
the original y-axis, it appears directly below the original y-axis.  This is 
also called a study chart (often used to combine volume data with a 
high-low-close stock chart).  User should be able to set the vertical 
contribution area of each y-axis to 50% so that the chart appears divided down 
the center, with one y-axis scale on top and the other y-axis scale on the 
bottom of the chart.  This rendering has been considered for enhancement ever 
since the chart package was designed, and we will keep this bug open for 
consideration with regard to this enhancement.
Comment 3 Hank Christensen CLA 2008-04-14 17:44:30 EDT
A more general enhancement that would cover this scenario is to extend the 
second y-axis so that instead of being drawn on the other side the chart from 
the original y-axis, it appears directly below the original y-axis.  This is 
also called a study chart (often used to combine volume data with a 
high-low-close stock chart).  User should be able to set the vertical 
contribution area of each y-axis to 50% so that the chart appears divided down 
the center, with one y-axis scale on top and the other y-axis scale on the 
bottom of the chart.  This rendering has been considered for enhancement ever 
since the chart package was designed, and we will keep this bug open for 
consideration with regard to this enhancement.
Comment 4 Hank Christensen CLA 2008-04-14 17:44:38 EDT
A more general enhancement that would cover this scenario is to extend the 
second y-axis so that instead of being drawn on the other side the chart from 
the original y-axis, it appears directly below the original y-axis.  This is 
also called a study chart (often used to combine volume data with a 
high-low-close stock chart).  User should be able to set the vertical 
contribution area of each y-axis to 50% so that the chart appears divided down 
the center, with one y-axis scale on top and the other y-axis scale on the 
bottom of the chart.  This rendering has been considered for enhancement ever 
since the chart package was designed, and we will keep this bug open for 
consideration with regard to this enhancement.
Comment 5 Heng Li CLA 2009-04-16 00:00:35 EDT
Updated chart model to support rendering multiple Y axes like Study chart layout.
Added two attributes:
1. StudyLayout:boolean(ChartWithAxes)
2. AxisPercent:int(Axis)
Comment 6 Heng Li CLA 2009-05-11 02:23:01 EDT
Created attachment 135102 [details]
Example
Comment 7 Heng Li CLA 2009-05-11 02:24:45 EDT
Fixed. Now it has been completed as a general enhancement to support Study layout for multiple Y axes, all Y axes can be arranged as vertical/horizontal to share X axis.
1. Changed chart model to support study layout.
2. Changed chart engine to compute layout for Study layout.
3. Changed chart builder UI to set Study layout. If current is set multiple Y axes, there is a check box 'Enable study layout' in 'Formst Chart'->'Chart Area' sheet. If the check box is selected, the 'Axis' sheet will show 'Axis Percent' box for each Y axis, it allows user input the number percent of Y axis, the number percent is relative to the total axis percent value of Y axes, it indicates the height percent of Y axis.

Please refer to attachment.
Comment 8 Maggie Shen CLA 2009-05-19 03:17:59 EDT
verified on build 2.5.0 v20090519-0630. Enable study layout option is added on Format Chart->Chart Area page and Axis occupation can be set on Format Chart->Axis page.