ziya 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. data/Manifest.txt +74 -28
  2. data/README.txt +91 -14
  3. data/Rakefile +1 -1
  4. data/bin/ziyafy +2 -0
  5. data/charts/AC_RunActiveContent.js +292 -0
  6. data/charts/charts.swf +0 -0
  7. data/charts/charts_library/ar3d.swf +0 -0
  8. data/charts/charts_library/arno.swf +0 -0
  9. data/charts/charts_library/ars3.swf +0 -0
  10. data/charts/charts_library/arst.swf +0 -0
  11. data/charts/charts_library/brfl.swf +0 -0
  12. data/charts/charts_library/brno.swf +0 -0
  13. data/charts/charts_library/brst.swf +0 -0
  14. data/charts/charts_library/buno.swf +0 -0
  15. data/charts/charts_library/cl3d.swf +0 -0
  16. data/charts/charts_library/clfl.swf +0 -0
  17. data/charts/charts_library/clno.swf +0 -0
  18. data/charts/charts_library/clp3.swf +0 -0
  19. data/charts/charts_library/cls3.swf +0 -0
  20. data/charts/charts_library/clst.swf +0 -0
  21. data/charts/charts_library/cnno.swf +0 -0
  22. data/charts/charts_library/lnno.swf +0 -0
  23. data/charts/charts_library/mxno.swf +0 -0
  24. data/charts/charts_library/pi3d.swf +0 -0
  25. data/charts/charts_library/pino.swf +0 -0
  26. data/charts/charts_library/pono.swf +0 -0
  27. data/charts/charts_library/scno.swf +0 -0
  28. data/charts/full_screen.swf +0 -0
  29. data/charts/sliders/black.swf +0 -0
  30. data/charts/sliders/preview_handle_1.swf +0 -0
  31. data/charts/sliders/preview_handle_2.swf +0 -0
  32. data/fred.rb +36 -0
  33. data/gauges/designs/circle.yml +18 -0
  34. data/gauges/designs/signal.yml +14 -0
  35. data/gauges/designs/thermo.yml +119 -0
  36. data/gauges/designs/title.yml +11 -0
  37. data/gauges/gauge.swf +0 -0
  38. data/lib/ziya.rb +17 -5
  39. data/lib/ziya/charts/area.rb +6 -1
  40. data/lib/ziya/charts/area_threed.rb +16 -0
  41. data/lib/ziya/charts/bar.rb +8 -3
  42. data/lib/ziya/charts/base.rb +210 -153
  43. data/lib/ziya/charts/bubble.rb +18 -0
  44. data/lib/ziya/charts/candle_stick.rb +6 -1
  45. data/lib/ziya/charts/column.rb +7 -2
  46. data/lib/ziya/charts/column_threed.rb +6 -1
  47. data/lib/ziya/charts/floating_bar.rb +6 -1
  48. data/lib/ziya/charts/floating_column.rb +7 -2
  49. data/lib/ziya/charts/line.rb +7 -2
  50. data/lib/ziya/charts/mixed.rb +5 -0
  51. data/lib/ziya/charts/parallel_threed_column.rb +6 -1
  52. data/lib/ziya/charts/pie.rb +7 -2
  53. data/lib/ziya/charts/pie_threed.rb +7 -2
  54. data/lib/ziya/charts/polar.rb +6 -1
  55. data/lib/ziya/charts/scatter.rb +6 -1
  56. data/lib/ziya/charts/stacked_area.rb +5 -0
  57. data/lib/ziya/charts/stacked_bar.rb +5 -0
  58. data/lib/ziya/charts/stacked_column.rb +7 -2
  59. data/lib/ziya/charts/stacked_threed_area.rb +16 -0
  60. data/lib/ziya/charts/stacked_threed_column.rb +6 -1
  61. data/lib/ziya/components/area.rb +5 -2
  62. data/lib/ziya/components/axis_category.rb +8 -60
  63. data/lib/ziya/components/axis_ticks.rb +25 -27
  64. data/lib/ziya/components/axis_value.rb +5 -48
  65. data/lib/ziya/components/base.rb +59 -17
  66. data/lib/ziya/components/bevel.rb +15 -0
  67. data/lib/ziya/components/blur.rb +13 -0
  68. data/lib/ziya/components/chart_border.rb +4 -23
  69. data/lib/ziya/components/chart_grid_h.rb +17 -19
  70. data/lib/ziya/components/chart_grid_v.rb +18 -19
  71. data/lib/ziya/components/chart_guide.rb +16 -0
  72. data/lib/ziya/components/chart_label.rb +16 -0
  73. data/lib/ziya/components/chart_pref.rb +12 -12
  74. data/lib/ziya/components/chart_rect.rb +27 -26
  75. data/lib/ziya/components/chart_transition.rb +15 -16
  76. data/lib/ziya/components/circle.rb +5 -2
  77. data/lib/ziya/components/draw.rb +12 -11
  78. data/lib/ziya/components/draw_base.rb +10 -0
  79. data/lib/ziya/components/filter.rb +26 -0
  80. data/lib/ziya/components/glow.rb +14 -0
  81. data/lib/ziya/components/image.rb +5 -1
  82. data/lib/ziya/components/legend.rb +18 -0
  83. data/lib/ziya/components/line.rb +6 -2
  84. data/lib/ziya/components/link.rb +9 -9
  85. data/lib/ziya/components/link_data.rb +9 -10
  86. data/lib/ziya/components/rect.rb +7 -2
  87. data/lib/ziya/components/scroll.rb +26 -0
  88. data/lib/ziya/components/shadow.rb +14 -0
  89. data/lib/ziya/components/text.rb +5 -1
  90. data/lib/ziya/components/update.rb +19 -0
  91. data/lib/ziya/gauges/base.rb +172 -0
  92. data/lib/ziya/gauges/radial.rb +18 -0
  93. data/lib/ziya/gauges/signal.rb +138 -0
  94. data/lib/ziya/gauges/support/area.rb +13 -0
  95. data/lib/ziya/gauges/support/base.rb +33 -0
  96. data/lib/ziya/gauges/support/circle.rb +14 -0
  97. data/lib/ziya/gauges/support/design.rb +5 -0
  98. data/lib/ziya/gauges/support/image.rb +12 -0
  99. data/lib/ziya/gauges/support/line.rb +12 -0
  100. data/lib/ziya/gauges/support/link.rb +24 -0
  101. data/lib/ziya/gauges/support/move.rb +15 -0
  102. data/lib/ziya/gauges/support/point.rb +12 -0
  103. data/lib/ziya/gauges/support/polygon.rb +13 -0
  104. data/lib/ziya/gauges/support/radial_base.rb +21 -0
  105. data/lib/ziya/gauges/support/radial_numbers.rb +41 -0
  106. data/lib/ziya/gauges/support/radial_ticks.rb +29 -0
  107. data/lib/ziya/gauges/support/rect.rb +14 -0
  108. data/lib/ziya/gauges/support/rotate.rb +15 -0
  109. data/lib/ziya/gauges/support/scale.rb +15 -0
  110. data/lib/ziya/gauges/support/text.rb +21 -0
  111. data/lib/ziya/gauges/support/update.rb +12 -0
  112. data/lib/ziya/gauges/thermo.rb +121 -0
  113. data/lib/ziya/helpers/base_helper.rb +39 -6
  114. data/lib/ziya/utils/text.rb +6 -0
  115. data/lib/ziya/version.rb +1 -1
  116. data/lib/ziya/ziya_helper.rb +289 -62
  117. data/spec/charts/base_spec.rb +35 -21
  118. data/spec/charts/chart_type_spec.rb +24 -3
  119. data/spec/components/area_spec.rb +9 -2
  120. data/spec/components/draw_spec.rb +1 -2
  121. data/spec/components/filter_spec.rb +27 -0
  122. data/spec/components/link_spec.rb +1 -2
  123. data/spec/components/series_color_spec.rb +1 -2
  124. data/spec/components/series_explode_spec.rb +1 -2
  125. data/spec/components/series_switch_spec.rb +1 -2
  126. data/spec/designs/circle.yml +7 -0
  127. data/spec/designs/crapping_out.yml +8 -0
  128. data/spec/designs/gauge_1.yml +43 -0
  129. data/spec/designs/gauge_2.yml +11 -0
  130. data/spec/designs/gauge_no_name.yml +43 -0
  131. data/spec/designs/gauge_raw.yml +5 -0
  132. data/spec/designs/thermo.yml +13 -0
  133. data/spec/gauges/base_spec.rb +90 -0
  134. data/spec/gauges/signal_spec.rb +36 -0
  135. data/spec/gauges/support/area_spec.rb +40 -0
  136. data/spec/gauges/support/circle_spec.rb +78 -0
  137. data/spec/gauges/support/image_spec.rb +35 -0
  138. data/spec/gauges/support/line_spec.rb +34 -0
  139. data/spec/gauges/support/link_spec.rb +35 -0
  140. data/spec/gauges/support/move_spec.rb +45 -0
  141. data/spec/gauges/support/polygon_spec.rb +36 -0
  142. data/spec/gauges/support/radial_numbers_spec.rb +35 -0
  143. data/spec/gauges/support/radial_ticks_spec.rb +30 -0
  144. data/spec/gauges/support/rotate_spec.rb +45 -0
  145. data/spec/gauges/support/scale_spec.rb +46 -0
  146. data/spec/gauges/support/text_spec.rb +40 -0
  147. data/spec/gauges/thermo_spec.rb +49 -0
  148. data/spec/helpers/base_helper_spec.rb +20 -6
  149. data/spec/spec_helper.rb +4 -1
  150. data/spec/test_helpers/gauge_2_helper.rb +17 -0
  151. data/spec/utils/logger_spec.rb +1 -3
  152. data/spec/utils/text_spec.rb +1 -2
  153. data/spec/ziya_helper_spec.rb +88 -11
  154. data/spec/ziya_spec.rb +1 -1
  155. data/tasks/gem.rake +1 -1
  156. metadata +79 -32
  157. data/charts/themes/commando/bar_chart.yml +0 -9
  158. data/charts/themes/commando/base_chart.yml +0 -65
  159. data/charts/themes/commando/column_chart.yml +0 -13
  160. data/charts/themes/commando/column_threed_chart.yml +0 -25
  161. data/charts/themes/commando/parallel_threed_column_chart.yml +0 -17
  162. data/charts/themes/commando/pie_chart.yml +0 -22
  163. data/charts/themes/commando/pie_threed_chart.yml +0 -28
  164. data/charts/themes/commando/polar_chart.yml +0 -11
  165. data/charts/themes/commando/stacked_bar_chart.yml +0 -9
  166. data/charts/themes/commando/stacked_column_chart.yml +0 -14
  167. data/charts/themes/commando/stacked_threed_column_chart.yml +0 -17
  168. data/charts/themes/default/bar_chart.yml +0 -3
  169. data/charts/themes/default/base_chart.yml +0 -67
  170. data/charts/themes/default/column_chart.yml +0 -13
  171. data/charts/themes/default/column_threed_chart.yml +0 -25
  172. data/charts/themes/default/parallel_threed_column_chart.yml +0 -17
  173. data/charts/themes/default/pie_chart.yml +0 -29
  174. data/charts/themes/default/pie_threed_chart.yml +0 -28
  175. data/charts/themes/default/polar_chart.yml +0 -12
  176. data/charts/themes/default/stacked_bar_chart.yml +0 -3
  177. data/charts/themes/default/stacked_column_chart.yml +0 -14
  178. data/charts/themes/default/stacked_threed_column_chart.yml +0 -17
  179. data/charts/themes/default/test.yml +0 -4
  180. data/lib/ziya/components/chart_value.rb +0 -71
  181. data/lib/ziya/components/legend_label.rb +0 -18
  182. data/lib/ziya/components/legend_rect.rb +0 -19
  183. data/lib/ziya/components/legend_transition.rb +0 -18
  184. data/lib/ziya/components/live_update.rb +0 -21
@@ -1,3 +0,0 @@
1
- <%= chart :stacked_bar %>
2
- <%=component :chart_border %>
3
- left_thickness: 3
@@ -1,14 +0,0 @@
1
- <%= chart :stacked_column %>
2
- <%=component :chart_value %>
3
- position: top
4
-
5
- <%=component :chart_border %>
6
- left_thickness: 1
7
- bottom_thickness: 3
8
-
9
- <%=component :chart_grid_h %>
10
- thickness: 3
11
-
12
- <%=component :chart_grid_v %>
13
- thickness: 1
14
-
@@ -1,17 +0,0 @@
1
- <%= chart :stacked_threed_column %>
2
- <%=comp :chart_value %>
3
- color: 000000
4
- position: over
5
-
6
- <%=comp :axis_category %>
7
- orientation: diagonal_down
8
-
9
- <%=comp :chart_border %>
10
- left_thickness: 1
11
- bottom_thickness: 3
12
-
13
- <%=comp :chart_grid_h %>
14
- thickness: 3
15
-
16
- <%=comp :chart_grid_v %>
17
- thickness: 1
@@ -1,4 +0,0 @@
1
- # Testing override
2
- <%= chart :base %>
3
- <%=component :axis_category %>
4
- size: 50
@@ -1,71 +0,0 @@
1
- # -----------------------------------------------------------------------------
2
- # Sets up chart labels configuration. These are the labels on top on the chart.
3
- #
4
- # Sets the label attributes for the values appearing on top of the chart.
5
- #
6
- # <tt>prefix</tt>: The characters to add before the value numbers (example: $10).
7
- # The default is nothing.
8
- # <tt>suffix</tt>: The characters to add after the value numbers (example: 10%).
9
- # The default is nothing.
10
- # <tt>decimals</tt>: The number of decimal places to the right of the decimal point (example: 10.45).
11
- # The default is zero (no decimals)
12
- # <tt>decimal_char</tt>: The character to use at the left of a decimal fraction (example: 1.5).
13
- # The default is '.' (dot or full stop).
14
- # <tt>separator</tt>: The character to place between every group of thousands (example: 1,00,000).
15
- # The default is nothing.
16
- # <tt>position</tt>: The position where to place the values. Each chart type has a different set of valid values.
17
- # - Line chart: center, above, below, left, right, cursor, hide
18
- # - Column chart: top, bottom, middle, outside, cursor, hide
19
- # - Stacked Column chart: top, bottom, middle, cursor, hide
20
- # - Floating Column chart: inside, outside, cursor, hide
21
- # - Stacked 3D Column chart: middle, cursor, hide
22
- # - Floating 3D Column chart: over, middle, cursor, hide
23
- # - Pie charts: inside, outside, cursor, hide
24
- # - 3D Pie charts: inside, outside, cursor, hide
25
- # - Bar chart: left, center, right, outside, cursor, hide
26
- # - Stacked Bar chart: left, center, right, cursor, hide
27
- # - Floating Bar chart: inside, outside, cursor, hide
28
- # - Area chart: center, above, below, left, right, cursor, hide
29
- # - Stacked Area chart: center, above, below, left, right, cursor, hide
30
- # - Candlestick chart: cursor, hide
31
- # - Scatter chart: center, above, below, left, right, cursor, hide
32
- # - Polar chart: center, above, below, left, right, cursor, hide
33
- # - Mixed chart: If one position key belonging to the above chart types isn't
34
- # sufficient to show all the labels on a mixed chart, add more
35
- # keys separated by underscores. For example, a column and line
36
- # mixed chart can have the position key "top_above".
37
- # <tt>hide_zero</tt>: This determines whether to hide value labels equal to zero.
38
- # The default is false (shows zero labels).
39
- # <tt>as_percentage</tt>: This is relevant in pie chart only. It determines whether to display the values as
40
- # raw data, or as percentages of the whole pie.
41
- # The default is false.
42
- # <tt>font</tt>: The font used for the value labels.
43
- # The default is Arial.
44
- # <tt>bold</tt>: A boolean value that indicates whether the font is bold or not.
45
- # The default is true.
46
- # <tt>size</tt>: The font's size.
47
- # The default font size is calculated based on the canvas size.
48
- # <tt>color</tt>: The font's color. This must be a string holding triple hexadecimal values representing
49
- # the red, green, and blue components for a color.
50
- # The default is "000000" (black).
51
- # <tt>background_color</tt>: This applies only when the above 'position' parameter is set to 'cursor'. It determines
52
- # the labels' background color. When omitted, value labels have no background. This must be
53
- # a string holding triple hexadecimal values representing the red, green, and blue
54
- # components for a color.
55
- # The default is omitted (no background).
56
- # <tt>alpha</tt>: This affects the labels' transparency, only when the embedded font is used. Valid values
57
- # are 0 (fully transparent) to 100 (fully opaque).
58
- # The default is 100.
59
- #
60
- # See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=chart_value
61
- # for additional documentation, examples and futher detail.
62
- # Author:: Fernand Galiana
63
- # Date:: Dec 15th, 2006
64
- # -----------------------------------------------------------------------------
65
- module Ziya::Components
66
- class ChartValue < Base
67
- has_attribute :prefix, :suffix, :decimals, :decimal_char, :separator, :position,
68
- :hide_zero, :as_percentage, :font, :bold, :size, :color,
69
- :background_color, :alpha
70
- end
71
- end
@@ -1,18 +0,0 @@
1
- # -----------------------------------------------------------------------------
2
- # Sets up chart legend configuration
3
- #
4
- # Sets the legend's label attributes.
5
- #
6
- # <tt></tt>:
7
- #
8
- # See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=legend_label
9
- # for additional documentation, examples and futher detail.
10
- #
11
- # Author:: Fernand Galiana
12
- # Date:: Dec 15th, 2006
13
- # -----------------------------------------------------------------------------
14
- module Ziya::Components
15
- class LegendLabel < Base
16
- has_attribute :layout, :bullet, :font, :bold, :size, :color, :alpha
17
- end
18
- end
@@ -1,19 +0,0 @@
1
- # -----------------------------------------------------------------------------
2
- # Sets up chart legend location
3
- #
4
- # Sets the legend area and margin.
5
- #
6
- # <tt></tt>:
7
- #
8
- # See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=legend_rect
9
- # for additional documentation, examples and futher detail.
10
- #
11
- # Author:: Fernand Galiana
12
- # Date:: Dec 15th, 2006
13
- # -----------------------------------------------------------------------------
14
- module Ziya::Components
15
- class LegendRect < Base
16
- has_attribute :x, :y, :width, :height, :margin, :fill_color, :fill_alpha,
17
- :line_color, :line_alpha, :line_thickness
18
- end
19
- end
@@ -1,18 +0,0 @@
1
- # -----------------------------------------------------------------------------
2
- # Sets up transition on the chart legends when chart first displays
3
- #
4
- # Sets the transition attributes for the legend.
5
- #
6
- # <tt></tt>:
7
- #
8
- # See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=legend_transition
9
- # for additional documentation, examples and futher detail.
10
- #
11
- # Author:: Fernand Galiana
12
- # Date:: Dec 15th, 2006
13
- # -----------------------------------------------------------------------------
14
- module Ziya::Components
15
- class LegendTransition < Base
16
- has_attribute :type, :delay, :duration
17
- end
18
- end
@@ -1,21 +0,0 @@
1
- # -----------------------------------------------------------------------------
2
- # Sets up handler for refresh the chart content. The refresh xml can only refresh
3
- # parts of the chart that have changed.
4
- #
5
- # Updates the chart at intervals, without reloading the web page. This makes it possible
6
- # to display charts with live data, change the chart's look over time for emphasis, or
7
- # create a slideshow from different charts.
8
- #
9
- # <tt></tt>:
10
- #
11
- # See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=live_update
12
- # for additional documentation, examples and futher detail.
13
- #
14
- # Author:: Fernand Galiana
15
- # Date:: Dec 15th, 2006
16
- # -----------------------------------------------------------------------------
17
- module Ziya::Components
18
- class LiveUpdate < Base
19
- has_attribute :url, :delay
20
- end
21
- end