I will check your code with different way. But, after seen your concepts I will modify my testing demo.
Only 1 case is not resolved.
Case 3: Click on last row
– While click on ‘green’ color – “F” flag put at last value of the row (not put on green color) – NEED YOUR HELP.
– While click on ‘blue’ color – “F” flag put at last value of the row – it is working fine. Note: if the solution is possible with different way.
like i will pass parameter to “onPut(e, customParameter)” then this way i resolved it.
Using chart.axisY.convertValueToPixel(e.dataPoint.y) you can get the pixel coordinate of the last index value of y.
Then adding it to the width() of the textBox would make the textBox render to the end of the bar.
Please take a look at this fiddle.