SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0
0

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?

Version
3.0.1.4295
  • You must to post comments
0
0

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
    Do you set ReceiveHandledEvents = true for CustomRolloverModifier?
  • Atiq Tahir
    Yes
  • Yura Khariton
    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.
  • Atiq Tahir
    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
  • Yura Khariton
    I don’t see where you set ReceiveHandledEvents = true for CustomRolloverModifier. Please take a look on my second reply with code below.
0
0

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

Images
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.