flrs / visavail

A D3.js Time Data Availability Visualization
https://flrs.github.io/visavail/docs/samples/basic.html
MIT License
310 stars 59 forks source link

Y-axis formatting #30

Closed CGurity closed 5 years ago

CGurity commented 5 years ago

Hello, great library! I'm dealing with labels for the Y axis that need more than 100px width, I'm trying to solve this with css but still don't find the right class/id, there is a way to accomplish this? Thank you beforehand!

CGurity commented 5 years ago

Other solution that can work for me is to have the labels visible over the bands, I'm trying to play with the z-index property or similar and I'm not successful, so I have this at the moment: image In my case it could be OK if the text is in front of the bars

tanganellilore commented 5 years ago

Hi @cguerrave the library is based on svg and you can use the svg proprerty, not css propresty. If you see the visavail code you can find this var "paddingLeft", you can modify this var in the library to adjust the left margin.

I've created a fork of visavail with some enhancment and some custom parameter (included your request).

You can follow #25 for the updates. Otherwhise you can use the new version of the library in my fork but I don't know when we upgrade the library.

At the moment in my fork the wiki is old and you can follow the example in folder docs for use the library.

CGurity commented 5 years ago

Thank you very much! I solved my problem manipulating the width on the js file, I will also check out the fork!