Hi,
i have a classic chart with line and points. I have to highlight one specific point according to the current product price (which is the x-axis data).
So i have the scenario but no idea to make it ...
I'm able to retrieve my "current price" variable as : $currentPrice and then to retrieve it in JQuery with : currentPrice = <?php echo $currentPrice; ?>;
It gives me for example 180. Correct me if i'm wrong, i need to :
- Get this current price : ok
- Get the graph datas (x-axis) : how ?
- Compare current price with each value in the x-axis : with a loop, for or each ? In Php or directly in the jQuery with some flot method perhaps ?
- If currentPrice = current x-axis point in the loop : get y axis value of this point
- Hilight !
I didn't found similar question, could you help me ?
Thanks,
Olivier B