Lighthouse-io / react-visjs-timeline

React component for the vis.js timeline module
MIT License
210 stars 91 forks source link

Dynamic height #100

Closed MacGyver98 closed 3 years ago

MacGyver98 commented 4 years ago

Overview

I'm trying to set options = { height: "100%" } but it doesn't work cause the div element added inside your component (whose wrap the class="vis-timeline ...") needs a "height: 100%;" css property. I added by my css. i would like sugest you put it on that div.

Package versions

react-visjs-timeline: 1.6.0 vis version: 6.3.5

Code Snippet

My options obj:

  const options = {
    width: "100%",
    height: "100%",
    stack: false,
    showMajorLabels: true,
    showCurrentTime: true,
    zoomMin: 1000000,
    //type: 'background',
    format: {
      minorLabels: {
        minute: "h:mma",
        hour: "ha"
      }
    }
  };

Screenshots (if appropriate)

In my browser looks like this... image

image ... and, when i add this height it fixes ! image

Thanks for read this!