Replies: 1 comment
-
That's not possible with the current Plugin, so you'll have to write a custom Plugin, you can base it on the existing tooltip Plugin. If you end up implementing a generic solution feel free to share it either as a PR with an additional Plugin (and preferably some unittests) or here as a code snippet for others to reuse. A bit of background why this is not implemented in the Tooltip Plugin: Generally we assume very little about the datasets, e.g. the x values do not have to be ordered and multiple datasets might have different numbers of samples, indexing and data ranges. So for your usecase you have to define things like what should happen if the other dataset does not have a sample for the same x value. Do you interpolate? Take the nearest sample? While it is easy to define these kind of things for a fixed application, we always have to keep all possible usecases in view or document the restrictions. Hope this is enough to get you started, feel free to share your progress and problems here :) |
Beta Was this translation helpful? Give feedback.
-
I have an XYChart that displays two lines. The lines share the same x-axis (which represents time). I want the tooltip to show the values of both lines (meaning y1 and y2) for the same x value. Currently I only managed to get a regular tooltip that shows the data of only the datapoint I'm hovering over.
Is there a way to get two datasets into a tooltip to show both y values for the same x value? Here's a snippet of what I currently have,
firstDataSet
andsecondDataSet
are ofDoubleDataSet
type:Beta Was this translation helpful? Give feedback.
All reactions