nicoespeon / gitgraph.js

[ARCHIVED] A JavaScript library to draw pretty git graphs in the browser
https://www.nicoespeon.com/gitgraph.js
MIT License
3.02k stars 363 forks source link

(@gitgraph/js) Add option to make graph responsive #401

Closed nicoespeon closed 3 years ago

nicoespeon commented 3 years ago

Closes #303

Add responsive boolean to @gitgraph/js option. Setting it to true will make the graph fill the available space of its container.

Usage as following:

const gitgraph = createGitgraph(graphContainer, {
  generateCommitHash: createFixedHashGenerator(),
  responsive: true,
});

responsive-gitgraph

Note: I also fixed #321 passing by