Browse Source

Merge pull request #242 from cbergmiller/style_guide_stroke

New style options for guide line stroke-dasharray
pull/264/head
Mounier Florian 9 years ago
parent
commit
a51d10b6d3
  1. 4
      pygal/css/graph.css
  2. 4
      pygal/style.py

4
pygal/css/graph.css

@ -54,11 +54,11 @@
} }
{{ id }}.axis .guide.line { {{ id }}.axis .guide.line {
stroke-dasharray: 4,4; stroke-dasharray: {{ style.guide_stroke_dasharray }};
} }
{{ id }}.axis .major.guide.line { {{ id }}.axis .major.guide.line {
stroke-dasharray: 6,6; stroke-dasharray: {{ style.major_guide_stroke_dasharray }};
} }
{{ id }}.horizontal .axis.y .guide.line, {{ id }}.horizontal .axis.y .guide.line,

4
pygal/style.py

@ -33,6 +33,7 @@ class Style(object):
foreground = 'rgba(0, 0, 0, .87)' foreground = 'rgba(0, 0, 0, .87)'
foreground_strong = 'rgba(0, 0, 0, 1)' foreground_strong = 'rgba(0, 0, 0, 1)'
foreground_subtle = 'rgba(0, 0, 0, .54)' foreground_subtle = 'rgba(0, 0, 0, .54)'
# Monospaced font is highly encouraged # Monospaced font is highly encouraged
font_family = 'Consolas, "Liberation Mono", Menlo, Courier, ' font_family = 'Consolas, "Liberation Mono", Menlo, Courier, '
'monospace' 'monospace'
@ -53,6 +54,9 @@ class Style(object):
legend_font_size = 14 legend_font_size = 14
no_data_font_size = 64 no_data_font_size = 64
# Guide line stroke style
guide_stroke_dasharray = '4,4'
major_guide_stroke_dasharray = '6,6'
opacity = '.7' opacity = '.7'
opacity_hover = '.8' opacity_hover = '.8'

Loading…
Cancel
Save