Trackball Formatting

Hello.

I've attached what my current Gantt Chart appears like below. Each row of data is currently a separate series. I would like to achieve the following.
1. a text label on the y-axis. Instead of 0, 1, 2, 3, 4... the labels should have the name of the project that it represents.

I'm using a ChartTrackball as shown. I would like to be able to:
1. instead of showing the format of the x-axis values, I would like to show the value of the point data.
2. instead of showing the y value, show the value of the y-axis label

In addition to the above, when I move my cursor, the ChartTrackBall does not move with each point. When I hover the mouse over the last data point to the right, the trackball stays on the first data point. I would like the trackball to show the data for the nearest data point in each series.

Thanks.


19 Replies

ST Stoked July 4, 2020 08:38 PM UTC

I was able to figure out the text labels on the y-axis. That is no longer an issue, but I cannot figure out the Trackball issues noted. Any thoughts?


RS Ramya Soundar Rajan Syncfusion Team July 6, 2020 12:57 PM UTC

Hi Stoked, 
 
Currently we are validating on your reported query and update you the status on or before today 8 p.m. IST. 
 
Regards, 
Ramya S 



RS Ramya Soundar Rajan Syncfusion Team July 6, 2020 03:15 PM UTC

Hi Stoked, 
 
We are glad to hear that you have achieved requirement to show text labels on axis. 
 
You can show the data point in a specific format in trackball by triggering the event TrackballTooltipRendering and in event argument you can get the corresponding series points as like in below code snippet. 
 
        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(); 
       
 
Please refer the below UG link for more information. 
 
 
We would like to let you know that the trackball displays the information about the data point close to the current mouse position. So, when moving the mouse position the closest data point will be displayed.  The x values of an axis are determined from the position of the vertical line of the axis, and y values are determined from the points touching the vertical line in the series. 
 
Regards, 
Ramya S 



ST Stoked July 6, 2020 03:48 PM UTC

Great. That was helpful.

It was posted...
"We would like to let you know that the trackball displays the information about the data point close to the current mouse position. So, when moving the mouse position the closest data point will be displayed.  The x values of an axis are determined from the position of the vertical line of the axis, and y values are determined from the points touching the vertical line in the series."

As you can see from my latest screenshot below, the chart trackball tooltip is shown, but not on the data point in which my cursor was over (i.e. point #5), so the trackball tooltip is not "following" the mouse cursor. Please suggest how this can be resolved.

Side note: I attempted to turn off chart tooltips as a whole, i.e., chart1.showtooltips = false; but that didn't work either as I thought that the chart tooltip might be interfering trackball tooltip, but that was not the case.




ST Stoked July 6, 2020 04:36 PM UTC

I'd also like to further add, if this helps in the diagnosis, that the chart is a GanttChart, with multiple data points per line, using only a single series.


RS Ramya Soundar Rajan Syncfusion Team July 7, 2020 03:45 PM UTC

Hi Stoked, 
 
Currently we are validating on your reported query and update you the status on July 9,2020. 
 
Regards, 
Ramya S 



RS Ramya Soundar Rajan Syncfusion Team July 9, 2020 02:39 PM UTC

Hi Stoked, 
 
We would like to suggest you that if you want to display the information about the data points at mouse or touch contact point you can visible the chart Crosshair property. Please refer the help document link for more information. 
 
 
And you can also choose the display mode of the trackball using the DisplayMode property which has two options (Float and Group). Please refer the help document link for more information. 
 
 
Regards, 
Ramya S 



ST Stoked July 9, 2020 02:53 PM UTC

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.


ST Stoked replied to Brent Sodtke July 10, 2020 06:16 PM UTC

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.

Support, any guidance/suggestions on my last post?

Thanks.


DD Devakumar Dhanapoosanam Syncfusion Team July 13, 2020 11:25 AM UTC

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 



ST Stoked replied to Devakumar Dhanapoosanam July 13, 2020 04:25 PM UTC

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 


Let me get back to you regarding the data. I can provide code, but the data can have over 1000 data points and providing that data from a SQL database is not feasible.

Regarding your second question, I have category data on the y-axis (i.e. a project name) and date/time data on the x-axis, and the project will have multiple tasks within it. I'm condensing the Gantt chart from multiple tasks (i.e. one per line) into a single project line, and showing the overlap between tasks. So without providing the data, I read in a project, gather all the tasks, i.e. their start and finish times, and chart them.

Hope that helps. If there is a different way of condensing the data of a Gantt chart to a single line (row) for readability while allowing TrackBall tooltip, then please pass it through. Until then, let me see what code I can reveal to an open support thread.

Alternatively, as mentioned, if support can provide code to make the regular tooltip appear the same as a Trackball tooltip, that would be okay. I'm trying to keep tooltips consistent within the application and I've used Trackball in other places.

Thanks.


DD Devakumar Dhanapoosanam Syncfusion Team July 15, 2020 02:12 AM UTC

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 



ST Stoked replied to Devakumar Dhanapoosanam July 15, 2020 03:13 AM UTC

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 


Thanks for the update.
In the tooltip (for a gantt chart) I would like to be able to see the y-axis value, x-axis start and finish times along with point index, and if possible the series index.


DD Devakumar Dhanapoosanam Syncfusion Team July 15, 2020 07:11 PM UTC

Hi Stoked, 
 
Thanks for your update. 
 
We have achieved your requirement using the Tooltip and FancyTooltip to display the values of the Gantt series data and the X-axis, Y-axis values in tooltip. Please refer the below code snippet for more details, 
 
C#: Tooltip 
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]); 
} 
 
C#: FancyTooltip 
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; 
} 
 
 
Please refer the below UG link for more details, 
 
Please check and let us know if you need any further assistance on this. 
 
Regards, 
Devakumar D 



ST Stoked July 16, 2020 02:31 PM UTC

While both of these options work, ideally I would like to use the Trackball Tooltip for application consistency.
Please let me know if development is currently working on a solution for the trackball tooltip to show on each gantt chart data point, or if this is considered closed.

Thanks.


DD Devakumar Dhanapoosanam Syncfusion Team July 19, 2020 05:51 PM UTC

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 



ST Stoked replied to Devakumar Dhanapoosanam July 21, 2020 11:19 PM UTC

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 


Hello. Outside of providing the aforementioned screenshots, I wouldn't know what else to provide. Ideally having the TrackBall appear for each data point on a Gantt Chart was the requirement. If that cannot be done, then I would consider this thread closed.

Thanks.


SJ Suyamburaja Jayakumar Syncfusion Team July 23, 2020 03:47 AM UTC

Hi Stoked, 
 
Thanks for your update. 
 
We would like to let you know that currently we don’t have a direct support for customizing the trackball. We have planning to consider this as feature and now we are validating the feasibility of achieving the same through feature implementation. Hence, we will update the complete details on July 24,2020. 
 
Regards, 
Suyamburaja J. 



SJ Suyamburaja Jayakumar Syncfusion Team July 27, 2020 01:02 AM UTC

Hi Stoked,  
  
Thanks for your patience.  
  
We would like to let you know that we have logged an improvement task for your requirement “TrackBall label support for each data point on a single row in Gantt Chart” and it can be tracked through our feedback portal below.  
  
  
Please cast your vote to make it count. We will prioritize the features every release based on the demands and we do not have an immediate plan to implement this feature since we committed with already planned work. So, this feature will be available in any of our upcoming releases.  
  
If you have any more specification/suggestions to the feature request, you can add it as a comment in the portal.  
  
Regards, 
Suyamburaja J. 


Loader.
Up arrow icon