I am rending a numeric line series with multiple boolean custom series on a x time axis. The boolean custom series is rendered in a way where it creates a horizontal swim lane for each boolean series and the opacity of the lane is determined by the value. Because tooltip trigger is axis, I can only see the boolean value at the time the data point exists (the beginning of the custom series rendered item). How can I include the boolean value for all boolean series in the tooltip no matter where I hover on the chart so that I can see the numeric value of the lines series as well as all the boolean series values that intersect with the hover position at a given point in time?
Apache ECharts custom example: link
Image of hovering a specific point in time in the Apache Echarts custom example linked above
Expectation: When I hover over a specific point in time I expect to see the numeric value from the line series as well as the boolean values from the custom series that intersect with the hover position at a given point in time. In the image I provided, I expect to see these values in the tooltip: 84.5, false, false.
What I have tried:
- Adding tooltip rules custom series with trigger “item”. This does not work as the numeric values are no longer included in the tooltip. I believe this happens because once a custom boolean series is hovered it takes precedence over other tooltip rules and displays only the value of the series being hovered.
What I have considered:
- Using a stacked area step line series for the boolean data where false equates to 0 and true equates to 1. I believe this might cause some issues. First is that I would like to use these series for other types of data that will have more states than boolean. For example: true, false, null. In that case I will need multiple different visual representations of this state. I believe a stacked area step line series would only achieve 2 states. Shaded and not shaded. Second is that I won’t have control over how the area is shaded when the data is false (equates to 0).
user25560823 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.