Display tooltip on a PieChart (or any JointJS chart)? #2999
-
IntroductionI've got a pie chart working. What I'd like to do is display a tooltip when the mouse is hovered over a slice containing extra details. The Slice data block allows me to add a dataTooltip property (to trigger the std tooltip function in JointJS+), but it doesn't do anything (and the EditSlice() function doesn't not allow this property to be present). I can add a MouseOver and MouseOut event - but this is for the entire pie chart. How can I work out what slice is under the mouse using these events? If I could somehow calculate the SeriesIndex and SliceIndex I could handle the rest myself? Steps to reproduceNo response Restrictions & ConstraintsNo response Does your question relate to JointJS or JointJS+. Select both if applicable.JointJS+ |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Does this example do what you need? |
Beta Was this translation helpful? Give feedback.
-
Yes that worked, thanks. I completely forgot about the notes in the Learn section. I was using the demo project code, and went straight from that to the API section of the documentation. The documentation in Learn always refer to the API, but the reverse is not true - which might be useful in situations like this where the notes in learn are actually more detailed... |
Beta Was this translation helpful? Give feedback.
Does this example do what you need?