]> jspc29.x-matter.uni-frankfurt.de Git - mvd_epics.git/commitdiff
DASH: use d3.curveStepAfter for sparkline interpolation
authorPhilipp Klaus <klaus@physik.uni-frankfurt.de>
Fri, 25 Aug 2017 10:02:05 +0000 (12:02 +0200)
committerPhilipp Klaus <klaus@physik.uni-frankfurt.de>
Fri, 25 Aug 2017 10:02:05 +0000 (12:02 +0200)
Available interpolations include
(see <https://github.com/d3/d3-shape/blob/master/README.md#curves>):

* d3.curveLinear
* d3.curveMonotoneX
* d3.curveStepAfter

Maybe the appropriate interpolation should be specified for
every individual PV (part of the config file) in the future.

python_suite/dashboard/static/js/sparkline.js

index 6a0ba849f5d87f4059bd8efae701a73e8bf3d259..7a34139d8af2bc43bb2a3e5a7b7c3b330e482343 100644 (file)
@@ -77,6 +77,9 @@ function sparkline() {
 
     // Define the line
     var valueline = d3.line()
+      //.curve(d3.curveLinear)
+      //.curve(d3.curveMonotoneX)
+      .curve(d3.curveStepAfter)
       .defined(function (d) { return d[1] !== null; })
       .x(function (d) { return x(d[0]); })
       .y(function (d) { return y(d[1]); });