ziya 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Manifest.txt +74 -28
- data/README.txt +91 -14
- data/Rakefile +1 -1
- data/bin/ziyafy +2 -0
- data/charts/AC_RunActiveContent.js +292 -0
- data/charts/charts.swf +0 -0
- data/charts/charts_library/ar3d.swf +0 -0
- data/charts/charts_library/arno.swf +0 -0
- data/charts/charts_library/ars3.swf +0 -0
- data/charts/charts_library/arst.swf +0 -0
- data/charts/charts_library/brfl.swf +0 -0
- data/charts/charts_library/brno.swf +0 -0
- data/charts/charts_library/brst.swf +0 -0
- data/charts/charts_library/buno.swf +0 -0
- data/charts/charts_library/cl3d.swf +0 -0
- data/charts/charts_library/clfl.swf +0 -0
- data/charts/charts_library/clno.swf +0 -0
- data/charts/charts_library/clp3.swf +0 -0
- data/charts/charts_library/cls3.swf +0 -0
- data/charts/charts_library/clst.swf +0 -0
- data/charts/charts_library/cnno.swf +0 -0
- data/charts/charts_library/lnno.swf +0 -0
- data/charts/charts_library/mxno.swf +0 -0
- data/charts/charts_library/pi3d.swf +0 -0
- data/charts/charts_library/pino.swf +0 -0
- data/charts/charts_library/pono.swf +0 -0
- data/charts/charts_library/scno.swf +0 -0
- data/charts/full_screen.swf +0 -0
- data/charts/sliders/black.swf +0 -0
- data/charts/sliders/preview_handle_1.swf +0 -0
- data/charts/sliders/preview_handle_2.swf +0 -0
- data/fred.rb +36 -0
- data/gauges/designs/circle.yml +18 -0
- data/gauges/designs/signal.yml +14 -0
- data/gauges/designs/thermo.yml +119 -0
- data/gauges/designs/title.yml +11 -0
- data/gauges/gauge.swf +0 -0
- data/lib/ziya.rb +17 -5
- data/lib/ziya/charts/area.rb +6 -1
- data/lib/ziya/charts/area_threed.rb +16 -0
- data/lib/ziya/charts/bar.rb +8 -3
- data/lib/ziya/charts/base.rb +210 -153
- data/lib/ziya/charts/bubble.rb +18 -0
- data/lib/ziya/charts/candle_stick.rb +6 -1
- data/lib/ziya/charts/column.rb +7 -2
- data/lib/ziya/charts/column_threed.rb +6 -1
- data/lib/ziya/charts/floating_bar.rb +6 -1
- data/lib/ziya/charts/floating_column.rb +7 -2
- data/lib/ziya/charts/line.rb +7 -2
- data/lib/ziya/charts/mixed.rb +5 -0
- data/lib/ziya/charts/parallel_threed_column.rb +6 -1
- data/lib/ziya/charts/pie.rb +7 -2
- data/lib/ziya/charts/pie_threed.rb +7 -2
- data/lib/ziya/charts/polar.rb +6 -1
- data/lib/ziya/charts/scatter.rb +6 -1
- data/lib/ziya/charts/stacked_area.rb +5 -0
- data/lib/ziya/charts/stacked_bar.rb +5 -0
- data/lib/ziya/charts/stacked_column.rb +7 -2
- data/lib/ziya/charts/stacked_threed_area.rb +16 -0
- data/lib/ziya/charts/stacked_threed_column.rb +6 -1
- data/lib/ziya/components/area.rb +5 -2
- data/lib/ziya/components/axis_category.rb +8 -60
- data/lib/ziya/components/axis_ticks.rb +25 -27
- data/lib/ziya/components/axis_value.rb +5 -48
- data/lib/ziya/components/base.rb +59 -17
- data/lib/ziya/components/bevel.rb +15 -0
- data/lib/ziya/components/blur.rb +13 -0
- data/lib/ziya/components/chart_border.rb +4 -23
- data/lib/ziya/components/chart_grid_h.rb +17 -19
- data/lib/ziya/components/chart_grid_v.rb +18 -19
- data/lib/ziya/components/chart_guide.rb +16 -0
- data/lib/ziya/components/chart_label.rb +16 -0
- data/lib/ziya/components/chart_pref.rb +12 -12
- data/lib/ziya/components/chart_rect.rb +27 -26
- data/lib/ziya/components/chart_transition.rb +15 -16
- data/lib/ziya/components/circle.rb +5 -2
- data/lib/ziya/components/draw.rb +12 -11
- data/lib/ziya/components/draw_base.rb +10 -0
- data/lib/ziya/components/filter.rb +26 -0
- data/lib/ziya/components/glow.rb +14 -0
- data/lib/ziya/components/image.rb +5 -1
- data/lib/ziya/components/legend.rb +18 -0
- data/lib/ziya/components/line.rb +6 -2
- data/lib/ziya/components/link.rb +9 -9
- data/lib/ziya/components/link_data.rb +9 -10
- data/lib/ziya/components/rect.rb +7 -2
- data/lib/ziya/components/scroll.rb +26 -0
- data/lib/ziya/components/shadow.rb +14 -0
- data/lib/ziya/components/text.rb +5 -1
- data/lib/ziya/components/update.rb +19 -0
- data/lib/ziya/gauges/base.rb +172 -0
- data/lib/ziya/gauges/radial.rb +18 -0
- data/lib/ziya/gauges/signal.rb +138 -0
- data/lib/ziya/gauges/support/area.rb +13 -0
- data/lib/ziya/gauges/support/base.rb +33 -0
- data/lib/ziya/gauges/support/circle.rb +14 -0
- data/lib/ziya/gauges/support/design.rb +5 -0
- data/lib/ziya/gauges/support/image.rb +12 -0
- data/lib/ziya/gauges/support/line.rb +12 -0
- data/lib/ziya/gauges/support/link.rb +24 -0
- data/lib/ziya/gauges/support/move.rb +15 -0
- data/lib/ziya/gauges/support/point.rb +12 -0
- data/lib/ziya/gauges/support/polygon.rb +13 -0
- data/lib/ziya/gauges/support/radial_base.rb +21 -0
- data/lib/ziya/gauges/support/radial_numbers.rb +41 -0
- data/lib/ziya/gauges/support/radial_ticks.rb +29 -0
- data/lib/ziya/gauges/support/rect.rb +14 -0
- data/lib/ziya/gauges/support/rotate.rb +15 -0
- data/lib/ziya/gauges/support/scale.rb +15 -0
- data/lib/ziya/gauges/support/text.rb +21 -0
- data/lib/ziya/gauges/support/update.rb +12 -0
- data/lib/ziya/gauges/thermo.rb +121 -0
- data/lib/ziya/helpers/base_helper.rb +39 -6
- data/lib/ziya/utils/text.rb +6 -0
- data/lib/ziya/version.rb +1 -1
- data/lib/ziya/ziya_helper.rb +289 -62
- data/spec/charts/base_spec.rb +35 -21
- data/spec/charts/chart_type_spec.rb +24 -3
- data/spec/components/area_spec.rb +9 -2
- data/spec/components/draw_spec.rb +1 -2
- data/spec/components/filter_spec.rb +27 -0
- data/spec/components/link_spec.rb +1 -2
- data/spec/components/series_color_spec.rb +1 -2
- data/spec/components/series_explode_spec.rb +1 -2
- data/spec/components/series_switch_spec.rb +1 -2
- data/spec/designs/circle.yml +7 -0
- data/spec/designs/crapping_out.yml +8 -0
- data/spec/designs/gauge_1.yml +43 -0
- data/spec/designs/gauge_2.yml +11 -0
- data/spec/designs/gauge_no_name.yml +43 -0
- data/spec/designs/gauge_raw.yml +5 -0
- data/spec/designs/thermo.yml +13 -0
- data/spec/gauges/base_spec.rb +90 -0
- data/spec/gauges/signal_spec.rb +36 -0
- data/spec/gauges/support/area_spec.rb +40 -0
- data/spec/gauges/support/circle_spec.rb +78 -0
- data/spec/gauges/support/image_spec.rb +35 -0
- data/spec/gauges/support/line_spec.rb +34 -0
- data/spec/gauges/support/link_spec.rb +35 -0
- data/spec/gauges/support/move_spec.rb +45 -0
- data/spec/gauges/support/polygon_spec.rb +36 -0
- data/spec/gauges/support/radial_numbers_spec.rb +35 -0
- data/spec/gauges/support/radial_ticks_spec.rb +30 -0
- data/spec/gauges/support/rotate_spec.rb +45 -0
- data/spec/gauges/support/scale_spec.rb +46 -0
- data/spec/gauges/support/text_spec.rb +40 -0
- data/spec/gauges/thermo_spec.rb +49 -0
- data/spec/helpers/base_helper_spec.rb +20 -6
- data/spec/spec_helper.rb +4 -1
- data/spec/test_helpers/gauge_2_helper.rb +17 -0
- data/spec/utils/logger_spec.rb +1 -3
- data/spec/utils/text_spec.rb +1 -2
- data/spec/ziya_helper_spec.rb +88 -11
- data/spec/ziya_spec.rb +1 -1
- data/tasks/gem.rake +1 -1
- metadata +79 -32
- data/charts/themes/commando/bar_chart.yml +0 -9
- data/charts/themes/commando/base_chart.yml +0 -65
- data/charts/themes/commando/column_chart.yml +0 -13
- data/charts/themes/commando/column_threed_chart.yml +0 -25
- data/charts/themes/commando/parallel_threed_column_chart.yml +0 -17
- data/charts/themes/commando/pie_chart.yml +0 -22
- data/charts/themes/commando/pie_threed_chart.yml +0 -28
- data/charts/themes/commando/polar_chart.yml +0 -11
- data/charts/themes/commando/stacked_bar_chart.yml +0 -9
- data/charts/themes/commando/stacked_column_chart.yml +0 -14
- data/charts/themes/commando/stacked_threed_column_chart.yml +0 -17
- data/charts/themes/default/bar_chart.yml +0 -3
- data/charts/themes/default/base_chart.yml +0 -67
- data/charts/themes/default/column_chart.yml +0 -13
- data/charts/themes/default/column_threed_chart.yml +0 -25
- data/charts/themes/default/parallel_threed_column_chart.yml +0 -17
- data/charts/themes/default/pie_chart.yml +0 -29
- data/charts/themes/default/pie_threed_chart.yml +0 -28
- data/charts/themes/default/polar_chart.yml +0 -12
- data/charts/themes/default/stacked_bar_chart.yml +0 -3
- data/charts/themes/default/stacked_column_chart.yml +0 -14
- data/charts/themes/default/stacked_threed_column_chart.yml +0 -17
- data/charts/themes/default/test.yml +0 -4
- data/lib/ziya/components/chart_value.rb +0 -71
- data/lib/ziya/components/legend_label.rb +0 -18
- data/lib/ziya/components/legend_rect.rb +0 -19
- data/lib/ziya/components/legend_transition.rb +0 -18
- data/lib/ziya/components/live_update.rb +0 -21
|
@@ -1,59 +1,16 @@
|
|
|
1
1
|
# -----------------------------------------------------------------------------
|
|
2
2
|
# Setup configuration on the chart value axis
|
|
3
3
|
#
|
|
4
|
-
# Sets the label attributes for the value-axis.
|
|
5
|
-
#
|
|
6
|
-
# <tt>min</tt>: The minimum value to start the value-axis with.
|
|
7
|
-
# The default is calculated from the chart's data. In 3D column charts, the minimum value
|
|
8
|
-
# is always zero.
|
|
9
|
-
# <tt>max</tt>: The maximum value to end the value-axis with.
|
|
10
|
-
# The default is calculated from the chart's data.
|
|
11
|
-
# <tt>steps</tt>: The number of steps between the minimum and maximum values. If the minimum value is negative,
|
|
12
|
-
# and the maximum value is positive, then 'steps' is the number of steps between zero and the
|
|
13
|
-
# larger of max and absolute min.
|
|
14
|
-
# The default is 4.
|
|
15
|
-
# <tt>prefix</tt>: The characters to add before the value numbers (example: $10).
|
|
16
|
-
# The default is nothing.
|
|
17
|
-
# <tt>suffix</tt>: The characters to add after the value numbers (example: 10%).
|
|
18
|
-
# The default is nothing.
|
|
19
|
-
# <tt>decimals</tt>: The number of decimal places to the right of the decimal point (example: 10.45).
|
|
20
|
-
# The default is zero (no decimals).
|
|
21
|
-
# <tt>decimal_char</tt>: The character to use at the left of a decimal fraction (example: 1.5).
|
|
22
|
-
# The default is '.' (dot or full stop.)
|
|
23
|
-
# <tt>separator</tt>: The character to place between every group of thousands (example: 1,00,000).
|
|
24
|
-
# The default is nothing.
|
|
25
|
-
# <tt>show_min</tt>: A boolean that indicates whether show or hide the first label in the value-axis. Hiding this
|
|
26
|
-
# first label might be necessary if it overlaps with the first label in the category axis.
|
|
27
|
-
# The default is true (show the first label).
|
|
28
|
-
# <tt>font</tt>: The font used in the value-axis.
|
|
29
|
-
# The default is Arial.
|
|
30
|
-
# <tt>bold</tt>: A boolean value that indicates whether the font is bold or not.
|
|
31
|
-
# The default is true.
|
|
32
|
-
# <tt>size</tt>: The font's size.
|
|
33
|
-
# The default font size is calculated based on the chart size.
|
|
34
|
-
# <tt>color</tt>: The font's color. This must be a string holding triple hexadecimal values representing the red,
|
|
35
|
-
# green, and blue components for a color.
|
|
36
|
-
# The default is "000000" (black).
|
|
37
|
-
# <tt>background_color</tt>: This applies to Polar charts only. It determines the labels' background color to make them visible
|
|
38
|
-
# over the graph. When omitted, axis_value labels have no background. This must be a string holding
|
|
39
|
-
# triple hexadecimal values representing the red, green, and blue components for a color.
|
|
40
|
-
# The default is omitted (no background).
|
|
41
|
-
# <tt>alpha</tt>: This affects the labels' transparency, only when the embedded font is used. Valid values are
|
|
42
|
-
# 0 (fully transparent) to 100 (fully opaque).
|
|
43
|
-
# The default is 90. To hide all labels in this axis, set the alpha to 0.
|
|
44
|
-
# <tt>orientation</tt>: This affects the labels' orientation, only when the embedded font is used. Valid values are
|
|
45
|
-
# "horizontal", "diagonal_up", "diagonal_down", "vertical_up", and "vertical_down."
|
|
46
|
-
# The default value is "horizontal".
|
|
47
|
-
#
|
|
48
|
-
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=axis_value
|
|
49
|
-
# for additional documentation, examples and futher detail.
|
|
50
4
|
# Author:: Fernand Galiana
|
|
51
|
-
# Date:: Dec 15th, 2006
|
|
52
5
|
# -----------------------------------------------------------------------------
|
|
53
6
|
module Ziya::Components
|
|
7
|
+
# Specifies the label attribute on the x or y axis depending on the chart type.
|
|
8
|
+
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=axis_value
|
|
9
|
+
# for additional documentation, examples and futher detail.
|
|
54
10
|
class AxisValue < Base
|
|
55
11
|
has_attribute :min, :max, :steps, :prefix, :suffix, :decimals,
|
|
56
12
|
:decimal_char, :separator, :show_min, :font, :bold,
|
|
57
|
-
:size, :color, :background_color, :alpha, :orientation
|
|
13
|
+
:size, :color, :background_color, :alpha, :orientation,
|
|
14
|
+
:shadow, :bevel, :glow, :blur
|
|
58
15
|
end
|
|
59
16
|
end
|
data/lib/ziya/components/base.rb
CHANGED
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
# Date:: Dec 15th, 2006
|
|
9
9
|
# -----------------------------------------------------------------------------
|
|
10
10
|
module Ziya::Components
|
|
11
|
-
class Base
|
|
11
|
+
class Base # :nodoc:
|
|
12
12
|
include Ziya::Utils::Text
|
|
13
13
|
|
|
14
14
|
# class methods...
|
|
15
15
|
class << self
|
|
16
16
|
# -----------------------------------------------------------------------
|
|
17
17
|
# defines attribute accessors for a given component
|
|
18
|
-
def has_attribute(*args)
|
|
18
|
+
def has_attribute(*args) # :nodoc:
|
|
19
19
|
class_name = self.to_s
|
|
20
20
|
args.each do |attribute|
|
|
21
21
|
# add the attribute to the collection making sure to create a new array if one doesn't exist
|
|
@@ -30,11 +30,25 @@ module Ziya::Components
|
|
|
30
30
|
|
|
31
31
|
# -----------------------------------------------------------------------
|
|
32
32
|
# Class accessor. Retrieve class level preferences
|
|
33
|
-
def attributes
|
|
33
|
+
def attributes # :nodoc:
|
|
34
34
|
@attributes ||= {}
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
+
# -------------------------------------------------------------------------
|
|
39
|
+
# initializes component from hash
|
|
40
|
+
def initialize( opts={} )
|
|
41
|
+
opts.each_pair do |k,v|
|
|
42
|
+
self.send( "#{k}=", v )
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def ==( other )
|
|
47
|
+
self.options.each_pair do |k,v|
|
|
48
|
+
return false unless other.send( k ) == v
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
38
52
|
# -------------------------------------------------------------------------
|
|
39
53
|
# merge attributes with overriden component
|
|
40
54
|
def merge( parent_attributes, force=false )
|
|
@@ -45,19 +59,34 @@ module Ziya::Components
|
|
|
45
59
|
end
|
|
46
60
|
end
|
|
47
61
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
62
|
+
def flatten( xml )
|
|
63
|
+
hash = has_sub_components
|
|
64
|
+
clazz = demodulize( self.class.name )
|
|
65
|
+
pref = underscore( clazz )
|
|
66
|
+
if hash and ! hash.empty?
|
|
67
|
+
self.class.module_eval <<-XML
|
|
68
|
+
xml.#{pref}( #{options_as_string} ) do
|
|
69
|
+
hash.each{ |k,v| v.flatten( xml ) }
|
|
70
|
+
end
|
|
71
|
+
XML
|
|
72
|
+
else
|
|
73
|
+
self.class.module_eval "xml.#{pref}( #{options_as_string} )"
|
|
59
74
|
end
|
|
60
75
|
end
|
|
76
|
+
|
|
77
|
+
# -------------------------------------------------------------------------
|
|
78
|
+
# handles simple flatten operation
|
|
79
|
+
# def method_missing(method, *args)
|
|
80
|
+
# case method
|
|
81
|
+
# when :flatten
|
|
82
|
+
# xml = args.first
|
|
83
|
+
# clazz = demodulize( self.class.name )
|
|
84
|
+
# pref = underscore( clazz )
|
|
85
|
+
# self.class.module_eval "xml.#{pref}( #{options_as_string} )"
|
|
86
|
+
# else
|
|
87
|
+
# super.method_missing(method, *args)
|
|
88
|
+
# end
|
|
89
|
+
# end
|
|
61
90
|
|
|
62
91
|
# -------------------------------------------------------------------------
|
|
63
92
|
# checks if a give component properties have been set.
|
|
@@ -66,13 +95,22 @@ module Ziya::Components
|
|
|
66
95
|
!options.empty?
|
|
67
96
|
end
|
|
68
97
|
|
|
98
|
+
# -------------------------------------------------------------------------
|
|
99
|
+
# Checks if one of the options is an array
|
|
100
|
+
def has_sub_components
|
|
101
|
+
options.each_pair do |k, v|
|
|
102
|
+
return v if v.is_a? YAML::Omap
|
|
103
|
+
end
|
|
104
|
+
nil
|
|
105
|
+
end
|
|
106
|
+
|
|
69
107
|
# -------------------------------------------------------------------------
|
|
70
108
|
# calls all attribute methods and gather the various props into a hash
|
|
71
109
|
def options
|
|
72
110
|
options = {}
|
|
73
111
|
attributes_for(self).each do |p|
|
|
74
|
-
option = self.send(p.to_sym)
|
|
75
|
-
options[p] = option
|
|
112
|
+
option = self.send(p.to_sym)
|
|
113
|
+
options[p] = option unless option.nil?
|
|
76
114
|
end
|
|
77
115
|
options
|
|
78
116
|
end
|
|
@@ -84,7 +122,7 @@ module Ziya::Components
|
|
|
84
122
|
opts = options
|
|
85
123
|
opts.keys.sort{ |a,b| a.to_s <=> b.to_s }.each do |k|
|
|
86
124
|
value = opts[k]
|
|
87
|
-
buff << sprintf( ":%s => '%s'", k, value.to_s ) if value
|
|
125
|
+
buff << sprintf( ":%s => '%s'", k, value.to_s ) if !value.nil? and !value.is_a? YAML::Omap
|
|
88
126
|
end
|
|
89
127
|
buff.join( "," )
|
|
90
128
|
end
|
|
@@ -96,5 +134,9 @@ module Ziya::Components
|
|
|
96
134
|
raise "Unable to get attributes for #{an_instance}" unless attrs
|
|
97
135
|
attrs
|
|
98
136
|
end
|
|
137
|
+
|
|
138
|
+
# =========================================================================
|
|
139
|
+
private
|
|
140
|
+
|
|
99
141
|
end
|
|
100
142
|
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# -----------------------------------------------------------------------------
|
|
2
|
+
# Create a bevel filter
|
|
3
|
+
#
|
|
4
|
+
# Author:: Fernand
|
|
5
|
+
# -----------------------------------------------------------------------------
|
|
6
|
+
module Ziya::Components
|
|
7
|
+
# Specifies the bevel filter to be applied to some component ie chart_rect, axis_value, etc...
|
|
8
|
+
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=filter
|
|
9
|
+
# for additional documentation, examples and futher detail.
|
|
10
|
+
class Bevel < Base
|
|
11
|
+
has_attribute :id, :distance, :angle, :highlightColor, :highlightAlpha,
|
|
12
|
+
:shadowColor, :shadowAlpha, :blurX, :blurY, :strength,
|
|
13
|
+
:quality, :type, :knockout
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# -----------------------------------------------------------------------------
|
|
2
|
+
# Create a blur filter
|
|
3
|
+
#
|
|
4
|
+
# Author:: Fernand Galiana
|
|
5
|
+
# -----------------------------------------------------------------------------
|
|
6
|
+
module Ziya::Components
|
|
7
|
+
# Specifies the blur filter to be applied to some component ie chart_rect, axis_value, etc...
|
|
8
|
+
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=filter
|
|
9
|
+
# for additional documentation, examples and futher detail.
|
|
10
|
+
class Blur < Base
|
|
11
|
+
has_attribute :id, :blurX, :blurY, :quality
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -1,31 +1,12 @@
|
|
|
1
1
|
# -----------------------------------------------------------------------------
|
|
2
2
|
# Sets up chart border configuration
|
|
3
3
|
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
# <tt>top_thickness</tt>: The thickness of the border's top line. In polar charts, the top_thickness is ignored.
|
|
7
|
-
# Valid values are zero and above. Zero makes this line invisible.
|
|
8
|
-
# The default is zero.
|
|
9
|
-
# <tt>bottom_thickness</tt>: The thickness of the border's bottom line. In polar charts, the bottom_thickness is used
|
|
10
|
-
# for the chart's outer border Valid values are zero and above. Zero makes this line invisible.
|
|
11
|
-
# The default is zero for pie and bar charts, and 2 for all other charts.
|
|
12
|
-
# <tt>left_thickness</tt>: The thickness of the border's left line. In polar charts, the left_thickness is used for the
|
|
13
|
-
# value-axis. Valid values are zero and above. Zero makes this line invisible.
|
|
14
|
-
# The default is 2 for bar charts, and 0 for all other charts
|
|
15
|
-
# <tt>right_thickness</tt>: The thickness of the border's right line. In polar charts, the right_thickness is ignored.
|
|
16
|
-
# Valid values are zero and above. Zero makes this line invisible.
|
|
17
|
-
# The default is zero.
|
|
18
|
-
# <tt>color</tt>: The border color. This must be a string holding triple hexadecimal values representing
|
|
19
|
-
# the red, green, and blue components for a color.
|
|
20
|
-
# The default is "000000" (black).
|
|
21
|
-
#
|
|
22
|
-
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=chart_border
|
|
23
|
-
# for additional documentation, examples and futher detail.
|
|
24
|
-
#
|
|
25
|
-
# Author:: Fernand Galiana
|
|
26
|
-
# Date:: Dec 15th, 2006
|
|
4
|
+
# Author:: Fernand
|
|
27
5
|
# -----------------------------------------------------------------------------
|
|
28
6
|
module Ziya::Components
|
|
7
|
+
# Specifies how to render a chart border
|
|
8
|
+
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=chart_border
|
|
9
|
+
# for additional documentation, examples and futher detail.
|
|
29
10
|
class ChartBorder < Base
|
|
30
11
|
has_attribute :top_thickness, :bottom_thickness, :left_thickness,
|
|
31
12
|
:right_thickness, :color
|
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
# -----------------------------------------------------------------------------
|
|
2
2
|
# Sets up chart horizontal grid configuration
|
|
3
3
|
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
# <tt>thickness</tt>: The thickness of the grid's horizontal lines. Valid values are zero and above.
|
|
7
|
-
# Zero makes the horizontal lines invisible.
|
|
8
|
-
# The default is 1.
|
|
9
|
-
# <tt>color</tt>: The grid's horizontal color. This must be a string holding triple hexadecimal
|
|
10
|
-
# values representing the red, green, and blue components for a color.
|
|
11
|
-
# The default is "000000" (black).
|
|
12
|
-
# <tt>alpha</tt>: The grid's horizontal transparency value. Valid values are 0 (fully transparent)
|
|
13
|
-
# to 100 (fully opaque).
|
|
14
|
-
# The default is 20.
|
|
15
|
-
# <tt>type</tt>: The grid's horizontal line type. Valid values are solid, dotted, and dashed.
|
|
16
|
-
# The default is solid.
|
|
17
|
-
#
|
|
18
|
-
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=chart_grid_h
|
|
19
|
-
# for additional documentation, examples and futher detail.
|
|
20
|
-
#
|
|
21
|
-
# Author:: Fernand Galiana
|
|
22
|
-
# Date:: Dec 15th, 2006
|
|
4
|
+
# Author:: Fernand
|
|
23
5
|
# -----------------------------------------------------------------------------
|
|
24
6
|
module Ziya::Components
|
|
7
|
+
# Sets the chart's horizontal grid attributes.
|
|
8
|
+
#
|
|
9
|
+
# <tt>thickness</tt>: The thickness of the grid's horizontal lines. Valid values are zero and above.
|
|
10
|
+
# Zero makes the horizontal lines invisible.
|
|
11
|
+
# The default is 1.
|
|
12
|
+
# <tt>color</tt>: The grid's horizontal color. This must be a string holding triple hexadecimal
|
|
13
|
+
# values representing the red, green, and blue components for a color.
|
|
14
|
+
# The default is "000000" (black).
|
|
15
|
+
# <tt>alpha</tt>: The grid's horizontal transparency value. Valid values are 0 (fully transparent)
|
|
16
|
+
# to 100 (fully opaque).
|
|
17
|
+
# The default is 20.
|
|
18
|
+
# <tt>type</tt>: The grid's horizontal line type. Valid values are solid, dotted, and dashed.
|
|
19
|
+
# The default is solid.
|
|
20
|
+
#
|
|
21
|
+
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=chart_grid_h
|
|
22
|
+
# for additional documentation, examples and futher detail.
|
|
25
23
|
class ChartGridH < Base
|
|
26
24
|
has_attribute :thickness, :color, :alpha, :type
|
|
27
25
|
end
|
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
# -----------------------------------------------------------------------------
|
|
2
2
|
# Sets up chart vertical grid configuration
|
|
3
3
|
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
# <tt>thickness</tt>: The thickness of the grid's vertical lines. Valid values are zero and above.
|
|
7
|
-
# Zero makes the vertical lines invisible.
|
|
8
|
-
# The default is zero.
|
|
9
|
-
# <tt>color</tt>: The grid's vertical color. This must be a string holding triple hexadecimal values
|
|
10
|
-
# representing the red, green, and blue components for a color.
|
|
11
|
-
# The default is "000000" (black).
|
|
12
|
-
# <tt>alpha</tt>: The grid's vertical transparency value. Valid values are 0 (fully transparent)
|
|
13
|
-
# to 100 (fully opaque).
|
|
14
|
-
# The default is 20.
|
|
15
|
-
# <tt>type</tt>: The grid's vertical line type. Valid values are solid, dotted, and dashed.
|
|
16
|
-
# The default is solid.
|
|
17
|
-
#
|
|
18
|
-
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=chart_grid_v
|
|
19
|
-
# for additional documentation, examples and futher detail.
|
|
20
|
-
#
|
|
21
|
-
# Author:: Fernand Galiana
|
|
22
|
-
# Date:: Dec 15th, 2006
|
|
4
|
+
# Author:: Fernand
|
|
23
5
|
# -----------------------------------------------------------------------------
|
|
24
6
|
module Ziya::Components
|
|
7
|
+
# Sets the chart's vertical grid attributes.
|
|
8
|
+
#
|
|
9
|
+
# <tt>thickness</tt>: The thickness of the grid's vertical lines. Valid values are zero and above.
|
|
10
|
+
# Zero makes the vertical lines invisible.
|
|
11
|
+
# The default is zero.
|
|
12
|
+
# <tt>color</tt>: The grid's vertical color. This must be a string holding triple hexadecimal values
|
|
13
|
+
# representing the red, green, and blue components for a color.
|
|
14
|
+
# The default is "000000" (black).
|
|
15
|
+
# <tt>alpha</tt>: The grid's vertical transparency value. Valid values are 0 (fully transparent)
|
|
16
|
+
# to 100 (fully opaque).
|
|
17
|
+
# The default is 20.
|
|
18
|
+
# <tt>type</tt>: The grid's vertical line type. Valid values are solid, dotted, and dashed.
|
|
19
|
+
# The default is solid.
|
|
20
|
+
#
|
|
21
|
+
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=chart_grid_v
|
|
22
|
+
# for additional documentation, examples and futher detail.
|
|
23
|
+
#
|
|
25
24
|
class ChartGridV < Base
|
|
26
25
|
has_attribute :thickness, :color, :alpha, :type
|
|
27
26
|
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# -----------------------------------------------------------------------------
|
|
2
|
+
# Sets up a guide lines configuration for a chart
|
|
3
|
+
#
|
|
4
|
+
# Author:: Fernand Galiana
|
|
5
|
+
# -----------------------------------------------------------------------------
|
|
6
|
+
module Ziya::Components
|
|
7
|
+
# Specifies how to configure a guide for either axis on a chart
|
|
8
|
+
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=chart_guide
|
|
9
|
+
# for additional documentation, examples and futher detail.
|
|
10
|
+
class ChartGuide < Base
|
|
11
|
+
has_attribute :horizontal, :vertical, :thickness, :color, :alpha, :type,
|
|
12
|
+
:snap_h, :snap_v, :radius, :fill_color, :line_color, :line_alpha, :line_thickness,
|
|
13
|
+
:text_h_alpha, :text_v_alpha, :prefix_h, :prefix_v, :suffix_h, :suffix_v,
|
|
14
|
+
:decimals, :decimal_char, :separator, :font, :bold, :size, :text_color, :background_color
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# -----------------------------------------------------------------------------
|
|
2
|
+
# Sets up chart labels configuration. These are the labels on top on the chart.
|
|
3
|
+
#
|
|
4
|
+
# Author:: Fernand Galiana
|
|
5
|
+
# -----------------------------------------------------------------------------
|
|
6
|
+
module Ziya::Components
|
|
7
|
+
# Specifies the label for the chart element actual value. This can be setup to
|
|
8
|
+
# be fixed or as a tooltip
|
|
9
|
+
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=chart_label
|
|
10
|
+
# for additional documentation, examples and futher detail.
|
|
11
|
+
class ChartLabel < Base
|
|
12
|
+
has_attribute :prefix, :suffix, :decimals, :decimal_char, :separator, :position,
|
|
13
|
+
:hide_zero, :as_percentage, :font, :bold, :size, :color,
|
|
14
|
+
:background_color, :alpha, :shadow, :bevel, :glow, :blur
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
# -----------------------------------------------------------------------------
|
|
2
2
|
# Sets up various preferences available on a given chart type
|
|
3
3
|
#
|
|
4
|
-
# Sets the preferences for some chart types. Each chart type has different preferences,
|
|
5
|
-
# or no preferences at all.
|
|
6
|
-
#
|
|
7
|
-
# <tt></tt>:
|
|
8
|
-
#
|
|
9
|
-
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=chart_pref
|
|
10
|
-
# for additional documentation, examples and futher detail.
|
|
11
|
-
#
|
|
12
4
|
# Author:: Fernand Galiana
|
|
13
|
-
# Date:: Dec 15th, 2006
|
|
14
5
|
# -----------------------------------------------------------------------------
|
|
15
6
|
module Ziya::Components
|
|
7
|
+
# Sets the preferences for some chart types. Each chart type has different preferences,
|
|
8
|
+
# or no preferences at all.
|
|
9
|
+
#
|
|
10
|
+
# <tt></tt>:
|
|
11
|
+
#
|
|
12
|
+
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=chart_pref
|
|
13
|
+
# for additional documentation, examples and futher detail.
|
|
14
|
+
#
|
|
16
15
|
class ChartPref < Base
|
|
17
|
-
has_attribute :
|
|
18
|
-
:
|
|
16
|
+
has_attribute :line_thickness, :point_shape, :point_size, :fill_shape,
|
|
17
|
+
:type, :bull_color, :bear_color,
|
|
18
|
+
:reverse, :drag, :min_x, :min_y, :max_x, :max_y,
|
|
19
19
|
:trend_thickness, :trend_alpha, :line_alpha, :rotation_x,
|
|
20
|
-
:rotation_y, :grid
|
|
20
|
+
:rotation_y, :grid, :select
|
|
21
21
|
end
|
|
22
22
|
end
|
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
# -----------------------------------------------------------------------------
|
|
2
2
|
# Sets up the content area the chart occupies
|
|
3
3
|
#
|
|
4
|
-
# Sets the chart's rectangle
|
|
5
|
-
#
|
|
6
|
-
# <tt>x</tt>: The horizontal position of the rectangle's upper left corner relative to the upper
|
|
7
|
-
# left corner of the canvas (0, 0).
|
|
8
|
-
# <tt>y</tt>: The vertical position of the rectangle's upper left corner relative to the upper
|
|
9
|
-
# left corner of the canvas (0, 0).
|
|
10
|
-
# <tt>width</tt>: The rectangle's width.
|
|
11
|
-
# <tt>height</tt>: The rectangle's height.
|
|
12
|
-
# <tt>positive_color</tt>: The chart's background color above the zero line. This must be a string holding triple
|
|
13
|
-
# hexadecimal values representing the red, green, and blue components for a color.
|
|
14
|
-
# The default is "FFFFFF" (white).
|
|
15
|
-
# <tt>negative_color</tt>: The chart's background color below the zero line. This must be a string holding triple
|
|
16
|
-
# hexadecimal values representing the red, green, and blue components for a color.
|
|
17
|
-
# The default is "000000" (black).
|
|
18
|
-
# <tt>positive_alpha</tt>: The transparency value of the background color above the zero line. Valid values are 0
|
|
19
|
-
# (fully transparent) to 100 (fully opaque).
|
|
20
|
-
# The default is 75.
|
|
21
|
-
# <tt>negative_alpha</tt>: The transparency value of the background color below the zero line. Valid values are 0
|
|
22
|
-
# (fully transparent) to 100 (fully opaque).
|
|
23
|
-
# The default is 20.
|
|
24
|
-
#
|
|
25
|
-
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=chart_rect
|
|
26
|
-
# for additional documentation, examples and futher detail.
|
|
27
|
-
#
|
|
28
4
|
# Author:: Fernand Galiana
|
|
29
|
-
# Date:: Dec 15th, 2006
|
|
30
5
|
# -----------------------------------------------------------------------------
|
|
31
6
|
module Ziya::Components
|
|
7
|
+
# Sets the chart's rectangle
|
|
8
|
+
#
|
|
9
|
+
# <tt>x</tt>: The horizontal position of the rectangle's upper left corner relative to the upper
|
|
10
|
+
# left corner of the canvas (0, 0).
|
|
11
|
+
# <tt>y</tt>: The vertical position of the rectangle's upper left corner relative to the upper
|
|
12
|
+
# left corner of the canvas (0, 0).
|
|
13
|
+
# <tt>width</tt>: The rectangle's width.
|
|
14
|
+
# <tt>height</tt>: The rectangle's height.
|
|
15
|
+
# <tt>positive_color</tt>: The chart's background color above the zero line. This must be a string holding triple
|
|
16
|
+
# hexadecimal values representing the red, green, and blue components for a color.
|
|
17
|
+
# The default is "FFFFFF" (white).
|
|
18
|
+
# <tt>negative_color</tt>: The chart's background color below the zero line. This must be a string holding triple
|
|
19
|
+
# hexadecimal values representing the red, green, and blue components for a color.
|
|
20
|
+
# The default is "000000" (black).
|
|
21
|
+
# <tt>positive_alpha</tt>: The transparency value of the background color above the zero line. Valid values are 0
|
|
22
|
+
# (fully transparent) to 100 (fully opaque).
|
|
23
|
+
# The default is 75.
|
|
24
|
+
# <tt>negative_alpha</tt>: The transparency value of the background color below the zero line. Valid values are 0
|
|
25
|
+
# (fully transparent) to 100 (fully opaque).
|
|
26
|
+
# The default is 20.
|
|
27
|
+
#
|
|
28
|
+
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=chart_rect
|
|
29
|
+
# for additional documentation, examples and futher detail.
|
|
30
|
+
#
|
|
32
31
|
class ChartRect < Base
|
|
33
32
|
has_attribute :x, :y, :width, :height, :positive_color, :negative_color,
|
|
34
|
-
:positive_alpha, :negative_alpha
|
|
33
|
+
:positive_alpha, :negative_alpha,
|
|
34
|
+
:shadow, :bevel, :blur, :glow,
|
|
35
|
+
:corner_tl, :corner_tr, :corner_bl, :corner_br
|
|
35
36
|
end
|
|
36
37
|
end
|