Open IKTANIM opened 2 years ago
make sure you have 1 tooltip component rendered.
This issue occurs when I show two line graphs in one chart. How to render 1 tooltip when you have multiple line graphs on a single chart @a-eid ??
I would add a description to give an idea of what is the behavior you think is best to handle this
Did u solve it?
I Need two tooltips as well.
When I press on one, the other popped up as well
i solved it by remove the tooltip from the second graph combining the two graph data together
and add new line with opacity zero
{allPointsSorted.length > 0 && (
<Line
data={allPointsSorted}
theme={{
stroke: {
width: 0,
opacity: 0, ///// <=======
dashArray: [],
},
scatter: {
default: {
width: 8,
height: 8,
rx: 8,
color: colors.skyBlue2,
},
selected: {
width: 16,
height: 16,
rx: 16,
color: colors.skyBlue2,
},
},
}}
tooltipComponent={
<CustomTooltip
showVerticalLineWithPopUp={showVerticalLineWithPopUp}
visible={true}
data={allPointsSorted}
maxYDomain={maxYDomain}
/>
}
/>
)}
Tooltip show two times it should only one data at a time not all the nearest point data. Please fix this issue.