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

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/ambling/pie.rb

Constant Summary collapse

VALUES =
[:x,:y,:radius,:inner_radius,:height,:angle,:start_angle,:outline_color,:outline_alpha,:base_color,:brightness_step,:colors,:link_target,:alpha,:hover_brightness,:gradient,:gradient_ratio]

Instance Attribute Summary collapse

Method Summary

Methods included from Base

#build_xml, #initialize, #populate, #to_xml

Instance Attribute Details

#alphaObject

100

(0 - 100) slices alpha. You can set individual alphas for every slice in data file. If you set alpha to 0 the slice will be inactive for mouse events and data labels will be hidden. This allows you to make not full pies and donuts.



224
225
226
# File 'lib/ambling/pie.rb', line 224

def alpha
  @alpha
end

#angleObject

0

(0 - 90) lean angle (for 3D effect)



184
185
186
# File 'lib/ambling/pie.rb', line 184

def angle
  @angle
end

#base_colorObject

(hex color code) color of first slice



204
205
206
# File 'lib/ambling/pie.rb', line 204

def base_color
  @base_color
end

#brightness_stepObject

20

(-100 - 100) if base_color is used, every next slice is filled with lighter by brightnessStep % color. Use negative value if you want to get darker colors



209
210
211
# File 'lib/ambling/pie.rb', line 209

def brightness_step
  @brightness_step
end

#colorsObject

#FF0F00,#FF6600,#FF9E01,#FCD202,#F8FF01,#B0DE09,#04D215,#0D8ECF,#0D52D1,#2A0CD0,#8A0CCF,#CD0D74,#754DEB,#DDDDDD,#999999,#333333,#990000

(hex color codes separated by comas)



214
215
216
# File 'lib/ambling/pie.rb', line 214

def colors
  @colors
end

#gradientObject

(linear/radial) Allows slices to be filled with gradient colors



234
235
236
# File 'lib/ambling/pie.rb', line 234

def gradient
  @gradient
end

#gradient_ratioObject

0,-40

(Numbers from (-255 to 255) separated by commas) Controls the gradient ratio



239
240
241
# File 'lib/ambling/pie.rb', line 239

def gradient_ratio
  @gradient_ratio
end

#heightObject

0

(Number) pie height (for 3D effect)



179
180
181
# File 'lib/ambling/pie.rb', line 179

def height
  @height
end

#hover_brightnessObject

0

(from -255 to 255) The pie slice may darken/lighten when the use rolls over it. The intensity may be set here



229
230
231
# File 'lib/ambling/pie.rb', line 229

def hover_brightness
  @hover_brightness
end

#inner_radiusObject

0

(Number / Number%) the radius of the hole (if you want to have donut, use > 0)



174
175
176
# File 'lib/ambling/pie.rb', line 174

def inner_radius
  @inner_radius
end

(_blank, _top…) If pie slice has a link this is link target



219
220
221
# File 'lib/ambling/pie.rb', line 219

def link_target
  @link_target
end

#outline_alphaObject

0

(Number)



199
200
201
# File 'lib/ambling/pie.rb', line 199

def outline_alpha
  @outline_alpha
end

#outline_colorObject

#FFFFFF

(hex color code)



194
195
196
# File 'lib/ambling/pie.rb', line 194

def outline_color
  @outline_color
end

#radiusObject

25%

(Number / Number%)



169
170
171
# File 'lib/ambling/pie.rb', line 169

def radius
  @radius
end

#start_angleObject

90

(0-360) angle of a first slice. This will work properly only if <pie><height> is set to 0. If height is > 0, then there can be two angles only: 90 and 270



189
190
191
# File 'lib/ambling/pie.rb', line 189

def start_angle
  @start_angle
end

#xObject

[50%](Number / Number% / !Number)



159
160
161
# File 'lib/ambling/pie.rb', line 159

def x
  @x
end

#yObject

[45%](Number / Number% / !Number)



164
165
166
# File 'lib/ambling/pie.rb', line 164

def y
  @y
end