Interactive chart (drag) on android


#1

Hello, I 'm looking for specific functionality. The charts will show info about temperature and I need drag an object (imageview for example) in the chart and get the position inside the chart or to know the near value. 

For example:

  • The chart shown a lot of values but two or three of them are high and I need identify this value with an image of fire. For do that, the perfect solution is drag an element, otherwise, click the value and make an specific action.

 

It’s possible?

 

thanks guys.

 


#2

Hello wcanovas,

Thanks for getting in touch.

That is a very interesting question regarding dragging a view into a ShinobChart. This is something that we have never tried to do before as this was never part of the original design. 

ShinobiCharts for Android chart objects are contained within a (subclass of a) Fragment object. It would appear that it is possible to drag a view into a Fragment object - please see this stackoverflow post:

My advice here would be to download our free trial and see if you can achieve the results which you want. You can download the free trial from the following link:

I notice that you also mention a possible solution being to click the value and make a specific action. ShinobiCharts for android does support user gestures such as panning, pinching and tapping (clicking). Our product supports listener callback methods which allow you to intercept certain user gestures and perform various actions. Our charts also allow you (in the premium version) to add custom annotations to the chart, which for example could be an ImageView. So you could intercept a particular user gesture (such as a tap on to your chart) and apply an ImageView to the place where the tap was performed.

I hope that this information helps you. If you need any more help, please get back in touch.

Thanks,

Kai.