ANovokmet / svelte-gantt

:calendar: Interactive JavaScript Gantt chart/resource booking component

Home Page:https://anovokmet.github.io/svelte-gantt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vertical thick line

kesyous opened this issue · comments

I want to show vertical thick line on some clocks. As seen in the picture. How can i do it?

gantt_alinti

Hey! It would be easiest to use Timeranges and modify the css in TimeRange.svelte according to your needs.
I don't see much use to generally impelement such a feature.

alinti2

which class can I add to show it?

Hey, if you havent found out by now... I meant the "timeranges" module. You can define timeranges objects and assign them to svelte gantt (see the docs).

gantt_timerange

Style tag in TimeRange.svelte file. Which attribute can I set to get the vertical thick line?

We've improved this in v4.1:

  1. Add a timerange with from==to, resizable: false and some class eg. time-range-lunch:
gantt.$set({
  timeRanges: [
        {
            id: 0,
            from: time('10:00'),
            to: time('10:00'),
            classes: 'time-range-lunch',
            label: 'Lunch',
            resizable: false,
        }
  ]
});
  1. In your CSS file add a style for this class:
.time-range-lunch {
    border-left: 1px solid black;
}

This will render just a straight black line in the timeline.