Browse Source

Modify tooltip style

pull/1/head
Masayuki Tanaka 11 years ago
parent
commit
cb84f06463
  1. 10
      c3.css
  2. 2
      c3.js

10
c3.css

@ -98,6 +98,7 @@ text {
-webkit-box-shadow: 7px 7px 12px -9px rgba(119,119,119,10); -webkit-box-shadow: 7px 7px 12px -9px rgba(119,119,119,10);
-moz-box-shadow: 7px 7px 12px -9px rgba(119,119,119,10); -moz-box-shadow: 7px 7px 12px -9px rgba(119,119,119,10);
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;
} }
.tooltip tr { .tooltip tr {
border:1px solid #CCC; border:1px solid #CCC;
@ -111,11 +112,16 @@ text {
} }
.tooltip td { .tooltip td {
font-size:13px; font-size:13px;
padding:2px 6px; padding: 3px 6px;
text-align:center;
background-color:#fff; background-color:#fff;
border-left:1px dotted #999; border-left:1px dotted #999;
} }
.tooltip td > span {
display: inline-block;
width: 10px;
height: 10px;
margin-right: 6px;
}
.tooltip td.value{ .tooltip td.value{
text-align: right; text-align: right;
} }

2
c3.js

@ -113,7 +113,7 @@
value = '-'; value = '-';
name = '-'; name = '-';
} }
text += "<tr><td>" + name + "</td><td class='value'>" + value + "</td></tr>"; text += "<tr><td><span style='background-color:"+color(d[i].id)+"'></span>" + name + "</td><td class='value'>" + value + "</td></tr>";
} }
return text + "</table>"; return text + "</table>";
}); });

Loading…
Cancel
Save