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

0
0

Hi,
I am using Sci Chart android I want to Share/Link Custom Modifier on Multiple Charts ,
How Can i do that?

Version
2.5.0.2608
  • sci chart
    Is there is any solution regarding this problem?
  • You must to post comments
0
0

Hi there,

I’m not 100% sure what you mean by ‘Share/Link Custom Modifier on Multiple Charts’, but I’ll try to answer.

You can’t share same ChartModifier instance between several charts – you need to create separate instance for each chart.

In most cases if you want share some functionality of ChartModifier between charts so all of them will react on some touch interaction is to create ModifierGroup with shared MotionEventsGroup for all charts and add instance of ChartModifier which you want to share into each group. In this case touch events from one chart will be redirected by that ModifierGroup into ModifierGroups from other charts with same MotionEventsGroup.

If you want to share some state between several custom modifiers then you’ll need to create some other class which represents shared state and pass it to each instance of custom ChartModifier so it can be used. This can be done via constructor or some property or static field etc ( this depends on what you’re trying to achive )

Hope this will help you!

Best regards,
Yura

  • sci chart
    I created a class in which on onLongPress event I disappear a lineseries which is working fine for one chart but I want to share that event so that if I Longpress on one chart that specific lineseries disappear on all charts not only on that specific chart. How can I do that? The code is below Thanks
  • sci chart
    As shown in Images below
  • You must to post comments
0
0

inner class CustomModifier() : GestureModifierBase()
{

override fun onLongPress(e: MotionEvent?)
{
rSeries?.isVisible = false

}

override fun onUp(e: MotionEvent?)
{
rSeries?.isVisible = true

}

  • You must to post comments
0
0

Here are the Images

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

Please first to submit.

SciChart WPF v6 BETA released! Note pricing/licensing changes are coming. Contact us to beat the rise!Read more
+