|
private void Trackball_TrackballTooltipRendering(object sender, TrackballTooltipEventArgs args)
{
args.Text = (chartControl1.Series[0].Points[args.pointIndex] as ChartPoint).Category.ToString() + (chartControl1.Series[0].Points[args.SeriesIndex] as ChartPoint).DateX.ToString();
} |
I've looked into the crosshair option, it does not serve my needs, and I'm currently using the "float" option for the trackball.Is there an option to get the desired functionality with the Trackball? I'm pushing for the Trackball option for application consistency; i'm using TrackBall throughout the application and would like to use it on this Gantt chart too.If not, can you please detail some code so that I can make the regular chart tooltip appear like the TrackBall tooltip?Thanks.
Hi Stoked,Sorry for the delay.We have validated the reported query. Based on your update, it seems like you have added multiple data points for the series in same row. We were able to reproduce the issue like trackball has been shown only in first segment position not able to move/show tooltip for all the segment value in same row.It is working fine while having series points added in multiple rows. So, to confirm its root cause / behavior confirmation with same row, we have forwarded your query to development team. They are requested to have some more time to validate those, hence we will be come back on or before July 15, 2020.Meanwhile can you please share the below details which will helpful for us analyze?· Can you please share the complete Gantt chart series and the data points values code snippet and as updated on July 6, 2020 04:36 PM UTC “chart is a Gantt Chart, with multiple data points per line, using only a single series”?· Can you please share use case details of your requirement having multiple data points in single row of the Gantt chart series type?Regards,Devakumar D
Hi Stoked,Thanks for your update and sharing the requested details.Currently we are analyzing the feasibility for achieving your requirement using the regular tooltip at our end.Can you please share us the tooltip data which you need to display on graph while hovering the mouse in the Gantt chart in any pictorial representation with complete details (whether like showing Completion, Start and End value in tooltip) which will be helpful for us to proceed further?Regards,Devakumar D
|
ChartSeries Task = new ChartSeries("Task", ChartSeriesType.Gantt);
…
//Tooltip
this.chart.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());
Task.Styles[i].ToolTipFormat += "\n" + Task.Name;
Task.Styles[i].ToolTipFormat += "\n" + "YValue :" + Task.Points[i].X;
Task.Styles[i].ToolTipFormat += "\n" + "Start :" + DateTime.FromOADate(Task.Points[i].YValues[0]);
Task.Styles[i].ToolTipFormat += "\n" + "End :" + DateTime.FromOADate(Task.Points[i].YValues[1]);
} |
|
ChartSeries Task = new ChartSeries("Task", ChartSeriesType.Gantt);
…
//FancyTooltip
Task.FancyToolTip.Visible = true;
Task.FancyToolTip.Alignment = TabAlignment.Top;
…
chart.FancyToolTipController.TextFormat += FancyToolTipController_TextFormat;
…
private void FancyToolTipController_TextFormat(object sender, ChartTextFormatEventArgs e)
{
if (e.Point != null)
{
e.Text = e.Series.Name + "\n" + "YValue = " + e.Point.X.ToString() + "\n Start:" +
DateTime.FromOADate(e.Point.YValues[0]).ToString("dd:MMM HH:mm") + "\n End:" +
DateTime.FromOADate(e.Point.YValues[1]).ToString("dd:MMM HH:mm");
}
e.Handled = true;
} |
Hi Stoked,Thanks for your update.Can you please share any pictorial or any video representation of your exact requirement using the Trackball tooltip in gantt chart and axis label tooltip, which will be better to check your requirement with the development team to proceed further regarding the feasibility to achieve your requirement?Regards,Devakumar D