svelte-gantt icon indicating copy to clipboard operation
svelte-gantt copied to clipboard

Coloring Specific Columns

Open martinfruehmorgen opened this issue 2 years ago • 6 comments

Hello,

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

Thanks, Martin

martinfruehmorgen avatar May 29 '22 13:05 martinfruehmorgen

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

V-Py avatar Jun 01 '22 06:06 V-Py

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.

Primenotes avatar Jun 15 '22 10:06 Primenotes

Hi Primenotes,

Were you able to create an option to color weekends?

Thanks, Martin

martinfruehmorgen avatar Sep 06 '22 10:09 martinfruehmorgen

@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

V-Py avatar Sep 07 '22 08:09 V-Py

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.

kevinleto-informaticon avatar Nov 09 '22 16:11 kevinleto-informaticon

This can be closed after #152 ?

BlueFoxPrime avatar Jan 18 '23 19:01 BlueFoxPrime