Example #1
0
 def test_histogram():
     hist = Histogram(print_values=True,
                      print_values_position='top',
                      style=styles['neon'])
     hist.add('1', [(2, 0, 1), (4, 1, 3), (3, 3.5, 5), (1.5, 5, 10)])
     hist.add('2', [(2, 2, 8)])
     hist.x_labels = [0, 3, 6, 9, 12]
     return hist.render_response()
Example #2
0
def test_histogram():
    """Simple histogram test"""
    hist = Histogram()
    hist.add('1', [(2, 0, 1), (4, 1, 3), (3, 3.5, 5), (1.5, 5, 10)])
    hist.add('2', [(2, 2, 8)], secondary=True)
    q = hist.render_pyquery()
    assert len(q('.rect')) == 5
Example #3
0
 def test_histogram():
     hist = Histogram(style=styles['neon'])
     hist.add('1', [
         (2, 0, 1),
         (4, 1, 3),
         (3, 3.5, 5),
         (1.5, 5, 10)
     ])
     hist.add('2', [(2, 2, 8)])
     hist.x_labels = [0, 3, 6, 9, 12]
     return hist.render_response()
Example #4
0
File: tests.py Project: Kozea/pygal
 def test_histogram():
     hist = Histogram(
         print_values=True,
         print_values_position='top',
         style=styles['neon']
     )
     hist.add('1', [(2, 0, 1), (4, 1, 3), (3, 3.5, 5), (1.5, 5, 10)])
     hist.add('2', [(2, 2, 8)])
     hist.x_labels = [0, 3, 6, 9, 12]
     return hist.render_response()
Example #5
0
 def test_histogram():
     hist = Histogram(style=styles['neon'])
     hist.add('1', [
         (2, 0, 1),
         (4, 1, 3),
         (3, 3.5, 5),
         (1.5, 5, 10)
     ])
     hist.add('2', [(2, 2, 8)])
     hist.x_labels = [0, 3, 6, 9, 12]
     return hist.render_response()
Example #6
0
def test_histogram():
    hist = Histogram()
    hist.add('1', [
        (2, 0, 1),
        (4, 1, 3),
        (3, 3.5, 5),
        (1.5, 5, 10)
    ])
    hist.add('2', [(2, 2, 8)], secondary=True)
    q = hist.render_pyquery()
    assert len(q('.rect')) == 5
Example #7
0
 def test_histogram():
     hist = Histogram(print_values=True, print_values_position="top", style=styles["neon"])
     hist.add("1", [(2, 0, 1), (4, 1, 3), (3, 3.5, 5), (1.5, 5, 10)])
     hist.add("2", [(2, 2, 8)])
     hist.x_labels = [0, 3, 6, 9, 12]
     return hist.render_response()
Example #8
0
 def test_histogram():
     hist = Histogram(style=styles["neon"])
     hist.add("1", [(2, 0, 1), (4, 1, 3), (3, 3.5, 5), (1.5, 5, 10)])
     hist.add("2", [(2, 2, 8)])
     return hist.render_response()