Hi,
=>Scenario
i am using one LineSeries, two ScatterSeries and one ErrorBarsSeries in my Graph.
=> ISSUE
I want to disable whole Rollover Modifier or labels of Rollover Modifier for only ErrorBarsSeries , How can I do that?
- Atiq Tahir asked 4 years ago
- You must login to post comments
Hi Atiq,
Can you provide a code which reproduces problem? I tried to use custom RolloverModifier in our multi-pane stock chart example and everything seems to work there. I modified example’s initChart() method like this:
final CustomRolloverModifier rolloverModifier = new CustomRolloverModifier();
rolloverModifier.setReceiveHandledEvents(true);
rolloverModifier.renderableSeries.add(model.renderableSeries.get(0)); // add one series to display tooltip for from each pane
surface.getChartModifiers().add(sciChartBuilder
.newModifierGroup().withMotionEventsGroup("Group").withReceiveHandledEvents(true)
.withModifier(rolloverModifier)
.build());
Best regards,
Yura
- Yura Khariton answered 4 years ago
- You must login to post comments
Hi Atiq,
To disable RolloverModifier we have setIsEnabled() method.
Regarding disabling tooltips for specified series – we don’t support this out of the box, but you can easily add this functionality by creating custom RolloverModifier. We have getObservableSeries() method that by default returns RenderableSeries collection of chart. You can override it and create your own list of series which will be used to display tooltips:
class CustomRolloverModifier extends RolloverModifier {
public final RenderableSeriesCollection renderableSeries = new RenderableSeriesCollection();
@Override
protected ObservableCollection<IRenderableSeries> getObservableSeries() {
return renderableSeries;
}
}
Then you can use it like this:
rolloverModifier = new CustomRolloverModifier();
final FastLineRenderableSeries rs1;
final FastLineRenderableSeries rs2;
final FastLineRenderableSeries rs3;
rolloverModifier.renderableSeries.add(rs1);
rolloverModifier.renderableSeries.add(rs3);
There should be tooltips only for rs1 and rs3 series.
Is this suitable for your needs? Hope this will help you!
Best regards,
Yura
- Yura Khariton answered 4 years ago
-
Do you set ReceiveHandledEvents = true for CustomRolloverModifier?
-
Yes
-
Can you provide a code which reproduces problem? I tried to use custom RolloverModifier in our multi-pane stock chart example (https://www.scichart.com/example/android-chart-multi-pane-stock-charts-example/) and everything seems to work there.
-
roModifier = CustomRolloverModifier() roModifier!!.renderableSeries.add(rSeriesAverage) roModifier!!.renderableSeries.add(rSeriesMax) roModifier!!.renderableSeries.add(rSeriesMin) sharedRolloverModifier = sciChartBuilder.newModifierGroup() .withMotionEventsGroup(“SharedMotionEvents”).withReceiveHandledEvents(true) .withModifier(roModifier).withReceiveHandledEvents(true).build() roModifier = sharedRolloverModifier!!.childModifiers.get(0) as CustomRolloverModifier
-
I don’t see where you set ReceiveHandledEvents = true for CustomRolloverModifier. Please take a look on my second reply with code below.
- 3 more comments
- You must login to post comments
Please login first to submit.