show more ° signs (in tooltip values and y axis)
authorgregor herrmann <gregor@toastfreeware.priv.at>
Sat, 2 Jun 2018 00:40:36 +0000 (02:40 +0200)
committergregor herrmann <gregor@toastfreeware.priv.at>
Sat, 2 Jun 2018 00:40:36 +0000 (02:40 +0200)
web/static/seepark_web.js

index 85a10d3afc1bc1b2ce85605f3bf76bd25bb3b70d..5f0facc70d7e6fc2b4b912c7b908a95f7f367c88 100644 (file)
@@ -28,8 +28,13 @@ var chart = c3.generate({
                },
                y: {
                        label: {
                },
                y: {
                        label: {
-                               text: '°C',
+                               text: 'Temperatur in °C',
                                position: 'outer-middle'
                                position: 'outer-middle'
+                       },
+                       tick: {
+                               format: function (d) {
+                                       return d + '°';
+                               }
                        }
                }
        },
                        }
                }
        },
@@ -42,6 +47,9 @@ var chart = c3.generate({
                                var re = /\d m/;
                                var res = re.exec(name);
                                return res;
                                var re = /\d m/;
                                var res = re.exec(name);
                                return res;
+                       },
+                       value: function (value, ratio, id, index) {
+                               return value + '°';
                        }
                }
        }
                        }
                }
        }