Reputation: 67
I have multiple DataSet in line chart and i want to highlight all the Y points with custom overlay image. do we have any function for it ?
If not then
is there any function which can return corresponding pixel values for an entry object ?
Any direction would be appreciated.
Thanks you for reading.
Upvotes: 1
Views: 383
Reputation: 21
The method is given by getPixelForValues(x,y) in Transform class
val viewPortHandler = ViewPortHandler()
viewPortHandler.setChartDimens(canvas.width.toFloat(),canvas.height.toFloat())
val transformer = Transformer(viewPortHandler)
var mpPointD = transformer.getPixelForValues(x, y)
But the transformation is not working for me with the points I pass but I know that the lib uses it with similar data that I set
Upvotes: 2