Commit 83f7ceb1 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix value in tooltip

parent dd5e2a64
...@@ -135,13 +135,14 @@ ...@@ -135,13 +135,14 @@
var __tooltip_enabled = getConfig(['tooltip', 'enabled'], true), var __tooltip_enabled = getConfig(['tooltip', 'enabled'], true),
__tooltip_contents = getConfig(['tooltip', 'contents'], function (d) { __tooltip_contents = getConfig(['tooltip', 'contents'], function (d) {
var title = getXAxisTickFormat()(d[0].x), var title = getXAxisTickFormat()(d[0].x),
text = "<table class='-tooltip'><tr><th colspan='2'>" + title + "</th></tr>", i, value, name; text = "<table class='-tooltip'><tr><th colspan='2'>" + title + "</th></tr>", i, value, name,
format = __axis_y_tick_format ? __axis_y_tick_format : function (v) { return +v; };
for (i = 0; i < d.length; i++) { for (i = 0; i < d.length; i++) {
if (! d[i] || ! isValue(d[i].value)) { continue; } if (! d[i] || ! isValue(d[i].value)) { continue; }
value = '-'; value = '-';
if (isValue(d[i].value)) { if (isValue(d[i].value)) {
value = __axis_y_tick_format((Math.round(d[i].value * 100) / 100).toFixed(2)); value = format(d[i].value);
} }
name = d[i].name; name = d[i].name;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment