I have a bar chart with data such as x=["apple", "banana", "peach"] and top=[1, 2, 3]. Since bar chart does’nt support the SelectionGeometry event, I want to register a Tap event to get the bar info such as the x and y coordinates.
Since Tap event can give the click position, I want to compare the click position with the bars’ position, and return the bar info that matches the click position.
However, I have no idea how to get a collection of VBar glyphs with all the infomation such as position, line color, and so on.
It’s not really clear what your requirements are. Are you just after the selection index of the bar that gets tapped? Because all bar glyphs absolutely support that. But the information is on the selected.indices property of the CDS, not on the glyph. See: