Is there a way to keep only the bottom part in vis.js timeline frame?

81 Views Asked by At

I built the following frame using vis.js timeline:

enter image description here

But I'd like to keep only the bottom part (highlighted in blue). Is there a way to achieve that?

Respectively code:

export const TimelineGraph = (props) => {
  const items = props.items;
  const container = useRef(null);

  const options = {
    showCurrentTime: false
  };

  useEffect(() => {
    const timeline = container.current && new Timeline(container.current, items, options);
  }, [container, items]);

  return (
    <div
      ref={container}
      className={'container'}
    />
  );
};
1

There are 1 best solutions below

0
wisentini On BEST ANSWER

I think I found a solution. You just need to add min and max options to the options object, like so:

const options = {
  showCurrentTime: false,
  min: getLowestDate(),
  max: getHighestDate(),
};

After that, the upper bar was gone.