3

Chart.js 2.6.0

Expected Output

I have a problem to solve, I needed to generate this chart out of data:

enter image description here

I somehow managed to generate this chart.

enter image description here

Problems

  • I am searching for best way to detect summit/peak of data-mountains so that I could put a point(arc) at the top.
  • Is there a way to put labels in x-axis like in the picture above? I mean there is label after every 21 seconds.

Code so far

Gist: https://gist.github.com/shivabhusal/efb48db79128ffd926cc25960a1d875c

I overrode the draw function of Chart.js and drew lines and points on my own.

Any help will be appreciated, thanks.

Note: My data is not guaranteed to be pointy at the summit; sometimes it can get plateau.


Necessary CodePen is https://codepen.io/shivabhusal/pen/LjWyMe?editors=0010

Shiva
  • 11,485
  • 2
  • 67
  • 84

0 Answers0