format tooltip texts
authorgregor herrmann <gregor@toastfreeware.priv.at>
Sat, 2 Jun 2018 00:22:25 +0000 (02:22 +0200)
committergregor herrmann <gregor@toastfreeware.priv.at>
Sat, 2 Jun 2018 00:22:25 +0000 (02:22 +0200)
(pretty useless but hey)

web/static/seepark_web.js

index ed81a982f6df1394fdc562dd56cbdbf0ee7ead1b..e30d414f33339470481727757e486e0c7cef60d7 100644 (file)
@@ -32,6 +32,15 @@ var chart = c3.generate({
        },
        zoom: {
                enabled: true
+       },
+       tooltip: {
+               format: {
+                       name: function (name, ratio, id, index) {
+                               var re = /\d m/;
+                               var res = re.exec(name);
+                               return res;
+                       }
+               }
        }
 });