Skip to content

Commit

Permalink
Align title with x axis.
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxfish committed May 19, 2016
1 parent fc6305e commit 7af3d9c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/example.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion leather/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def to_svg(self, width, height, scale, orient):
fill=theme.label_color
)
label.set('text-anchor', text_anchor)
label.set('font-family', 'Monaco')
label.set('font-family', theme.tick_font_family)
label.text = six.text_type(value)

tick_group.append(tick)
Expand Down
2 changes: 2 additions & 0 deletions leather/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ def to_svg_group(self, width, height, margin=None):
axes_group.append(x_axis.to_svg(canvas_width, canvas_height, x_scale, 'bottom'))
axes_group.append(y_axis.to_svg(canvas_width, canvas_height, y_scale, 'left'))

header_group.set('transform', svg.translate(left_margin, 0))

# Series
series_group = ET.Element('g')

Expand Down
2 changes: 1 addition & 1 deletion leather/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
title_color = '#333'
title_font_family = 'Monaco'
title_font_size = 16
title_font_char_height = 20
title_font_char_height = 18
title_font_char_width = 9

# Tick lines
Expand Down

0 comments on commit 7af3d9c

Please sign in to comment.