I have a jsD3 area graphic, data contains daily values of some metric, for many days I have the same values, so my graph have peaks at certain points when the values goes up or down, and horizontal line for the dates the value is the same. How to highlight with circles only the "peaks" (when data is different from previous days, increase or decrease)?
If I render circles for same data, they repeat one close to the other for the dates with same values.
For example consider this sample: http://bl.ocks.org/mbostock/3883195 but using this data:
date close
14-May-14 10
15-May-14 10
16-May-14 12
17-May-14 12
18-May-14 10
19-May-14 10
20-May-14 10
21-May-14 10
22-May-14 28
24-May-14 39
25-May-14 39
26-May-14 49
27-May-14 49
28-May-14 59
28-May-14 48
30-May-14 49
This is the rendered chart:
I would like to get highlight the value changes only so the resulting chart is like this: