Ejemplo n.º 1
0
class TestCross(unittest.TestCase):
    def setUp(self):
        from bokeh.glyphs import Cross
        self.test_cross = Cross()

    def test_expected_values(self):
        self.assertEqual(self.test_cross.__view_model__,'cross')

    def test_to_glyphspec(self):
        self.assertEqual(self.test_cross.to_glyphspec(), {'line_color': {'value': 'black'}, 'fill_color': {'value': 'gray'}, 'y': {'units': 'data', 'field': 'y'}, 'x': {'units': 'data', 'field': 'x'}, 'type': 'cross', 'size': {'units': 'screen', 'field': None, 'default': 4}})
Ejemplo n.º 2
0
class TestCross(unittest.TestCase):
    def setUp(self):
        from bokeh.glyphs import Cross
        self.test_cross = Cross()

    def test_expected_values(self):
        self.assertEqual(self.test_cross.__view_model__, 'cross')

    def test_to_glyphspec(self):
        expected = dict(GENERIC_MARKER_DICT)
        expected['type'] = 'cross'
        self.assertEqual(self.test_cross.to_glyphspec(), expected)
Ejemplo n.º 3
0
class TestCross(unittest.TestCase):

    def setUp(self):
        from bokeh.glyphs import Cross
        self.test_cross = Cross()

    def test_expected_values(self):
        self.assertEqual(self.test_cross.__view_model__, 'cross')

    def test_to_glyphspec(self):
        expected = dict(GENERIC_MARKER_DICT)
        expected['type'] = 'cross'
        self.assertEqual(self.test_cross.to_glyphspec(), expected)
Ejemplo n.º 4
0
def test_Cross():
    marker = Cross()
    yield check_marker, marker
    yield check_fill, marker
    yield check_line, marker
    yield check_props, marker, MARKER, FILL, LINE
Ejemplo n.º 5
0
 def setUp(self):
     from bokeh.glyphs import Cross
     self.test_cross = Cross()
Ejemplo n.º 6
0
                  size="sizes",
                  line_color="#386CB0",
                  fill_color=None,
                  line_width=2)),
    ("triangle",
     Triangle(x="x", y="y", size="sizes", line_color="#99D594", line_width=2)),
    ("inverted_triangle",
     InvertedTriangle(x="x",
                      y="y",
                      size="sizes",
                      line_color="#DE2D26",
                      line_width=2)),
    ("cross",
     Cross(x="x",
           y="y",
           size="sizes",
           line_color="#E6550D",
           fill_color=None,
           line_width=2)),
    ("asterisk",
     Asterisk(x="x",
              y="y",
              size="sizes",
              line_color="#F0027F",
              fill_color=None,
              line_width=2)),
]


def make_tab(title, glyph):
    plot = Plot(title=title, data_sources=[source], x_range=xdr, y_range=ydr)
    renderer = Glyph(data_source=source,
Ejemplo n.º 7
0
 def setUp(self):
     from bokeh.glyphs import Cross
     self.test_cross = Cross()