Commit 4c2099e8 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix tooltip class

parent 27e48796
...@@ -90,7 +90,7 @@ text { ...@@ -90,7 +90,7 @@ text {
/*-- Tooltip --*/ /*-- Tooltip --*/
.tooltip { .-tooltip {
border-collapse:collapse; border-collapse:collapse;
border-spacing:0; border-spacing:0;
background-color:#fff; background-color:#fff;
...@@ -100,28 +100,28 @@ text { ...@@ -100,28 +100,28 @@ text {
box-shadow: 7px 7px 12px -9px rgba(119,119,119,10); box-shadow: 7px 7px 12px -9px rgba(119,119,119,10);
opacity: 0.9; opacity: 0.9;
} }
.tooltip tr { .-tooltip tr {
border:1px solid #CCC; border:1px solid #CCC;
} }
.tooltip th { .-tooltip th {
background-color: #aaa; background-color: #aaa;
font-size:14px; font-size:14px;
padding:2px 5px; padding:2px 5px;
text-align:left; text-align:left;
color:#FFF; color:#FFF;
} }
.tooltip td { .-tooltip td {
font-size:13px; font-size:13px;
padding: 3px 6px; padding: 3px 6px;
background-color:#fff; background-color:#fff;
border-left:1px dotted #999; border-left:1px dotted #999;
} }
.tooltip td > span { .-tooltip td > span {
display: inline-block; display: inline-block;
width: 10px; width: 10px;
height: 10px; height: 10px;
margin-right: 6px; margin-right: 6px;
} }
.tooltip td.value{ .-tooltip td.value{
text-align: right; text-align: right;
} }
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
// tooltip - show when mouseover on each data // tooltip - show when mouseover on each data
var __tooltip_contents = getConfig(['tooltip','contents'], function(d) { var __tooltip_contents = getConfig(['tooltip','contents'], function(d) {
var date = isTimeSeries ? d[0].x.getFullYear() + '.' + (d[0].x.getMonth()+1) + '.' + d[0].x.getDate() : isCategorized ? category(d[0].x) : d[0].x, var date = isTimeSeries ? d[0].x.getFullYear() + '.' + (d[0].x.getMonth()+1) + '.' + d[0].x.getDate() : isCategorized ? category(d[0].x) : d[0].x,
text = "<table class='tooltip'><tr><th colspan='2'>" + date + "</th></tr>", i, value, name; text = "<table class='-tooltip'><tr><th colspan='2'>" + date + "</th></tr>", i, value, name;
for (i = 0; i < d.length; i++){ for (i = 0; i < d.length; i++){
if (isDefined(d[i])) { if (isDefined(d[i])) {
value = isDefined(d[i].value) ? (Math.round(d[i].value*100)/100).toFixed(2) : '-'; value = isDefined(d[i].value) ? (Math.round(d[i].value*100)/100).toFixed(2) : '-';
......
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