youcef92 / flotr

Automatically exported from code.google.com/p/flotr
0 stars 0 forks source link

Stacked bars with markers incorrect text position #125

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. enter at least 2 data
2. "stacked:true"
3. "markers:true"

What is the expected output? What do you see instead?
- markers are offset to a correct y-position

What version of the product are you using? On what operating system?
- 0.2.0

Original issue reported on code.google.com by ohh...@gmail.com on 23 Apr 2010 at 7:56

Attachments:

GoogleCodeExporter commented 8 years ago
Please try the latest subversion trunk first. A lot of things have changed, it 
might include a fix for this problem.

Original comment by peter....@solide-ict.nl on 20 Jul 2010 at 11:25

GoogleCodeExporter commented 8 years ago
So I checked trunk in rev. 169. This is still not supported. The problem in 
solving this problem is that markers are implemented as an independent graph 
type, so in my opinion it could be bad idea to implement them to know about 
other graph types (i think about stacked bars charts). Of course if developers 
have other opinion i will be pleased to read it, and than i can try to think 
about solution. 

One temporary solution that I thing could work is to provide individual data 
series for markers, where as y value you can provide sums used in stacked bars. 

Original comment by macku30@gmail.com on 16 Aug 2010 at 12:37

GoogleCodeExporter commented 8 years ago
Actually I fixed it in my local copy at line 3423 with:

var markerOffset = 0;
if(series.bars.stacked) {
    $H(xa.values).each(function(pair) {
        if (pair.key == x && (y > 0)) {
            markerOffset = pair.value.stack || 0;
            yPos = ya.d2p(markerOffset);
        }
    });
}

Just before the plot function.

Original comment by ohh...@gmail.com on 16 Aug 2010 at 3:51

GoogleCodeExporter commented 8 years ago
@ohhohe: Hi, where is line 3423? I looked in 
http://code.google.com/p/flotr/source/browse/trunk/flotr/flotr/prototype/flotr.j
s#3423
and it does not look right

Original comment by spoon.re...@gmail.com on 10 Sep 2010 at 2:00

GoogleCodeExporter commented 8 years ago

Original comment by macku30@gmail.com on 16 May 2011 at 9:37

GoogleCodeExporter commented 8 years ago
There are two different types of stacked charts, both behave in different way 
with negative values. "Stacked Bars" like charts sum negative and positive 
values independently (this only reasonable way for bar charts i think). 
"Stacked Area" like charts shows exact sum, so negative and positive values are 
summed together.

Having this in mind, there should be option in stacked markers to specify which 
type of summing should be used.

Original comment by macku30@gmail.com on 24 May 2011 at 11:01

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r192.

Original comment by macku30@gmail.com on 30 May 2011 at 5:04