This is a migrated thread and some comments may be shown as answers.

Provide multiple color to the consecutive events created in the same row

5 Answers 58 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Nithin
Top achievements
Rank 1
Nithin asked on 17 Apr 2018, 01:43 PM

Hi,

I'm using vertical grouping in scheduler. One of my requirement involves giving color to the events created and each consecutive events color should be different.
Also right now I have a list of color i need to map each color to the room color accordingly 

My Example

5 Answers, 1 is accepted

Sort by
0
Tyler
Top achievements
Rank 1
answered on 18 Apr 2018, 09:47 PM
So, you need colors mapped to the room, but each color next to each other in the same row needs to be different?
0
Veselin Tsvetanov
Telerik team
answered on 19 Apr 2018, 09:02 AM
Hi Nithin,

As far as I can see from the Dojo sample sent, you have the color of each event properly mapped to the color of the Room it belongs to. In case you need to automatically generate a different color for each newly created event, I am afraid, that the Scheduler does not support such feature.

If you think that such would add value to the widget, I would suggest you to log your idea on our Feedback portal. Based on the support it receives from the community, we will decide on whether to proceed with its implementation or not.

Regards,
Veselin Tsvetanov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Nithin
Top achievements
Rank 1
answered on 19 Apr 2018, 11:05 AM
yes that is the idea Tyler.
Something like this(image below)
0
Tyler
Top achievements
Rank 1
answered on 19 Apr 2018, 01:41 PM

This may get a little complicated, but all you can do is modify the color in the dataBound event of the scheduler.

I am thinking this will require extracting all events for a certain room from your array of events, which is easy enough with jQuery's $.grep function. 

Then, you can loop through and apply a different color to each event associated with that room. If you need to go in a direct order, you can first sort the events by date and time.

This will have to occur in the dataBound event of the scheduler. In here, you will have to manually change the css background-color of the events as you can't just do this with scheduler resources.

0
Nithin
Top achievements
Rank 1
answered on 21 Apr 2018, 05:51 AM
thanks for the insight Tyler :)
i'll try this method 
Tags
Scheduler
Asked by
Nithin
Top achievements
Rank 1
Answers by
Tyler
Top achievements
Rank 1
Veselin Tsvetanov
Telerik team
Nithin
Top achievements
Rank 1
Share this question
or