Posted 22 September 2019, 4:52 pm EST
- Updated 3 October 2022, 3:40 pm EST
Hi Graham,
I could not see any issue with the axis annotations after correctly specifying the ChartDataSeries.Label property to RoomName column in your sample.
Also, for displaying data item values in the tooltip, you can make use of CoordToDataIndex method for getting the index of the underlying data item and do the following:
Private Sub C1ChartRoomOccupancy_ShowTooltip(sender As Object, e As ShowTooltipEventArgs)
If sender.Equals(C1ChartRoomOccupancy.ChartArea.AxisX) Then
Dim position = C1ChartRoomOccupancy.PointToClient(Control.MousePosition)
Dim serIdx = 0, ptIdx = 0, dist = 0
C1ChartRoomOccupancy.ChartGroups.Group0.CoordToDataIndex(position.X, position.Y, CoordinateFocusEnum.XCoord, serIdx, ptIdx, dist)
Dim item = Me.SalonAndSpaDb2DataSet.tblRoomOccupancy.Item(serIdx)
e.TooltipText = "Room:" & item.RoomName & vbCrLf & "Client ID:" & item.ClientID & vbCrLf & "User ID: " & item.UserID
End If
End Sub
Please refer to the attached modified sample(SSOccupancy_Mod.zip) for the same.
Regards,
Basant
SSOccupancy_Mod.zip