Hi,
I’m using RolloverModifier and i want to show only point marker. I don’t want to show tooltip or any info on series. Is it possible?
Tnx.
- Dunya Biralem asked 4 years ago
- You must login to post comments
Hi Dunya,
Well this would require some customization of rollover tooltip. Please take a look on our custom RolloverModifier example. You will need to do the same thing except in custom SeriesTooltip you’ll need to override placeInto() and removeFrom() and do nothing there. This will allow to not show tooltips on screen and still draw rollover point markers:
private static class FirstCustomSeriesInfoProvider extends DefaultXySeriesInfoProvider {
@Override
protected ISeriesTooltip getSeriesTooltipInternal(Context context, XySeriesInfo<?> seriesInfo, Class<?> modifierType) {
if (modifierType == RolloverModifier.class) {
return new FirstCustomXySeriesTooltip(context, seriesInfo);
} else {
return super.getSeriesTooltipInternal(context, seriesInfo, modifierType);
}
}
private static class FirstCustomXySeriesTooltip extends XySeriesTooltip {
public FirstCustomXySeriesTooltip(Context context, XySeriesInfo seriesInfo) {
super(context, seriesInfo);
}
@Override
public void placeInto(IViewContainer viewContainer) {
// do nothing here
}
@Override
public void removeFrom(IViewContainer viewContainer) {
// do nothing here
}
}
}
Hope this will help you!
Best regards,
Yura
- Yura Khariton answered 4 years ago
-
Yes, it worked. I extend from DefaultOhlcSeriesInfoProvider for Candlestick chart. Thanks!
- You must login to post comments
Hi Dunya,
Have you tried to use setShowTooltip() method like in this example?
rolloverModifier.setShowTooltip(false);
Best regards,
Yura
- Yura Khariton answered 4 years ago
- You must login to post comments
Hi @Yura;
Yes i tried, but if i set show tooltips to false tooltips and also point markers hiding.
Maybe I couldn’t explain exactly what I wanted… I want only point markers to appear when I touch down the screen, not tooltips.
- Dunya Biralem answered 4 years ago
- You must login to post comments
Please login first to submit.