Skip to content

Commit

Permalink
fix(svg): fix svg for server side rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Benitte committed Oct 2, 2016
1 parent 255d17e commit ae77d43
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nivo",
"version": "1.0.0-alpha.3",
"version": "1.0.0-alpha.4",
"author": {
"name": "Raphaël Benitte",
"url": "https://github.com/plouc"
Expand Down
2 changes: 1 addition & 1 deletion src/components/charts/bars/Bars.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class Bars extends Component {
}

return (
<svg className="nivo_bars" width={_width} height={_height}>
<svg xmlns="http://www.w3.org/2000/svg" className="nivo_bars" width={_width} height={_height}>
<g
className="nivo_bars_wrapper"
transform={`translate(${margin.left},${margin.top})`}
Expand Down
1 change: 1 addition & 0 deletions src/components/charts/bubble/BubblePlaceholders.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class BubblePlaceholders extends Component {

wrapperProps.width = _width
wrapperProps.height = _height
wrapperProps.xmlns = 'http://www.w3.org/2000/svg'
containerProps.transform = `translate(${margin.left},${margin.top})`
} else {
wrapperTag = 'div'
Expand Down
2 changes: 1 addition & 1 deletion src/components/charts/chord/Chord.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Chord extends Component {
const arcs = ribbons.groups

return (
<svg className="nivo_chord" width={_width} height={_height}>
<svg xmlns="http://www.w3.org/2000/svg" className="nivo_chord" width={_width} height={_height}>
<g
className="nivo_chord_wrapper"
transform={`translate(${_width / 2},${_height / 2})`}
Expand Down
2 changes: 1 addition & 1 deletion src/components/charts/line/Line.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class Line extends Component {
.curve(curvePropMapping[curve])

return (
<svg className="nivo_bars" width={_width} height={_height}>
<svg xmlns="http://www.w3.org/2000/svg" className="nivo_bars" width={_width} height={_height}>
<g
className="nivo_bars_wrapper"
transform={`translate(${margin.left},${margin.top})`}
Expand Down

0 comments on commit ae77d43

Please sign in to comment.