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

Coloring Specific Columns

martinfruehmorgen opened this issue · comments

Hello,

Is there a way to add a background color to specific columns (this means dates), for example all the weekends?

Thanks,
Martin

commented

Hello,
The problem here is that the columns strokes are in fact a background-image.
So it seems possible to make a pattern since I managed to add coloured columns on the img but will be very tricky to use it to add a background color to specific columns with this configuration for now.

If you want to make some tests go to src\column\Columns.svelte
image

It's a good enhancement idea though

Hello, The problem here is that the columns strokes are in fact a background-image. So it seems possible to make a pattern since I managed to add coloured columns on the img but will be very tricky to use it to add a background color to specific columns with this configuration for now.

If you want to make some tests go to src\column\Columns.svelte image

It's a good enhancement idea though

"background-position-x" has to depend on the start date and the background image has to be adjusted.
I will look into this and create an option to color weekends.

Hi Primenotes,

Were you able to create an option to color weekends?

Thanks,
Martin

commented

@martinfruehmorgen and @Primenotes
I might have a solution coming soon if it's for weekends only.
I'm currently figuring out the best way to make it more configurable (ie highlighting specific days, months, weeks, years) depending on the unit selected for the columns.
But if your need is only about week-ends I can focus on this and try to publish a light version for now

In the current version it works, but if the size of the Gantt is modified, all highlighted columns will be displayed wrongly (due to the background image, IMO).
I've tested it on version v3.0.4-beta due to this bug on the v4.0.9-beta.

This can be closed after #152 ?