Browse Source

Move style for legend background to css - #326

pull/340/head
Masayuki Tanaka 10 years ago
parent
commit
86b4131cb2
  1. 7
      c3.css
  2. 7
      c3.js
  3. 2
      c3.min.js

7
c3.css

@ -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 {

7
c3.js

@ -4698,11 +4698,8 @@
// 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')
.style('stroke', 'lightgray')
.style('stroke-width', 1)
.attr('height', getLegendHeight() - 10) .attr('height', getLegendHeight() - 10)
.attr('width', maxWidth * (step + 1) + 10); .attr('width', maxWidth * (step + 1) + 10);
} }

2
c3.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save