Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request : Allowing relative width specified for the generated graphs #9

Closed
jpminnovation opened this issue Dec 30, 2021 · 2 comments · Fixed by #17
Closed

Request : Allowing relative width specified for the generated graphs #9

jpminnovation opened this issue Dec 30, 2021 · 2 comments · Fixed by #17

Comments

@jpminnovation
Copy link

Would it be possible to specify the width of the generated graphs with a relative number (percentage) and not only in pixels ?

I would like to have a definition such as :

chart::sample-data.csv[line,engine="chartjs",width="100%"]

Currently, this is not possible on :

  • asciidoctor 2.0.16
  • asciidoctor-chart 1.0.0.alpha.1
@ggrossetie
Copy link
Member

As mentioned in #8, Chart.js always uses a width of 100% (and does not support specific width or height)
C3.js seems to only support width and height in pixels.
And finally, Chartist always uses a width of 100%.

Again, if my assumptions are incorrect, feel free to comment.

@jpminnovation
Copy link
Author

If I don't specify width, it does not scale to 100% per default :
image

However, if I try to put whatever number for width and height, it is getting "larger" than the case above, but with the problem of overlaping what is below the graph :
image

So not sure of the 100% default.

Finally, if I do specify width and height to 100%, it seems to take the full width (without any relation to the number I do specify, may it be 50% or 100%, but take the full width) :
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants