Skip to content

Commit

Permalink
Fix path rendering for browsers.
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxfish committed May 18, 2016
1 parent 90dc475 commit 8ba6db9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/example.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ Show me code
]
chart = leather.Chart()
chart.add_dots(dot_data)
chart.add_lines(data)
chart.add_dots(data)
chart.to_svg('example.svg')
.. figure:: example.svg

Join us
=======

Expand Down
16 changes: 16 additions & 0 deletions example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin env python

import leather


data = [
(0, 3),
(4, 5),
(7, 9),
(8, 4)
]

chart = leather.Chart()
chart.add_lines(data)
chart.add_dots(data)
chart.to_svg('docs/example.svg')
2 changes: 1 addition & 1 deletion leather/shapes/lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def to_svg(self, width, height, x_scale, y_scale, series):
six.text_type(proj_y)
])

path.set('d', ','.join(d))
path.set('d', ' '.join(d))

group.append(path)

Expand Down

0 comments on commit 8ba6db9

Please sign in to comment.