tiby312 / poloto-project

MIT License
158 stars 10 forks source link

Name of data is truncated #140

Closed Icelk closed 2 years ago

Icelk commented 2 years ago

When adding data, long names are truncated in the SVG. This is due to the dimensions, I believe.

I'd be very grateful if the text would wrap or if it just wouldn't clip.

Great project!

tiby312 commented 2 years ago

@Icelk good idea. I like the idea of just making the svg image itself wider to fit the text. That sounds like a quick thing to add. Maybe have a fit_label() function as well as a extend_right(usize) Would like to eventually be able to do mult-line labels as well but last i checked its not completely straightford as to how to do that with SVG.

tiby312 commented 2 years ago

@Icelk actually you can already do this after all. I added an example.

source

rendered

Icelk commented 2 years ago

Thanks a lot! I’ll be testing this later today.

Icelk commented 2 years ago

Worked just as expected. Thanks!