search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Wrap up text on duration bar

Asked by Prakash
10 years ago.

On Duration bar I am showing some Label based on user selection .
In some cases the length of duration bar become small and it does not accommodate all the label selected by user .
So is there a way by which we can wrap up the label text or some how display all label irrespective of the length of the duration bar .
Any help would be appreciated .

protected void DayPilotScheduler1_BeforeEventRender(object sender, BeforeEventRenderEventArgs e)
{
int complete = (int)e.DataItem["PercentageComplete"]; // assumes you have "complete" property in the data source item
e.PercentComplete = complete;

// here is the code where we are setting label for the duration bar .In some cases the length of duration bar become small and it does not accommodate the entire text .
e.Html = (string)e.DataItem["Labels"];
e.FontColor = "Black";
e.DurationBarColor = "LightGreen";
string status = e.DataItem["RequestStatus"].ToString();
e.BackgroundColor = e.DataItem["StatusColor"].ToString();

// e.ToolTip = (string)e.DataItem["Labels"];
//Set Event border based on different RequestType
e.BorderColor = e.DataItem["RequestType"].ToString() == "STC" ? "black" : e.DataItem["RequestType"].ToString() == "ISSUE" ? "Red" : "Green";

e.BubbleHtml = (string)e.DataItem["TooltipDurationBar"] ;
}

Answer posted by Dan Letecky [DayPilot]
10 years ago.

If the problem is that you are not able to show the full text in the event box you have two options:

1. Make the events bigger by increasing CellWidth value:

http://doc.daypilot.org/scheduler/cell-width/

or by using a different Scale level (use a smaller unit):

http://doc.daypilot.org/scheduler/scale/

2. Display the full text using an event Bubble (on hover).

http://doc.daypilot.org/scheduler/event-bubble/

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.