本文整理汇总了Python中bokeh.models.AnnularWedge类的典型用法代码示例。如果您正苦于以下问题:Python AnnularWedge类的具体用法?Python AnnularWedge怎么用?Python AnnularWedge使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AnnularWedge类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_dataspec_value_in_json
def test_dataspec_value_in_json(self):
from bokeh.models import AnnularWedge
obj = AnnularWedge()
obj.start_angle = 60
json = obj.to_json(include_defaults=True)
self.assertTrue('start_angle' in json)
self.assertTrue('start_angle_units' not in json)
self.assertDictEqual(dict(units='rad', value=60), json['start_angle'])
示例2: test_dataspec_field_in_json
def test_dataspec_field_in_json(self):
from bokeh.models import AnnularWedge
obj = AnnularWedge()
obj.start_angle = "fieldname"
json = obj.to_json(include_defaults=True)
assert 'start_angle' in json
assert 'start_angle_units' not in json
assert dict(units='rad', field='fieldname') == json['start_angle']
示例3: test_no_units_in_json
def test_no_units_in_json(self):
from bokeh.models import AnnularWedge
obj = AnnularWedge()
json = obj.to_json(include_defaults=True)
self.assertTrue('start_angle' in json)
self.assertTrue('start_angle_units' not in json)
self.assertTrue('outer_radius' in json)
self.assertTrue('outer_radius_units' not in json)
示例4: test_dataspec_field_in_json
def test_dataspec_field_in_json(self):
from bokeh.models import AnnularWedge
obj = AnnularWedge()
obj.start_angle = "fieldname"
json = obj.to_json(include_defaults=True)
self.assertTrue("start_angle" in json)
self.assertTrue("start_angle_units" not in json)
self.assertDictEqual(dict(units="rad", field="fieldname"), json["start_angle"])