Class: Ambling::Pie::Settings::DataLabels
- Inherits:
-
Object
- Object
- Ambling::Pie::Settings::DataLabels
- Includes:
- Base
- Defined in:
- lib/ambling/pie.rb
Constant Summary collapse
- VALUES =
[:radius,:text_color,:text_size,:max_width,:show,:show_lines,:line_color,:line_alpha,:hide_labels_percent,:avoid_overlapping]
Instance Attribute Summary collapse
-
#avoid_overlapping ⇒ Object
- true
-
(true / false) Whether to change data labels positions so that they wouldn’t overlap or not.
-
#hide_labels_percent ⇒ Object
- 0
-
data labels of slices less then skip_labels_percent% will be hidden (to avoid label overlapping if there are many small pie slices).
-
#line_alpha ⇒ Object
- 15
-
(Number).
-
#line_color ⇒ Object
- #000000
-
(hex color code).
-
#max_width ⇒ Object
- 120
-
(Number).
-
#radius ⇒ Object
- 20%
-
(Number / Number%) distance of the labels from the pie.
-
#show ⇒ Object
-
(value title percents description) You can format any data label: value - will be replaced with value and so on.
-
#show_lines ⇒ Object
- true
-
(true / false) whether to show lines from slices to data labels or not.
-
#text_color ⇒ Object
- text_color
-
(hex color code).
-
#text_size ⇒ Object
- text_size
-
(Number).
Method Summary
Methods included from Base
#build_xml, #initialize, #populate, #to_xml
Instance Attribute Details
#avoid_overlapping ⇒ Object
- true
-
(true / false) Whether to change data labels positions so that they wouldn’t overlap or not
353 354 355 |
# File 'lib/ambling/pie.rb', line 353 def avoid_overlapping @avoid_overlapping end |
#hide_labels_percent ⇒ Object
- 0
-
data labels of slices less then skip_labels_percent% will be hidden (to avoid label overlapping if there are many small pie slices)
348 349 350 |
# File 'lib/ambling/pie.rb', line 348 def hide_labels_percent @hide_labels_percent end |
#line_alpha ⇒ Object
- 15
-
(Number)
343 344 345 |
# File 'lib/ambling/pie.rb', line 343 def line_alpha @line_alpha end |
#line_color ⇒ Object
- #000000
-
(hex color code)
338 339 340 |
# File 'lib/ambling/pie.rb', line 338 def line_color @line_color end |
#max_width ⇒ Object
- 120
-
(Number)
323 324 325 |
# File 'lib/ambling/pie.rb', line 323 def max_width @max_width end |
#radius ⇒ Object
- 20%
-
(Number / Number%) distance of the labels from the pie. Use negative value to place labels on the pie
308 309 310 |
# File 'lib/ambling/pie.rb', line 308 def radius @radius end |
#show ⇒ Object
-
(value title percents description) You can format any data label: value - will be replaced with value and so on. You can add your own text or html code too.
328 329 330 |
# File 'lib/ambling/pie.rb', line 328 def show @show end |
#show_lines ⇒ Object
- true
-
(true / false) whether to show lines from slices to data labels or not
333 334 335 |
# File 'lib/ambling/pie.rb', line 333 def show_lines @show_lines end |
#text_color ⇒ Object
- text_color
-
(hex color code)
313 314 315 |
# File 'lib/ambling/pie.rb', line 313 def text_color @text_color end |
#text_size ⇒ Object
- text_size
-
(Number)
318 319 320 |
# File 'lib/ambling/pie.rb', line 318 def text_size @text_size end |