Class: Ambling::Pie::Settings::DataLabels

Inherits:
Object
  • Object
show all
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

Method Summary

Methods included from Base

#build_xml, #initialize, #populate, #to_xml

Instance Attribute Details

#avoid_overlappingObject

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_percentObject

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_alphaObject

15

(Number)



343
344
345
# File 'lib/ambling/pie.rb', line 343

def line_alpha
  @line_alpha
end

#line_colorObject

#000000

(hex color code)



338
339
340
# File 'lib/ambling/pie.rb', line 338

def line_color
  @line_color
end

#max_widthObject

120

(Number)



323
324
325
# File 'lib/ambling/pie.rb', line 323

def max_width
  @max_width
end

#radiusObject

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

#showObject

(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_linesObject

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_colorObject

text_color

(hex color code)



313
314
315
# File 'lib/ambling/pie.rb', line 313

def text_color
  @text_color
end

#text_sizeObject

text_size

(Number)



318
319
320
# File 'lib/ambling/pie.rb', line 318

def text_size
  @text_size
end