sunjavagroups / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

Draw border on all four sides of floating bars #553

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Bars which have a third coordinate supplied which is the bottom/end of the 
filled bar effectively appear "floating" off the axes and look rather strange 
without a border drawn at the bottom/end.

Such "floating" bars should have a border drawn on all four sides of the bar.

Original issue reported on code.google.com by si...@lieschke.net on 16 Jun 2011 at 11:05

GoogleCodeExporter commented 8 years ago
A fix for this is available from https://github.com/flot/flot/pull/11

The attached screenshot shows what is rendered before (on the left) and after 
the fix using the attached test case.

Original comment by si...@lieschke.net on 16 Jun 2011 at 11:10

Attachments:

GoogleCodeExporter commented 8 years ago
I see where you're coming from, however, this won't work with stacked bars 
which was the original motivation for the bottom coordinates.

I think the other option is to simply always draw the outline, but it looks a 
tad silly at the axes. Maybe it would help if we get clipping at the canvas 
level.

Original comment by olau%iol...@gtempaccount.com on 17 Jun 2011 at 2:03

GoogleCodeExporter commented 8 years ago
Good point, I didn't consider the stacked bars case.

Another approach would be to have a bars option for whether the border gets 
drawn on all four sides of the bars. What are you thoughts? I'd be happy to 
evolve my fix to do this.

Original comment by si...@lieschke.net on 19 Jun 2011 at 10:10

GoogleCodeExporter commented 8 years ago
Not a bad idea. If you can invent a good option name for indicating whether 
Flot should skip one of the sides, I think that would be fine.

Original comment by olau%iol...@gtempaccount.com on 21 Jun 2011 at 7:03

GoogleCodeExporter commented 8 years ago
Why is the border from the side that touches the axis missing in the first 
place?

Original comment by m...@webxl.net on 9 Apr 2012 at 9:39

GoogleCodeExporter commented 8 years ago

Original comment by dnsch...@gmail.com on 7 May 2012 at 5:49