I want to share RolloverModifier in multiple charts I am using these lines of code but it is not sharing Rollover modifier
var rollOver: RolloverModifier? = null
rollOver = RolloverModifier()
val sharedRolloverModifier = sciChartBuilder.newModifierGroup()
- You must login to post comments
According to our Android Chart Documentation the correct way to sync modifiers across charts is as follows:
We need to set MotionEventGroup on the ModifierGroups on both charts. Set this to a string value. It needs to be the same string on both charts to link the charts together.
have you followed our tutorial on Linking Multiple charts and checked the associated code sample to see how to do it?
- As I said before you can’t use same modifier instance in several charts at the same time. If you want you to reuse modifier you can remove it from previous chart and only then add into another one.
- I am using another way to handle this case, I create an instance of sharedRolloverModifier and use isEnabled property to overcome this problem. On longpress I set isEnabled “true” and onUp I set isEnabled “false” , everything is working fine except when I set isEnabled property as “false” the vertical line of RolloverModifier doesnot disappear from last location. How can I also disappear the vertical line? . I have attached my code below kindly review it and give feedback that is everything is fine in my code because when I use scicharts for more than 5 to 10 minutes in my original app in which my data is coming from API my device becomes heatup and performance becomes slow by time , Is there is some problem in my code or it is some other problem? Thanks
- Is there any solution regarding the above mentioned Rollover modifier problem?
- As Andrew said solution is to create a separate RolloverModifier for each chart and synchronize them using MotionEventGroup.
Please login first to submit.