From: gregor herrmann Date: Sat, 2 Jun 2018 00:40:36 +0000 (+0200) Subject: show more ° signs (in tooltip values and y axis) X-Git-Url: https://git.toastfreeware.priv.at/chrisu/seepark.git/commitdiff_plain/2fbd0ff619ebff1e154dd4102594daec4ae05330 show more ° signs (in tooltip values and y axis) --- diff --git a/web/static/seepark_web.js b/web/static/seepark_web.js index 85a10d3..5f0facc 100644 --- a/web/static/seepark_web.js +++ b/web/static/seepark_web.js @@ -28,8 +28,13 @@ var chart = c3.generate({ }, y: { label: { - text: '°C', + text: 'Temperatur in °C', 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; + }, + value: function (value, ratio, id, index) { + return value + '°'; } } }