HumbleSoftware / Flotr2

Graphs and Charts for Canvas in JavaScript.
http://www.humblesoftware.com/flotr2/
MIT License
2.45k stars 528 forks source link

bar chart multiline label align #194

Open tanek100 opened 11 years ago

tanek100 commented 11 years ago

if bar chart have multiline yaxis labels then they are not aligned correctly. If yaxis labels column width could be set by code it would definitely help. flotr2_bugs_bars

cesutherland commented 11 years ago

Please fork this with your reproduction: http://jsfiddle.net/cesutherland/ZFBj5/

I believe this can be fixed with CSS.

On Wed, Jan 30, 2013 at 4:32 AM, tanek100 notifications@github.com wrote:

if bar chart have multiline yaxis labels then they are not aligned correctly. If yaxis labels column width could be set by code it would definitely help. [image: flotr2_bugs_bars]https://f.cloud.github.com/assets/3244218/110314/a623e9ac-6abf-11e2-8537-c5ad6491c9be.png

— Reply to this email directly or view it on GitHubhttps://github.com/HumbleSoftware/Flotr2/issues/194.

tanek100 commented 11 years ago

i can't reproduce the problem but the problem was css based. I changed the y labels font size with css and that caused the word wrap to be out of place. Why i did this is because there is no way to set the labels font size in code.

http://jsfiddle.net/eQHF8/3/ as seen here, the canvas font size is 25 there, but the font on chart is not 25px and also there is a missing vertical gridline there (last one).

tanek100 commented 11 years ago

Here is also an example where it is not working http://www.upload.ee/files/3031831/FlotrTests.zip.html

cesutherland commented 11 years ago

So this reproduces the issue, correct? http://jsfiddle.net/cesutherland/D5D3V/

tanek100 commented 11 years ago

yes

tanek100 commented 11 years ago

flotr2_bug_barfontsize

what also happens with css font-size is this.

SimonHarte commented 11 years ago

I have the same problem with fontSize not applying and a missing last grid line. How did you solve the grid line problem @tanek100 ?

tanek100 commented 11 years ago

x-axis max is 5.01 then the library draws a line at the end.