Commit 86b4131c authored by Masayuki Tanaka's avatar Masayuki Tanaka

Move style for legend background to css - #326

parent 98d35195
...@@ -132,6 +132,13 @@ ...@@ -132,6 +132,13 @@
font-size: 12px; font-size: 12px;
} }
.c3-legend-background {
opacity: 0.75;
fill: white;
stroke: lightgray;
stroke-width: 1
}
/*-- Tooltip --*/ /*-- Tooltip --*/
.c3-tooltip { .c3-tooltip {
......
...@@ -4698,13 +4698,10 @@ ...@@ -4698,13 +4698,10 @@
// Set background for inset legend // Set background for inset legend
if (isLegendInset && maxWidth !== 0) { if (isLegendInset && maxWidth !== 0) {
legend.insert('g', '.' + CLASS.legendItem) legend.insert('g', '.' + CLASS.legendItem)
.attr("class", CLASS.legendBackground).append('rect') .attr("class", CLASS.legendBackground)
.style('opacity', 0.75) .append('rect')
.style('fill', 'white') .attr('height', getLegendHeight() - 10)
.style('stroke', 'lightgray') .attr('width', maxWidth * (step + 1) + 10);
.style('stroke-width', 1)
.attr('height', getLegendHeight() - 10)
.attr('width', maxWidth * (step + 1) + 10);
} }
texts = legend.selectAll('text') texts = legend.selectAll('text')
......
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