Skip to content

Commit 485831d

Browse files
authored
Merge pull request bqplot#101 from rmenegaux/pielabels
Styling options for pie labels
2 parents 456df8c + 3fd603c commit 485831d

File tree

3 files changed

+208
-63
lines changed

3 files changed

+208
-63
lines changed

bqplot/marks.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ class Label(Mark):
794794
text: string (default: '')
795795
text to be displayed
796796
font_size: string (default: '14px')
797-
front size in px, em or ex
797+
font size in px, em or ex
798798
font_weight: {'bold', 'normal', 'bolder'}
799799
font weight of the caption
800800
align: {'start', 'middle', 'end'}
@@ -925,6 +925,14 @@ class Pie(Mark):
925925
start angle of the pie (from top), in degrees
926926
end_angle: Float (default: 360.0)
927927
end angle of the pie (from top), in degrees
928+
display_labels: bool (default: True)
929+
display the labels on the pie
930+
label_color: Color or None (default: None)
931+
color of the labels
932+
font_size: string (default: '14px')
933+
label font size in px, em or ex
934+
font_weight: {'bold', 'normal', 'bolder'} (default: 'normal')
935+
label font weight
928936
929937
Data Attributes
930938
@@ -967,6 +975,11 @@ class Pie(Mark):
967975
inner_radius = Float(0.1, min=0.0, max=float('inf')).tag(sync=True)
968976
start_angle = Float().tag(sync=True)
969977
end_angle = Float(360.0).tag(sync=True)
978+
display_labels = Bool(True).tag(sync=True)
979+
label_color = Color(None, allow_none=True).tag(sync=True)
980+
font_size = Unicode(default_value='10px').tag(sync=True)
981+
font_weight = Enum(['bold', 'normal', 'bolder'],
982+
default_value='normal').tag(sync=True)
970983

971984
_view_name = Unicode('Pie').tag(sync=True)
972985
_model_name = Unicode('PieModel').tag(sync=True)

0 commit comments

Comments
 (0)