Hi Ronak,
Thanks for your detailed explanation and code snippets.
The PointsToolTipFormat property of chart series works with five formats,
"{0}" - series Name
"{1}" - SeriesStyle.ToolTip;
"{2}" - SeriesStyle[i].ToolTip; - this is what we want.
"{3}" - series.Points[ index ].X;
"{4+i}" - series.Points[ index ].YValues[i];
You need to employ the third format for your requirement, it is a customize tool tip format that we can set to any string to series style.
Below is the modified code of yours.
[C#]
this.chartControl1.ShowToolTips =true;
Task.PointsToolTipFormat ="{2}";
for (int i = 0; i < Task.Points.Count; i++)
{
TimeSpan tp = Task.Points[i].GetYValuesAsDateTime()[0].Subtract(Task.Points[i].GetYValuesAsDateTime()[1]);
Task.Styles[i].ToolTipFormat = string.Format("Days : {0}",Math.Abs(tp.TotalDays).ToString());
}
Also kindly take a look at the attached sample.
http://www.syncfusion.com/Support/user/uploads/GanttChart_fdafe3.zip
Please let me know if you have any queries.
Regards,
Rajesh