Closed numeroteca closed 10 years ago
I was trying to solve this, @elplatt how is this line working? https://github.com/numeroteca/pageonex/blob/master/app/assets/javascripts/dataviz.js#L101: .attr('y1', function (ty) { return Math.floor(y(ty)) + padding.top + 0.5; })
Math.floor rounds the y value towards 0 (top of the screen) and 0.5 is added to get a crisp line. If you draw a 1px line on an integer, it get anti-aliased between two rows of pixels.
To change the stacking, you can just change the order in which things are drawn.
I'm not sure what you mean about the lines not being aligned with the tick marks, can you explain?
Also, I can make the lines on top of the bars, but if we make them white then they will blend in with the background. Is that what you want? Or should we keep them gray?
Now, grey lines and short are not aligned.
On Monday, July 1, 2013, Edward L Platt notifications@github.com wrote:
I'm not sure what you mean about the lines not being aligned with the tick marks, can you explain?
Also, I can make the lines on top of the bars, but if we make them white then they will blend in with the background. Is that what you want? Or should we keep them gray?
— Reply to this email directly or view it on GitHub.
Grid (now white) and ticks still not aligned (marked in pink) in some threads:
Ex: http://dev.pageonex.com/numeroteca/test-2-open-thread-for-media-lab-festival/
The alignment should be fixed now. Due to weirdness with d3 one scale was starting from the top and one from the bottom.
I'm going to push back on the white lines. I see two benefits of having lines across the entire chart:
mmm, I still see the grid not aligned, from top to bottom http://dev.pageonex.com/numeroteca/test-2-open-thread-for-media-lab-festival/
Re: white lines, ok let's push back and see how it looks. I was trying to keep it as simple as possible, while every pixel has a meaning.
Fixed and tested on dev.
These lines start at the top of the graph, and do not align with the ticks of the y axis. Besides I would like them to be white lines on top of the bars.
The base line is behind the bars, it should be on top of them.
Related to 3716902.