ziya 2.0.7 → 2.1.6
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 +561 -89
- data/README.txt +203 -108
- data/Rakefile +7 -6
- data/bin/ziyafy +38 -14
- data/docs/History.txt.html +50 -0
- data/docs/README.txt.html +403 -0
- data/docs/String.html +832 -0
- data/docs/Ziya.html +636 -0
- data/docs/Ziya/Charts.html +909 -0
- data/docs/Ziya/Charts/Area.html +672 -0
- data/docs/Ziya/Charts/AreaThreed.html +672 -0
- data/docs/Ziya/Charts/Bar.html +672 -0
- data/docs/Ziya/Charts/Base.html +1101 -0
- data/docs/Ziya/Charts/Bubble.html +672 -0
- data/docs/Ziya/Charts/CandleStick.html +672 -0
- data/docs/Ziya/Charts/Column.html +672 -0
- data/docs/Ziya/Charts/ColumnThreed.html +672 -0
- data/docs/Ziya/Charts/Custom.html +672 -0
- data/docs/Ziya/Charts/Donut.html +672 -0
- data/docs/Ziya/Charts/FloatingBar.html +672 -0
- data/docs/Ziya/Charts/FloatingColumn.html +672 -0
- data/docs/Ziya/Charts/ImageColumn.html +672 -0
- data/docs/Ziya/Charts/ImagePie.html +672 -0
- data/docs/Ziya/Charts/Line.html +672 -0
- data/docs/Ziya/Charts/Mixed.html +672 -0
- data/docs/Ziya/Charts/ParallelThreedColumn.html +672 -0
- data/docs/Ziya/Charts/Pie.html +672 -0
- data/docs/Ziya/Charts/PieThreed.html +672 -0
- data/docs/Ziya/Charts/Polar.html +672 -0
- data/docs/Ziya/Charts/Scatter.html +672 -0
- data/docs/Ziya/Charts/StackedArea.html +672 -0
- data/docs/Ziya/Charts/StackedBar.html +672 -0
- data/docs/Ziya/Charts/StackedColumn.html +672 -0
- data/docs/Ziya/Charts/StackedThreedArea.html +672 -0
- data/docs/Ziya/Charts/StackedThreedColumn.html +672 -0
- data/docs/Ziya/Charts/Support.html +1245 -0
- data/docs/Ziya/Charts/Support/Area.html +582 -0
- data/docs/Ziya/Charts/Support/AxisCategory.html +583 -0
- data/docs/Ziya/Charts/Support/AxisTicks.html +644 -0
- data/docs/Ziya/Charts/Support/AxisValue.html +583 -0
- data/docs/Ziya/Charts/Support/Base.html +577 -0
- data/docs/Ziya/Charts/Support/Bevel.html +583 -0
- data/docs/Ziya/Charts/Support/Blur.html +583 -0
- data/docs/Ziya/Charts/Support/Button.html +583 -0
- data/docs/Ziya/Charts/Support/ChartBorder.html +582 -0
- data/docs/Ziya/Charts/Support/ChartGridH.html +616 -0
- data/docs/Ziya/Charts/Support/ChartGridV.html +616 -0
- data/docs/Ziya/Charts/Support/ChartGuide.html +582 -0
- data/docs/Ziya/Charts/Support/ChartLabel.html +583 -0
- data/docs/Ziya/Charts/Support/ChartNote.html +582 -0
- data/docs/Ziya/Charts/Support/ChartPref.html +589 -0
- data/docs/Ziya/Charts/Support/ChartRect.html +632 -0
- data/docs/Ziya/Charts/Support/ChartTransition.html +613 -0
- data/docs/Ziya/Charts/Support/Circle.html +583 -0
- data/docs/Ziya/Charts/Support/ContextMenu.html +583 -0
- data/docs/Ziya/Charts/Support/Draw.html +886 -0
- data/docs/Ziya/Charts/Support/DrawBase.html +577 -0
- data/docs/Ziya/Charts/Support/Filter.html +668 -0
- data/docs/Ziya/Charts/Support/FlashToJavascript.html +596 -0
- data/docs/Ziya/Charts/Support/Glow.html +583 -0
- data/docs/Ziya/Charts/Support/Image.html +583 -0
- data/docs/Ziya/Charts/Support/Legend.html +582 -0
- data/docs/Ziya/Charts/Support/Line.html +583 -0
- data/docs/Ziya/Charts/Support/Link.html +734 -0
- data/docs/Ziya/Charts/Support/LinkData.html +589 -0
- data/docs/Ziya/Charts/Support/Rect.html +583 -0
- data/docs/Ziya/Charts/Support/Scroll.html +583 -0
- data/docs/Ziya/Charts/Support/Series.html +583 -0
- data/docs/Ziya/Charts/Support/SeriesColor.html +676 -0
- data/docs/Ziya/Charts/Support/SeriesExplode.html +676 -0
- data/docs/Ziya/Charts/Support/Shadow.html +583 -0
- data/docs/Ziya/Charts/Support/Text.html +664 -0
- data/docs/Ziya/Charts/Support/Tooltip.html +583 -0
- data/docs/Ziya/Charts/Support/Update.html +590 -0
- data/docs/Ziya/Gauges.html +644 -0
- data/docs/Ziya/Gauges/Base.html +1052 -0
- data/docs/Ziya/Gauges/Radial.html +654 -0
- data/docs/Ziya/Gauges/Signal.html +794 -0
- data/docs/Ziya/Gauges/Support.html +726 -0
- data/docs/Ziya/Gauges/Support/Area.html +577 -0
- data/docs/Ziya/Gauges/Support/Base.html +690 -0
- data/docs/Ziya/Gauges/Support/Circle.html +577 -0
- data/docs/Ziya/Gauges/Support/Design.html +577 -0
- data/docs/Ziya/Gauges/Support/Image.html +577 -0
- data/docs/Ziya/Gauges/Support/Line.html +577 -0
- data/docs/Ziya/Gauges/Support/Link.html +577 -0
- data/docs/Ziya/Gauges/Support/Move.html +577 -0
- data/docs/Ziya/Gauges/Support/Point.html +577 -0
- data/docs/Ziya/Gauges/Support/Polygon.html +577 -0
- data/docs/Ziya/Gauges/Support/RadialBase.html +654 -0
- data/docs/Ziya/Gauges/Support/RadialNumbers.html +694 -0
- data/docs/Ziya/Gauges/Support/RadialTicks.html +676 -0
- data/docs/Ziya/Gauges/Support/Rect.html +577 -0
- data/docs/Ziya/Gauges/Support/Rotate.html +577 -0
- data/docs/Ziya/Gauges/Support/Scale.html +577 -0
- data/docs/Ziya/Gauges/Support/Text.html +656 -0
- data/docs/Ziya/Gauges/Support/Update.html +577 -0
- data/docs/Ziya/Gauges/Thermo.html +826 -0
- data/docs/Ziya/HtmlHelpers.html +597 -0
- data/docs/Ziya/HtmlHelpers/Charts.html +1399 -0
- data/docs/Ziya/HtmlHelpers/Gauges.html +987 -0
- data/docs/Ziya/HtmlHelpers/Maps.html +950 -0
- data/docs/Ziya/Maps.html +713 -0
- data/docs/Ziya/Maps/Australia.html +648 -0
- data/docs/Ziya/Maps/Base.html +1099 -0
- data/docs/Ziya/Maps/Belgium.html +648 -0
- data/docs/Ziya/Maps/Brazil.html +648 -0
- data/docs/Ziya/Maps/Canada.html +648 -0
- data/docs/Ziya/Maps/Europe.html +648 -0
- data/docs/Ziya/Maps/France.html +648 -0
- data/docs/Ziya/Maps/Geocode.html +752 -0
- data/docs/Ziya/Maps/Germany.html +648 -0
- data/docs/Ziya/Maps/Italy.html +648 -0
- data/docs/Ziya/Maps/Mexico.html +648 -0
- data/docs/Ziya/Maps/Support.html +798 -0
- data/docs/Ziya/Maps/Support/Arc.html +577 -0
- data/docs/Ziya/Maps/Support/ArcColor.html +577 -0
- data/docs/Ziya/Maps/Support/ArcRange.html +577 -0
- data/docs/Ziya/Maps/Support/BackgroundColor.html +577 -0
- data/docs/Ziya/Maps/Support/Base.html +792 -0
- data/docs/Ziya/Maps/Support/DefaultColor.html +577 -0
- data/docs/Ziya/Maps/Support/DefaultPoint.html +577 -0
- data/docs/Ziya/Maps/Support/FirstZoom.html +577 -0
- data/docs/Ziya/Maps/Support/HeatRange.html +658 -0
- data/docs/Ziya/Maps/Support/Hover.html +577 -0
- data/docs/Ziya/Maps/Support/Line.html +577 -0
- data/docs/Ziya/Maps/Support/LineColor.html +577 -0
- data/docs/Ziya/Maps/Support/LineRange.html +577 -0
- data/docs/Ziya/Maps/Support/OutlineColor.html +577 -0
- data/docs/Ziya/Maps/Support/Point.html +577 -0
- data/docs/Ziya/Maps/Support/PointRange.html +577 -0
- data/docs/Ziya/Maps/Support/Range.html +753 -0
- data/docs/Ziya/Maps/Support/Ranges.html +658 -0
- data/docs/Ziya/Maps/Support/Region.html +577 -0
- data/docs/Ziya/Maps/Support/ScalePoints.html +577 -0
- data/docs/Ziya/Maps/Support/ShowName.html +577 -0
- data/docs/Ziya/Maps/Support/State.html +577 -0
- data/docs/Ziya/Maps/Support/StateInfoIcon.html +577 -0
- data/docs/Ziya/Maps/Support/ZoomMode.html +577 -0
- data/docs/Ziya/Maps/Support/ZoomOutButton.html +577 -0
- data/docs/Ziya/Maps/Support/ZoomOutScale.html +577 -0
- data/docs/Ziya/Maps/Sweden.html +648 -0
- data/docs/Ziya/Maps/Uk.html +648 -0
- data/docs/Ziya/Maps/Us.html +648 -0
- data/docs/Ziya/Maps/World.html +648 -0
- data/docs/Ziya/YamlHelpers.html +592 -0
- data/docs/Ziya/YamlHelpers/Gauges.html +848 -0
- data/docs/Ziya/YamlHelpers/Maps.html +750 -0
- data/docs/Ziya/Ziyafy.html +735 -0
- data/docs/bin/ziyafy.html +52 -0
- data/docs/created.rid +1 -0
- data/docs/examples/charts/public/charts/themes/readme.txt.html +61 -0
- data/docs/examples/maps/public/maps/themes/readme.txt.html +61 -0
- data/docs/images/brick.png +0 -0
- data/docs/images/brick_link.png +0 -0
- data/docs/images/bullet_black.png +0 -0
- data/docs/images/date.png +0 -0
- data/docs/images/macFFBgHack.png +0 -0
- data/docs/images/package.png +0 -0
- data/docs/images/page_green.png +0 -0
- data/docs/images/page_white_width.png +0 -0
- data/docs/images/plugin.png +0 -0
- data/docs/images/ruby.png +0 -0
- data/docs/images/tag_green.png +0 -0
- data/docs/images/wrench.png +0 -0
- data/docs/images/wrench_orange.png +0 -0
- data/docs/images/zoom.png +0 -0
- data/docs/index.html +978 -0
- data/docs/js/darkfish.js +91 -0
- data/docs/js/jquery.js +32 -0
- data/docs/js/quicksearch.js +135 -0
- data/docs/js/thickbox-compressed.js +10 -0
- data/docs/lib/ziya.rb.html +43 -0
- data/docs/lib/ziya/charts/area.rb.html +54 -0
- data/docs/lib/ziya/charts/area_threed.rb.html +153 -0
- data/docs/lib/ziya/charts/bar.rb.html +45 -0
- data/docs/lib/ziya/charts/base.rb.html +71 -0
- data/docs/lib/ziya/charts/bubble.rb.html +54 -0
- data/docs/lib/ziya/charts/candle_stick.rb.html +45 -0
- data/docs/lib/ziya/charts/column.rb.html +45 -0
- data/docs/lib/ziya/charts/column_threed.rb.html +45 -0
- data/docs/lib/ziya/charts/custom.rb.html +54 -0
- data/docs/lib/ziya/charts/donut.rb.html +54 -0
- data/docs/lib/ziya/charts/floating_bar.rb.html +45 -0
- data/docs/lib/ziya/charts/floating_column.rb.html +45 -0
- data/docs/lib/ziya/charts/image_column.rb.html +54 -0
- data/docs/lib/ziya/charts/image_pie.rb.html +54 -0
- data/docs/lib/ziya/charts/line.rb.html +45 -0
- data/docs/lib/ziya/charts/mixed.rb.html +45 -0
- data/docs/lib/ziya/charts/parallel_threed_column.rb.html +45 -0
- data/docs/lib/ziya/charts/pie.rb.html +45 -0
- data/docs/lib/ziya/charts/pie_threed.rb.html +45 -0
- data/docs/lib/ziya/charts/polar.rb.html +45 -0
- data/docs/lib/ziya/charts/scatter.rb.html +45 -0
- data/docs/lib/ziya/charts/stacked_area.rb.html +45 -0
- data/docs/lib/ziya/charts/stacked_bar.rb.html +45 -0
- data/docs/lib/ziya/charts/stacked_column.rb.html +45 -0
- data/docs/lib/ziya/charts/stacked_threed_area.rb.html +45 -0
- data/docs/lib/ziya/charts/stacked_threed_column.rb.html +45 -0
- data/docs/lib/ziya/charts/support/area.rb.html +56 -0
- data/docs/lib/ziya/charts/support/axis_category.rb.html +407 -0
- data/docs/lib/ziya/charts/support/axis_ticks.rb.html +48 -0
- data/docs/lib/ziya/charts/support/axis_value.rb.html +48 -0
- data/docs/lib/ziya/charts/support/base.rb.html +64 -0
- data/docs/lib/ziya/charts/support/bevel.rb.html +48 -0
- data/docs/lib/ziya/charts/support/blur.rb.html +48 -0
- data/docs/lib/ziya/charts/support/button.rb.html +48 -0
- data/docs/lib/ziya/charts/support/chart_border.rb.html +48 -0
- data/docs/lib/ziya/charts/support/chart_grid_h.rb.html +48 -0
- data/docs/lib/ziya/charts/support/chart_grid_v.rb.html +48 -0
- data/docs/lib/ziya/charts/support/chart_guide.rb.html +48 -0
- data/docs/lib/ziya/charts/support/chart_label.rb.html +49 -0
- data/docs/lib/ziya/charts/support/chart_note.rb.html +53 -0
- data/docs/lib/ziya/charts/support/chart_pref.rb.html +48 -0
- data/docs/lib/ziya/charts/support/chart_rect.rb.html +48 -0
- data/docs/lib/ziya/charts/support/chart_transition.rb.html +48 -0
- data/docs/lib/ziya/charts/support/circle.rb.html +48 -0
- data/docs/lib/ziya/charts/support/context_menu.rb.html +47 -0
- data/docs/lib/ziya/charts/support/draw.rb.html +57 -0
- data/docs/lib/ziya/charts/support/draw_base.rb.html +48 -0
- data/docs/lib/ziya/charts/support/filter.rb.html +52 -0
- data/docs/lib/ziya/charts/support/flash_to_javascript.rb.html +48 -0
- data/docs/lib/ziya/charts/support/glow.rb.html +48 -0
- data/docs/lib/ziya/charts/support/image.rb.html +52 -0
- data/docs/lib/ziya/charts/support/legend.rb.html +48 -0
- data/docs/lib/ziya/charts/support/line.rb.html +48 -0
- data/docs/lib/ziya/charts/support/link.rb.html +48 -0
- data/docs/lib/ziya/charts/support/link_data.rb.html +48 -0
- data/docs/lib/ziya/charts/support/rect.rb.html +48 -0
- data/docs/lib/ziya/charts/support/scroll.rb.html +50 -0
- data/docs/lib/ziya/charts/support/series.rb.html +47 -0
- data/docs/lib/ziya/charts/support/series_color.rb.html +62 -0
- data/docs/lib/ziya/charts/support/series_explode.rb.html +65 -0
- data/docs/lib/ziya/charts/support/shadow.rb.html +48 -0
- data/docs/lib/ziya/charts/support/text.rb.html +51 -0
- data/docs/lib/ziya/charts/support/tooltip.rb.html +53 -0
- data/docs/lib/ziya/charts/support/update.rb.html +49 -0
- data/docs/lib/ziya/core_ext/string.rb.html +50 -0
- data/docs/lib/ziya/gauges/base.rb.html +54 -0
- data/docs/lib/ziya/gauges/radial.rb.html +64 -0
- data/docs/lib/ziya/gauges/signal.rb.html +49 -0
- data/docs/lib/ziya/gauges/support/area.rb.html +57 -0
- data/docs/lib/ziya/gauges/support/base.rb.html +39 -0
- data/docs/lib/ziya/gauges/support/circle.rb.html +57 -0
- data/docs/lib/ziya/gauges/support/design.rb.html +39 -0
- data/docs/lib/ziya/gauges/support/image.rb.html +57 -0
- data/docs/lib/ziya/gauges/support/line.rb.html +57 -0
- data/docs/lib/ziya/gauges/support/link.rb.html +57 -0
- data/docs/lib/ziya/gauges/support/move.rb.html +57 -0
- data/docs/lib/ziya/gauges/support/point.rb.html +57 -0
- data/docs/lib/ziya/gauges/support/polygon.rb.html +57 -0
- data/docs/lib/ziya/gauges/support/radial_base.rb.html +58 -0
- data/docs/lib/ziya/gauges/support/radial_numbers.rb.html +60 -0
- data/docs/lib/ziya/gauges/support/radial_ticks.rb.html +57 -0
- data/docs/lib/ziya/gauges/support/rect.rb.html +57 -0
- data/docs/lib/ziya/gauges/support/rotate.rb.html +57 -0
- data/docs/lib/ziya/gauges/support/scale.rb.html +57 -0
- data/docs/lib/ziya/gauges/support/text.rb.html +57 -0
- data/docs/lib/ziya/gauges/support/update.rb.html +57 -0
- data/docs/lib/ziya/gauges/thermo.rb.html +48 -0
- data/docs/lib/ziya/html_helpers.rb.html +39 -0
- data/docs/lib/ziya/html_helpers/base.rb.html +48 -0
- data/docs/lib/ziya/html_helpers/charts.rb.html +48 -0
- data/docs/lib/ziya/html_helpers/gauges.rb.html +48 -0
- data/docs/lib/ziya/html_helpers/maps.rb.html +39 -0
- data/docs/lib/ziya/maps/australia.rb.html +48 -0
- data/docs/lib/ziya/maps/base.rb.html +62 -0
- data/docs/lib/ziya/maps/belgium.rb.html +39 -0
- data/docs/lib/ziya/maps/brazil.rb.html +39 -0
- data/docs/lib/ziya/maps/canada.rb.html +39 -0
- data/docs/lib/ziya/maps/europe.rb.html +39 -0
- data/docs/lib/ziya/maps/france.rb.html +39 -0
- data/docs/lib/ziya/maps/geocode.rb.html +45 -0
- data/docs/lib/ziya/maps/germany.rb.html +39 -0
- data/docs/lib/ziya/maps/italy.rb.html +39 -0
- data/docs/lib/ziya/maps/mexico.rb.html +39 -0
- data/docs/lib/ziya/maps/support/arc.rb.html +48 -0
- data/docs/lib/ziya/maps/support/arc_color.rb.html +48 -0
- data/docs/lib/ziya/maps/support/arc_range.rb.html +48 -0
- data/docs/lib/ziya/maps/support/background_color.rb.html +48 -0
- data/docs/lib/ziya/maps/support/base.rb.html +48 -0
- data/docs/lib/ziya/maps/support/default_color.rb.html +48 -0
- data/docs/lib/ziya/maps/support/default_point.rb.html +48 -0
- data/docs/lib/ziya/maps/support/first_zoom.rb.html +48 -0
- data/docs/lib/ziya/maps/support/heat_range.rb.html +50 -0
- data/docs/lib/ziya/maps/support/hover.rb.html +48 -0
- data/docs/lib/ziya/maps/support/line.rb.html +48 -0
- data/docs/lib/ziya/maps/support/line_color.rb.html +48 -0
- data/docs/lib/ziya/maps/support/line_range.rb.html +48 -0
- data/docs/lib/ziya/maps/support/outline_color.rb.html +48 -0
- data/docs/lib/ziya/maps/support/point.rb.html +48 -0
- data/docs/lib/ziya/maps/support/point_range.rb.html +48 -0
- data/docs/lib/ziya/maps/support/range.rb.html +48 -0
- data/docs/lib/ziya/maps/support/ranges.rb.html +47 -0
- data/docs/lib/ziya/maps/support/region.rb.html +48 -0
- data/docs/lib/ziya/maps/support/scale_points.rb.html +48 -0
- data/docs/lib/ziya/maps/support/show_name.rb.html +48 -0
- data/docs/lib/ziya/maps/support/state.rb.html +48 -0
- data/docs/lib/ziya/maps/support/state_info_icon.rb.html +48 -0
- data/docs/lib/ziya/maps/support/zoom_mode.rb.html +48 -0
- data/docs/lib/ziya/maps/support/zoom_out_button.rb.html +48 -0
- data/docs/lib/ziya/maps/support/zoom_out_scale.rb.html +48 -0
- data/docs/lib/ziya/maps/sweden.rb.html +39 -0
- data/docs/lib/ziya/maps/uk.rb.html +39 -0
- data/docs/lib/ziya/maps/us.rb.html +39 -0
- data/docs/lib/ziya/maps/world.rb.html +39 -0
- data/docs/lib/ziya/utils/logger.rb.html +53 -0
- data/docs/lib/ziya/version.rb.html +39 -0
- data/docs/lib/ziya/yaml_helpers.rb.html +39 -0
- data/docs/lib/ziya/yaml_helpers/base.rb.html +48 -0
- data/docs/lib/ziya/yaml_helpers/charts.rb.html +50 -0
- data/docs/lib/ziya/yaml_helpers/gauges.rb.html +39 -0
- data/docs/lib/ziya/yaml_helpers/maps.rb.html +39 -0
- data/docs/rdoc.css +664 -0
- data/docs/release_notes.txt.html +51 -0
- data/docs/resources/charts/themes/readme.txt.html +61 -0
- data/docs/resources/maps/themes/readme.txt.html +61 -0
- data/examples/charts/basic_chart.rb +55 -0
- data/{charts → examples/charts/public/charts}/AC_RunActiveContent.js +0 -0
- data/examples/charts/public/charts/charts.swf +0 -0
- data/examples/charts/public/charts/charts_library/ar3d.swf +0 -0
- data/examples/charts/public/charts/charts_library/arno.swf +0 -0
- data/examples/charts/public/charts/charts_library/ars3.swf +0 -0
- data/examples/charts/public/charts/charts_library/arst.swf +0 -0
- data/examples/charts/public/charts/charts_library/brfl.swf +0 -0
- data/examples/charts/public/charts/charts_library/brno.swf +0 -0
- data/examples/charts/public/charts/charts_library/brst.swf +0 -0
- data/examples/charts/public/charts/charts_library/buno.swf +0 -0
- data/examples/charts/public/charts/charts_library/cl3d.swf +0 -0
- data/examples/charts/public/charts/charts_library/clfl.swf +0 -0
- data/examples/charts/public/charts/charts_library/clim.swf +0 -0
- data/examples/charts/public/charts/charts_library/clno.swf +0 -0
- data/examples/charts/public/charts/charts_library/clp3.swf +0 -0
- data/examples/charts/public/charts/charts_library/cls3.swf +0 -0
- data/examples/charts/public/charts/charts_library/clst.swf +0 -0
- data/examples/charts/public/charts/charts_library/cnno.swf +0 -0
- data/{charts → examples/charts/public/charts}/charts_library/dollar.jpg +0 -0
- data/examples/charts/public/charts/charts_library/dono.swf +0 -0
- data/examples/charts/public/charts/charts_library/lnno.swf +0 -0
- data/examples/charts/public/charts/charts_library/mxno.swf +0 -0
- data/examples/charts/public/charts/charts_library/pi3d.swf +0 -0
- data/{charts → examples/charts/public/charts}/charts_library/pie.jpg +0 -0
- data/examples/charts/public/charts/charts_library/piim.swf +0 -0
- data/examples/charts/public/charts/charts_library/pino.swf +0 -0
- data/examples/charts/public/charts/charts_library/pono.swf +0 -0
- data/examples/charts/public/charts/charts_library/scno.swf +0 -0
- data/examples/charts/public/charts/full_screen.fla +0 -0
- data/{charts → examples/charts/public/charts}/full_screen.swf +0 -0
- data/{charts → examples/charts/public/charts}/scripts/output_jpg.php +0 -0
- data/{charts → examples/charts/public/charts}/sliders/black.swf +0 -0
- data/{charts → examples/charts/public/charts}/sliders/preview_handle_1.swf +0 -0
- data/{charts → examples/charts/public/charts}/sliders/preview_handle_2.swf +0 -0
- data/examples/charts/public/charts/themes/cool_theme/column_chart.yml +150 -0
- data/examples/charts/public/charts/themes/cool_theme/line_chart.yml +5 -0
- data/examples/charts/public/charts/themes/readme.txt +13 -0
- data/examples/charts/public/fred.xml +21 -0
- data/examples/charts/views/index.erb +17 -0
- data/examples/maps/basic_map.rb +63 -0
- data/examples/maps/helpers/map_helper.rb +15 -0
- data/examples/maps/models/confidential_herpes_report.rb +78 -0
- data/examples/maps/public/javascripts/jquery-1.3.2.js +4376 -0
- data/examples/maps/public/map.xml +336 -0
- data/examples/maps/public/maps/js/Exception.js +45 -0
- data/examples/maps/public/maps/js/FlashProxy.js +72 -0
- data/examples/maps/public/maps/js/FlashSerializer.js +165 -0
- data/examples/maps/public/maps/js/FlashTag.js +111 -0
- data/examples/maps/public/maps/js/JavaScriptFlashGateway.js +455 -0
- data/examples/maps/public/maps/js/JavaScriptFlashGateway.swf +0 -0
- data/examples/maps/public/maps/map_library/australia.swf +0 -0
- data/examples/maps/public/maps/map_library/belgium.swf +0 -0
- data/examples/maps/public/maps/map_library/brazil.swf +0 -0
- data/examples/maps/public/maps/map_library/canada.swf +0 -0
- data/examples/maps/public/maps/map_library/europe.swf +0 -0
- data/examples/maps/public/maps/map_library/france.swf +0 -0
- data/examples/maps/public/maps/map_library/germany.swf +0 -0
- data/examples/maps/public/maps/map_library/italy.swf +0 -0
- data/examples/maps/public/maps/map_library/mexico.swf +0 -0
- data/examples/maps/public/maps/map_library/sweden.swf +0 -0
- data/examples/maps/public/maps/map_library/uk_ireland.swf +0 -0
- data/examples/maps/public/maps/map_library/us.swf +0 -0
- data/examples/maps/public/maps/map_library/us_canada.swf +0 -0
- data/examples/maps/public/maps/map_library/world.swf +0 -0
- data/examples/maps/public/maps/themes/default/base_map.yml +27 -0
- data/examples/maps/public/maps/themes/default/us_map.yml +20 -0
- data/examples/maps/public/maps/themes/default/us_map_2.yml +17 -0
- data/examples/maps/public/maps/themes/readme.txt +13 -0
- data/examples/maps/public/stylesheets/map.css +16 -0
- data/examples/maps/views/index.erb +26 -0
- data/examples/maps/views/layout.erb +21 -0
- data/gem_script.rb +5 -0
- data/lib/ziya.rb +20 -11
- data/lib/ziya/charts/base.rb +114 -90
- data/lib/ziya/{components → charts/support}/area.rb +2 -2
- data/lib/ziya/{components → charts/support}/axis_category.rb +1 -1
- data/lib/ziya/{components → charts/support}/axis_ticks.rb +1 -1
- data/lib/ziya/{components → charts/support}/axis_value.rb +1 -1
- data/lib/ziya/{components → charts/support}/base.rb +9 -21
- data/lib/ziya/{components → charts/support}/bevel.rb +1 -1
- data/lib/ziya/{components → charts/support}/blur.rb +1 -1
- data/lib/ziya/{components → charts/support}/button.rb +1 -1
- data/lib/ziya/{components → charts/support}/chart_border.rb +1 -1
- data/lib/ziya/{components → charts/support}/chart_grid_h.rb +1 -1
- data/lib/ziya/{components → charts/support}/chart_grid_v.rb +1 -1
- data/lib/ziya/{components → charts/support}/chart_guide.rb +1 -1
- data/lib/ziya/{components → charts/support}/chart_label.rb +1 -1
- data/lib/ziya/{components → charts/support}/chart_note.rb +1 -1
- data/lib/ziya/{components → charts/support}/chart_pref.rb +3 -2
- data/lib/ziya/{components → charts/support}/chart_rect.rb +1 -1
- data/lib/ziya/{components → charts/support}/chart_transition.rb +1 -1
- data/lib/ziya/{components → charts/support}/circle.rb +1 -1
- data/lib/ziya/{components → charts/support}/context_menu.rb +1 -3
- data/lib/ziya/charts/support/draw.rb +76 -0
- data/lib/ziya/{components → charts/support}/draw_base.rb +1 -1
- data/lib/ziya/{components → charts/support}/filter.rb +1 -1
- data/lib/ziya/charts/support/flash_to_javascript.rb +23 -0
- data/lib/ziya/{components → charts/support}/glow.rb +1 -1
- data/lib/ziya/{components → charts/support}/image.rb +1 -1
- data/lib/ziya/{components → charts/support}/legend.rb +1 -1
- data/lib/ziya/{components → charts/support}/line.rb +1 -1
- data/lib/ziya/{components → charts/support}/link.rb +9 -1
- data/lib/ziya/{components → charts/support}/link_data.rb +1 -1
- data/lib/ziya/{components → charts/support}/rect.rb +1 -1
- data/lib/ziya/{components → charts/support}/scroll.rb +1 -3
- data/lib/ziya/{components → charts/support}/series.rb +1 -3
- data/lib/ziya/{components → charts/support}/series_color.rb +1 -1
- data/lib/ziya/{components → charts/support}/series_explode.rb +1 -1
- data/lib/ziya/{components → charts/support}/shadow.rb +1 -1
- data/lib/ziya/{components → charts/support}/text.rb +9 -1
- data/lib/ziya/{components → charts/support}/tooltip.rb +1 -1
- data/lib/ziya/{components → charts/support}/update.rb +1 -1
- data/lib/ziya/core_ext/string.rb +31 -0
- data/lib/ziya/gauges/base.rb +17 -12
- data/lib/ziya/gauges/support/base.rb +4 -12
- data/lib/ziya/gauges/support/radial_numbers.rb +1 -1
- data/lib/ziya/html_helpers.rb +1 -0
- data/lib/ziya/html_helpers/base.rb +91 -0
- data/lib/ziya/html_helpers/charts.rb +200 -0
- data/lib/ziya/html_helpers/gauges.rb +90 -0
- data/lib/ziya/html_helpers/maps.rb +74 -0
- data/lib/ziya/maps/australia.rb +9 -0
- data/lib/ziya/maps/base.rb +409 -0
- data/lib/ziya/maps/belgium.rb +7 -0
- data/lib/ziya/maps/brazil.rb +7 -0
- data/lib/ziya/maps/canada.rb +7 -0
- data/lib/ziya/maps/europe.rb +7 -0
- data/lib/ziya/maps/france.rb +7 -0
- data/lib/ziya/maps/geocode.rb +18 -0
- data/lib/ziya/maps/germany.rb +7 -0
- data/lib/ziya/maps/italy.rb +7 -0
- data/lib/ziya/maps/mexico.rb +7 -0
- data/lib/ziya/maps/support/arc.rb +7 -0
- data/lib/ziya/maps/support/arc_color.rb +7 -0
- data/lib/ziya/maps/support/arc_range.rb +7 -0
- data/lib/ziya/maps/support/background_color.rb +7 -0
- data/lib/ziya/maps/support/base.rb +34 -0
- data/lib/ziya/maps/support/default_color.rb +7 -0
- data/lib/ziya/maps/support/default_point.rb +7 -0
- data/lib/ziya/maps/support/first_zoom.rb +7 -0
- data/lib/ziya/maps/support/heat_range.rb +35 -0
- data/lib/ziya/maps/support/hover.rb +7 -0
- data/lib/ziya/maps/support/line.rb +7 -0
- data/lib/ziya/maps/support/line_color.rb +7 -0
- data/lib/ziya/maps/support/line_range.rb +7 -0
- data/lib/ziya/maps/support/outline_color.rb +7 -0
- data/lib/ziya/maps/support/point.rb +8 -0
- data/lib/ziya/maps/support/point_range.rb +7 -0
- data/lib/ziya/maps/support/range.rb +31 -0
- data/lib/ziya/maps/support/ranges.rb +18 -0
- data/lib/ziya/maps/support/region.rb +7 -0
- data/lib/ziya/maps/support/scale_points.rb +7 -0
- data/lib/ziya/maps/support/show_name.rb +7 -0
- data/lib/ziya/maps/support/state.rb +7 -0
- data/lib/ziya/maps/support/state_info_icon.rb +7 -0
- data/lib/ziya/maps/support/zoom_mode.rb +7 -0
- data/lib/ziya/maps/support/zoom_out_button.rb +7 -0
- data/lib/ziya/maps/support/zoom_out_scale.rb +7 -0
- data/lib/ziya/maps/sweden.rb +7 -0
- data/lib/ziya/maps/uk.rb +7 -0
- data/lib/ziya/maps/us.rb +7 -0
- data/lib/ziya/maps/world.rb +7 -0
- data/lib/ziya/version.rb +3 -3
- data/lib/ziya/yaml_helpers.rb +1 -0
- data/lib/ziya/yaml_helpers/base.rb +20 -0
- data/lib/ziya/yaml_helpers/charts.rb +49 -0
- data/lib/ziya/yaml_helpers/gauges.rb +33 -0
- data/lib/ziya/yaml_helpers/maps.rb +17 -0
- data/resources/charts/AC_RunActiveContent.js +292 -0
- data/resources/charts/charts.swf +0 -0
- data/resources/charts/charts_library/ar3d.swf +0 -0
- data/resources/charts/charts_library/arno.swf +0 -0
- data/resources/charts/charts_library/ars3.swf +0 -0
- data/resources/charts/charts_library/arst.swf +0 -0
- data/resources/charts/charts_library/brfl.swf +0 -0
- data/resources/charts/charts_library/brno.swf +0 -0
- data/resources/charts/charts_library/brst.swf +0 -0
- data/resources/charts/charts_library/buno.swf +0 -0
- data/resources/charts/charts_library/cl3d.swf +0 -0
- data/resources/charts/charts_library/clfl.swf +0 -0
- data/resources/charts/charts_library/clim.swf +0 -0
- data/resources/charts/charts_library/clno.swf +0 -0
- data/resources/charts/charts_library/clp3.swf +0 -0
- data/resources/charts/charts_library/cls3.swf +0 -0
- data/resources/charts/charts_library/clst.swf +0 -0
- data/resources/charts/charts_library/cnno.swf +0 -0
- data/resources/charts/charts_library/dono.swf +0 -0
- data/resources/charts/charts_library/lnno.swf +0 -0
- data/resources/charts/charts_library/mxno.swf +0 -0
- data/resources/charts/charts_library/pi3d.swf +0 -0
- data/resources/charts/charts_library/piim.swf +0 -0
- data/resources/charts/charts_library/pino.swf +0 -0
- data/resources/charts/charts_library/pono.swf +0 -0
- data/resources/charts/charts_library/scno.swf +0 -0
- data/resources/charts/full_screen.fla +0 -0
- data/resources/charts/full_screen.swf +0 -0
- data/resources/charts/scripts/output_jpg.php +23 -0
- data/resources/charts/sliders/black.swf +0 -0
- data/resources/charts/sliders/preview_handle_1.swf +0 -0
- data/resources/charts/sliders/preview_handle_2.swf +0 -0
- data/resources/charts/themes/readme.txt +13 -0
- data/{gauges → resources/gauges}/designs/circle.yml +0 -0
- data/{gauges → resources/gauges}/designs/signal.yml +0 -0
- data/{gauges → resources/gauges}/designs/thermo.yml +0 -0
- data/{gauges → resources/gauges}/designs/title.yml +0 -0
- data/{gauges → resources/gauges}/gauge.swf +0 -0
- data/resources/maps/js/Exception.js +45 -0
- data/resources/maps/js/FlashProxy.js +72 -0
- data/resources/maps/js/FlashSerializer.js +165 -0
- data/resources/maps/js/FlashTag.js +111 -0
- data/resources/maps/js/JavaScriptFlashGateway.js +455 -0
- data/resources/maps/js/JavaScriptFlashGateway.swf +0 -0
- data/resources/maps/map_library/australia.swf +0 -0
- data/resources/maps/map_library/belgium.swf +0 -0
- data/resources/maps/map_library/brazil.swf +0 -0
- data/resources/maps/map_library/canada.swf +0 -0
- data/resources/maps/map_library/europe.swf +0 -0
- data/resources/maps/map_library/france.swf +0 -0
- data/resources/maps/map_library/germany.swf +0 -0
- data/resources/maps/map_library/italy.swf +0 -0
- data/resources/maps/map_library/mexico.swf +0 -0
- data/resources/maps/map_library/sweden.swf +0 -0
- data/resources/maps/map_library/uk_ireland.swf +0 -0
- data/resources/maps/map_library/us.swf +0 -0
- data/resources/maps/map_library/us_canada.swf +0 -0
- data/resources/maps/map_library/world.swf +0 -0
- data/resources/maps/themes/readme.txt +13 -0
- data/spec/charts/base_spec.rb +7 -6
- data/spec/charts/chart_type_spec.rb +11 -4
- data/spec/{components → charts/support}/area_spec.rb +8 -8
- data/spec/charts/support/chart_pref_spec.rb +36 -0
- data/spec/charts/support/draw_spec.rb +41 -0
- data/spec/{components → charts/support}/filter_spec.rb +6 -6
- data/spec/{components → charts/support}/link_spec.rb +6 -6
- data/spec/{components → charts/support}/series.rb +4 -4
- data/spec/{components → charts/support}/series_color_spec.rb +4 -4
- data/spec/{components → charts/support}/series_explode.rb +4 -4
- data/spec/{components → charts/support}/series_explode_spec.rb +4 -4
- data/spec/core_ext/string_spec.rb +40 -0
- data/spec/gauges/base_spec.rb +1 -1
- data/spec/html_helpers/base_spec.rb +50 -0
- data/spec/html_helpers/charts_spec.rb +23 -0
- data/spec/html_helpers/gauges_spec.rb +16 -0
- data/spec/html_helpers/maps_spec.rb +20 -0
- data/spec/maps/base_spec.rb +82 -0
- data/spec/maps/support/default_color_spec.rb +29 -0
- data/spec/maps/support/heat_range_spec.rb +29 -0
- data/spec/maps/us_spec.rb +12 -0
- data/spec/maps/world_spec.rb +18 -0
- data/spec/spec_helper.rb +5 -4
- data/spec/themes/maps/base_map.yml +81 -0
- data/spec/themes/maps/us_map.yml +6 -0
- data/spec/themes/maps/world_map.yml +6 -0
- data/spec/themes/maps/world_ov_map.yml +6 -0
- data/spec/{helpers/base_helper_spec.rb → yaml_helpers/charts_spec.rb} +10 -13
- data/spec/yaml_helpers/gauges_spec.rb +15 -0
- data/spec/ziya_helper_spec.rb +118 -116
- data/tasks/doc.rake +12 -7
- data/tasks/gem.rake +1 -1
- data/tasks/setup.rb +1 -1
- data/ziya.gemspec +40 -0
- metadata +582 -94
- 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/clim.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/dono.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/piim.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/ziya.js +0 -66
- data/lib/ziya/components/draw.rb +0 -47
- data/lib/ziya/helpers/base_helper.rb +0 -91
- data/lib/ziya/utils/text.rb +0 -39
- data/lib/ziya/ziya_helper.rb +0 -354
- data/spec/components/draw_spec.rb +0 -32
- data/spec/utils/text_spec.rb +0 -33
data/README.txt
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
|
1
|
+
=== ZiYa
|
2
2
|
by Fernand Galiana
|
3
|
-
ziya.rubyforge.org
|
4
3
|
git://github.com/derailed/ziya.git
|
5
4
|
|
6
5
|
== RELEASES
|
@@ -17,164 +16,260 @@ ziya
|
|
17
16
|
- added draw button support
|
18
17
|
- added chart_note to annotate a chart
|
19
18
|
- added tooltip chart support
|
20
|
-
|
19
|
+
2.0.8 - Patches to xml/swf/5.0.7 - scroller handle fixe + Stoppped_Scolling js callback
|
20
|
+
- added support for flash_to_javascript callbacks
|
21
|
+
- added support ids in composite charts
|
22
|
+
- various bug fixes
|
23
|
+
2.1.0 - Refactor some of the underlying ziya code
|
24
|
+
- Beef up test suite
|
25
|
+
- changed component tree
|
26
|
+
- Added geographical maps support
|
27
|
+
- Changed the default ziyafy to install charts only by default
|
28
|
+
Run ziyafy --help for the various options
|
29
|
+
- Changed add( :composites, ... ) call to take in a hash of hash instead of id/url pair.
|
30
|
+
So the correct call is now of the form chart.add( :composites, :id => { :url => ... } )
|
31
|
+
You can now add extra attributes that will be passed to the generated image component.
|
32
|
+
2.1.4 - Added support for xm/swf 5.0.8
|
33
|
+
- Removed dependency on logging gem version
|
34
|
+
2.1.5 - Added ability to enhance draw and link components in subsequent stylesheets. The old
|
35
|
+
behavior was to simply override the whole component. Now you can keep enhancing these components
|
36
|
+
in higher level stylesheets.
|
37
|
+
|
21
38
|
== DESCRIPTION:
|
22
39
|
|
23
|
-
ZiYa allows you to easily
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
thus bring to the table an ideal scheme for reporting and dashboard like applications. Your
|
30
|
-
managers will love you for it !!
|
31
|
-
|
32
|
-
Checkout the demo: http://ziya.liquidrail.com
|
33
|
-
Video : http://www.youtube.com/watch?v=axIMmMHdXzo ( Out of date but you'll get the basics... )
|
34
|
-
Documentation : http://ziya.liquidrail.com/docs
|
35
|
-
Forum : http://groups.google.com/group/ziya-plugin
|
36
|
-
Repositories : http://rubyforge.org/projects/ziya
|
37
|
-
git://github.com/derailed/ziya.git
|
40
|
+
ZiYa allows you to easily create interactive charts, gauges and maps for your web applications. ZiYa leverages
|
41
|
+
flash which offload heavy server side processing to the client. At the root ZiYa allows you to easily generate an
|
42
|
+
XML files that will be downloaded to the client for rendering. Using this gem, you will be able to easily create great
|
43
|
+
looking charts for your application. You will also be able to use the charts, gauges and maps has a navigation scheme
|
44
|
+
by embedding various link in the graphical components thus bringing to the table an ideal scheme for reporting and dashboard
|
45
|
+
like applications. Your manager will love you for it !!
|
38
46
|
|
47
|
+
Blog Site : http://ziya.liquidrail.com
|
48
|
+
Documentation : http://ziya.liquidrail.com/docs
|
49
|
+
Forum : http://groups.google.com/group/ziya-plugin
|
50
|
+
Repositories : git://github.com/derailed/ziya.git
|
39
51
|
|
40
52
|
== FEATURES:
|
41
53
|
|
42
|
-
*
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
styles or define your own by specifying an id when you create your graph. The styles
|
48
|
-
will cascade thru your graph class hierarchy and override default preferences as you
|
49
|
-
would in a style sheet.
|
50
|
-
|
51
|
-
NOTE: XML/SWF charts are free of charge unless you need to use special features such
|
52
|
-
as embedded links and printing.
|
53
|
-
The package cost $45 per domain and is well worth the investment. A similar fee applies
|
54
|
-
to the gauge framework.
|
55
|
-
|
56
|
-
* We are leveraging ERB within the YAML file to provide access to the chart/gauge state. State
|
57
|
-
can be passed in via the options hash when the graph/gauge is generated.
|
58
|
-
You can also define your own methods in helpers/ziya/xxx_helper. Where xxYou can access these
|
59
|
-
helper methods in your style file just like you would in a rails template.
|
60
|
-
|
61
|
-
* Theme support. You can change the appearance and behavior of any charts by introducing
|
62
|
-
new themes under the public/charts/themes directory.
|
54
|
+
* Supports a wide variety of chart/gauge types, sure to fit your needs.
|
55
|
+
* Geographical maps. Maps can be drillable and refreshable
|
56
|
+
* Relieves your server load by generating the actual chart on the client side.
|
57
|
+
* Provides for cascading like css-styles for your charts using YAML files.
|
58
|
+
* Themes support. You can change the appearance and behavior of any charts by introducing new themes
|
63
59
|
|
64
60
|
== REQUIREMENTS:
|
65
61
|
|
66
|
-
ZiYa depends on the
|
67
|
-
|
68
|
-
== INSTALL:
|
62
|
+
ZiYa depends on the following gems
|
69
63
|
|
70
|
-
|
64
|
+
* logging
|
65
|
+
* color
|
66
|
+
|
67
|
+
ZiYa comes pre-bundled with the following packages:
|
68
|
+
* XML/SWF charts Version 5.07 (http://www.maani.us/xml_charts/index.php)
|
69
|
+
* XML/SWF gauges Version 1.6 (http://www.maani.us/gauge/index.php)
|
70
|
+
* DIY Maps (http://backspace.com/mapapp/)
|
71
|
+
|
72
|
+
XML/SWF
|
73
|
+
* XML/SWF charts are free of charge unless you need to use special features such
|
74
|
+
as embedded links and printing.
|
75
|
+
|
76
|
+
The package cost $45 per domain, including localhost and is well worth the investment.
|
77
|
+
A similar fee applies to the gauge framework.
|
78
|
+
|
79
|
+
DIY Map
|
80
|
+
* This package is free for use in non-commercial applications. For commercial applications,
|
81
|
+
there is a $20.00 license per domain. I have chosen this package over others, as it supports
|
82
|
+
the interaction and configuration I was looking for, it seems stable and packs lots of features
|
83
|
+
for a reasonable price.
|
84
|
+
|
85
|
+
== INSTALL:
|
71
86
|
|
72
|
-
|
87
|
+
NOTE: You will need to add github as a gem source and thus will need gem version 1.3 or later
|
73
88
|
|
74
|
-
|
89
|
+
> gem sources -a http://gems.github.com
|
75
90
|
|
76
|
-
sudo gem install derailed-ziya
|
91
|
+
> sudo gem install derailed-ziya
|
77
92
|
|
78
93
|
cd to your application directory and issue the following command
|
79
94
|
|
80
|
-
> ziyafy
|
95
|
+
> ziyafy --charts
|
81
96
|
|
82
|
-
This will copy the necessary themes and flash files to run
|
83
|
-
public/charts directory.
|
84
|
-
|
97
|
+
This will copy the necessary themes and flash files to run ZiYa in your application
|
98
|
+
public/charts directory. You can install maps and gauges components as well. Type in
|
99
|
+
|
100
|
+
> ziyafy --help
|
101
|
+
|
102
|
+
To see all available options.
|
103
|
+
|
85
104
|
== SYNOPSIS:
|
86
105
|
|
87
|
-
|
88
|
-
need to get a new license from XML/SWF
|
89
|
-
advanced features
|
90
|
-
Also some api's have changed. I will try to push a new sample application and more docs in the
|
91
|
-
next few weeks. So make sure you try this out first in a non production environment and report
|
92
|
-
bugs or side effects. I'll do my best to keep up with the demand. If anyone would like to give
|
93
|
-
me a hand with a tutorial app or improving the docs, I am all hears...
|
106
|
+
This gem version requires a client update to flash 9.0 and possibly you will
|
107
|
+
need to get a new license from XML/SWF >= 5.0, if you want to use
|
108
|
+
advanced features suck as links and live updates.
|
94
109
|
|
110
|
+
== Creating a ZiYa chart in a Rails 2.3 application
|
95
111
|
|
112
|
+
1 - Create a ziya.rb file under config/initializers
|
96
113
|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
# Pull in the ZiYa gem framework
|
103
|
-
gem "ziya", "~> 2.0.0"
|
104
|
-
require 'ziya'
|
114
|
+
ziya.rb:
|
115
|
+
|
116
|
+
# Pull in the ZiYa gem framework
|
117
|
+
gem 'derailed-ziya', '= 2.1.0'
|
118
|
+
require 'ziya'
|
105
119
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
120
|
+
# Initializes the ZiYa Framework
|
121
|
+
Ziya.initialize(
|
122
|
+
:logger => RAILS_DEFAULT_LOGGER,
|
123
|
+
:themes_dir => File.join( File.dirname(__FILE__), %w[.. .. public charts themes])
|
124
|
+
)
|
125
|
+
|
126
|
+
This will initialize the gem. You can log the output to stdout using the ZiYa bundled logger
|
127
|
+
or specify a file ie File.join( File.dirname(__FILE__), %w[.. log ziya.log]. If you choose to use the
|
128
|
+
ZiYa logger, you can specify the :log_level option to either :warn :info :debug or :error.
|
129
|
+
You will need to specify your themes directory typically located under public/charts/themes or any location
|
130
|
+
you'll like to choose.
|
131
|
+
|
132
|
+
3 - Create a chart controller
|
133
|
+
|
134
|
+
blee_controller.rb:
|
135
|
+
|
136
|
+
class BleeController < ApplicationController
|
137
|
+
# Load ZiYa necessary helpers
|
138
|
+
helper Ziya::HtmlHelpers::Charts
|
139
|
+
helper Ziya::YamlHelpers::Charts
|
140
|
+
|
141
|
+
# Callback from the flash movie to get the chart's data
|
142
|
+
def load_chart
|
143
|
+
# Create a bar chart with 2 series composed of 3 data points each.
|
144
|
+
# Chart will be rendered using the default look and feel
|
145
|
+
chart = Ziya::Charts::Bar.new
|
146
|
+
chart.add( :axis_category_text, %w[2006 2007 2008] )
|
147
|
+
chart.add( :series, "Dogs", [10,20,30] )
|
148
|
+
chart.add( :series, "Cats", [5,15,25] )
|
149
|
+
respond_to do |fmt|
|
150
|
+
fmt.xml { render :xml => chart.to_xml }
|
151
|
+
end
|
152
|
+
end
|
110
153
|
|
111
|
-
|
112
|
-
or specify a file ie File.join( File.dirname(__FILE__), %w[.. log ziya.log]. If you choose to use the
|
113
|
-
ZiYa logger, you can specify the :log_level option to either :warn :info :debug or :error.
|
114
|
-
You will need to indicate your themes directory typically located under public/charts/themes or any location
|
115
|
-
you'll choose. Otherwise ZiYa will used the default themes from <<the gem ie default or commando.
|
116
|
-
Lastly you can specify a custom helper directory :helpers_dir, so you can use helper methods within your
|
117
|
-
ZiYa stylesheets.
|
154
|
+
4 - Create a view
|
118
155
|
|
119
|
-
|
156
|
+
blee/index.html.erb:
|
120
157
|
|
121
|
-
|
158
|
+
# Defines the necessary tag to embed a flash movie in your html page.
|
159
|
+
# This will callback to your controller to fetch the necessary xml.
|
160
|
+
<%= ziya_chart load_chart_url -%>
|
122
161
|
|
123
|
-
|
162
|
+
5 - Create a named route
|
124
163
|
|
125
|
-
|
126
|
-
|
164
|
+
config/routes.rb:
|
165
|
+
|
166
|
+
map.load_chart '/blee/load_chart', :controller => 'blee', :action => 'load_chart'
|
167
|
+
|
168
|
+
== Styling a chart
|
169
|
+
|
170
|
+
=== Basic Theme
|
171
|
+
|
172
|
+
1 - Create a directory fred in public/charts/themes
|
173
|
+
2 - Create a file called column_chart.yml under the fred directory
|
174
|
+
2 - Edit column_chart.yml and add the following lines mind the yaml 2 space indentation!
|
175
|
+
|
176
|
+
<%= chart :column %>
|
177
|
+
<%=comp :axis_category %>
|
178
|
+
color: ff0000
|
127
179
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
180
|
+
3 - In fred_controller add the following directive to the chart to associate your new theme with the chart
|
181
|
+
|
182
|
+
chart.add( :theme, 'fred' )
|
183
|
+
|
184
|
+
4 - reload the page and you should now see the red x axis label
|
185
|
+
|
186
|
+
=== Cascading themes
|
187
|
+
|
188
|
+
To override the default column chart theme, you may now create an instance theme.
|
189
|
+
|
190
|
+
1 - Create fred.yml in public/chart/themes/fred
|
191
|
+
|
192
|
+
2 - Edit fred.yml as follows
|
193
|
+
|
194
|
+
<%= chart :column %>
|
195
|
+
<%=comp :axis_category %>
|
196
|
+
color: 00ff00
|
197
|
+
|
198
|
+
3 - Edit your controller to indicate the instance theme name
|
199
|
+
|
200
|
+
chart = Ziya::Charts.Column.new( nil, 'fred' )
|
201
|
+
|
202
|
+
4 - Reload the page - The x axis category labels should now be green.
|
203
|
+
|
204
|
+
NOTE: There are lots of setup example for themes in the ziya-galeria app at
|
205
|
+
git://github.com/derailed/ziya-galeria.git.
|
206
|
+
The themes component follows the xml/swf xml settings for configuration which
|
207
|
+
are documented here http://www.maani.us/xml_charts/index.php?menu=Reference
|
208
|
+
|
209
|
+
=== Using theme helpers
|
210
|
+
|
211
|
+
Just like rails view template helpers, ZiYa support helpers for theme stylesheets.
|
212
|
+
In order to use a helper for your chart you will need to use the following steps:
|
213
|
+
|
214
|
+
1 - Create a ziya directory under app/helpers
|
215
|
+
2 - Create a file called fred_helper.rb
|
216
|
+
3 - Edit fred_helper.rb and add the following lines
|
217
|
+
|
218
|
+
module Ziya::FredHelper
|
219
|
+
def random_color
|
220
|
+
%w[ffaa00 aaff00 aabbff][rand(3)]
|
137
221
|
end
|
138
|
-
|
139
|
-
blee/index.html.erb
|
222
|
+
end
|
140
223
|
|
141
|
-
|
224
|
+
4 - Edit you theme stylesheet to call the helper method
|
142
225
|
|
143
|
-
|
226
|
+
In fred.yml
|
144
227
|
|
145
|
-
|
146
|
-
|
228
|
+
<%= chart :column %>
|
229
|
+
<%=comp :axis_category %>
|
230
|
+
color: <%= random_color %>
|
231
|
+
|
232
|
+
5 - Edit you config/initializer/ziya.rb and add the following line
|
233
|
+
|
234
|
+
# Initializes the ZiYa Framework
|
235
|
+
Ziya.initialize( :logger => RAILS_DEFAULT_LOGGER,
|
236
|
+
:helpers_dir => File.join( File.dirname(__FILE__), %w[.. .. app helpers ziya] ), # <-- New line !!
|
237
|
+
:themes_dir => File.join( File.dirname(__FILE__), %w[.. .. public charts themes])
|
238
|
+
)
|
239
|
+
|
240
|
+
6 - Restart your app server
|
241
|
+
7 - Reload the page serveral time and watch the x axis label color change
|
147
242
|
|
148
|
-
|
243
|
+
== Creating a gauge for a rails application
|
149
244
|
|
150
245
|
You will need to modify the ziya initializer and add the following directive
|
151
246
|
|
152
|
-
Ziya.initialize(
|
153
|
-
|
154
|
-
|
155
|
-
|
247
|
+
Ziya.initialize(
|
248
|
+
:logger => RAILS_DEFAULT_LOGGER,
|
249
|
+
:designs_dir => File.join( File.dirname(__FILE__), %w[.. .. public gauges designs] ), # => Add this !!
|
250
|
+
:themes_dir => File.join( File.dirname(__FILE__), %w[.. .. public charts themes]) )
|
156
251
|
|
157
|
-
fred_controller.rb
|
252
|
+
* fred_controller.rb
|
158
253
|
|
159
254
|
class FredController < ApplicationController
|
160
255
|
def load_gauge
|
161
|
-
gauge = Ziya::Gauges::Base.new(
|
256
|
+
gauge = Ziya::Gauges::Base.new( LICENCE_KEY, 'my_gauge' )
|
162
257
|
respond_to do |fmt|
|
163
258
|
fmt.xml => { render :xml => gauge.to_xml }
|
164
259
|
end
|
165
260
|
end
|
166
261
|
end
|
167
262
|
|
168
|
-
fred/index.html.erb
|
263
|
+
* fred/index.html.erb
|
169
264
|
|
170
|
-
<%= ziya_gauge load_gauge_url
|
265
|
+
<%= ziya_gauge load_gauge_url -%>
|
171
266
|
|
172
|
-
config/routes.rb
|
267
|
+
* config/routes.rb
|
173
268
|
|
174
269
|
# Creates a named route for the chart.
|
175
270
|
map.load_gauge '/fred/load_gauge', :controller => 'fred', :action => 'load_gauge'
|
176
271
|
|
177
|
-
public/gauges/designs/my_gauge.yml
|
272
|
+
* public/gauges/designs/my_gauge.yml
|
178
273
|
|
179
274
|
In the design file you will leverage the components defined in the Ziya::Gauges::Support
|
180
275
|
package to create your gauge desgins. You gauges can be animated using rotate, scale and
|
@@ -245,4 +340,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
245
340
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
246
341
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
247
342
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
248
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
343
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
CHANGED
@@ -17,20 +17,20 @@ PROJ.url = 'http://ziya.rubyforge.org'
|
|
17
17
|
PROJ.rubyforge_name = 'ziya'
|
18
18
|
PROJ.description = "Easily add charting to your rails/merb applications"
|
19
19
|
PROJ.spec_opts << '--color'
|
20
|
-
PROJ.rcov_dir =
|
21
|
-
PROJ.rdoc_dir =
|
20
|
+
PROJ.rcov_dir = 'coverage'
|
21
|
+
PROJ.rdoc_dir = 'docs'
|
22
22
|
PROJ.ruby_opts = %w[-W0]
|
23
23
|
PROJ.version = ::Ziya::Version.version
|
24
24
|
PROJ.svn = 'ziya'
|
25
25
|
PROJ.rcov_threshold = 90.0
|
26
26
|
PROJ.executables = ['ziyafy']
|
27
27
|
|
28
|
-
PROJ.exclude << %w[.DS_Store$ .swo$ .swp$]
|
28
|
+
PROJ.exclude << %w[.DS_Store$ .swo$ .swp$ .git$]
|
29
29
|
PROJ.tests = FileList['test/**/test_*.rb']
|
30
30
|
PROJ.annotation_tags << 'BOZO'
|
31
31
|
|
32
32
|
desc "Clean up artifact directories"
|
33
|
-
task :clean do
|
33
|
+
task :clean do
|
34
34
|
rcov_artifacts = File.join( File.dirname( __FILE__ ), "coverage" )
|
35
35
|
FileUtils.rm_rf rcov_artifacts if File.exists? rcov_artifacts
|
36
36
|
rdoc_artifacts = File.join( File.dirname( __FILE__ ), "docs" )
|
@@ -39,6 +39,7 @@ task :clean do
|
|
39
39
|
FileUtils.rm_rf gem_artifacts if File.exists? gem_artifacts
|
40
40
|
end
|
41
41
|
|
42
|
-
task 'gem:package'
|
42
|
+
task 'gem:package'
|
43
43
|
|
44
|
-
depend_on "logging"
|
44
|
+
depend_on "logging"
|
45
|
+
depend_on "color" , '~> 1.4.0'
|
data/bin/ziyafy
CHANGED
@@ -1,42 +1,69 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'optparse'
|
3
3
|
require 'ostruct'
|
4
|
+
require 'fileutils'
|
4
5
|
|
5
6
|
require File.expand_path( File.join(File.dirname(__FILE__), '..', 'lib', 'ziya') )
|
6
7
|
|
8
|
+
# TODO - Use main
|
7
9
|
module Ziya
|
8
10
|
class Ziyafy
|
9
11
|
# Copy necessary ZiYa components to a ruby web application
|
10
12
|
def initialize( argv=ARGV )
|
11
13
|
option_parser = default_option_parser
|
12
14
|
option_parser.parse!(argv)
|
13
|
-
puts
|
15
|
+
puts 'You must specify at least one off --charts, --gauges or --maps' unless options.charts or options.gauges or options.maps
|
14
16
|
copy_artifacts
|
15
17
|
end
|
16
18
|
|
17
19
|
# copies ziya artifacts to public app directory
|
18
20
|
def copy_artifacts
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
21
|
+
%w[charts gauges maps].each do |s|
|
22
|
+
if options.send( s )
|
23
|
+
dest_dir = File.join( options.public_dir )
|
24
|
+
src_dir = File.expand_path( File.join( File.dirname(__FILE__), %w[.. resources], s ) )
|
25
|
+
puts "Installing ZiYa `#{s} artifacts in `#{dest_dir}"
|
26
|
+
::FileUtils.cp_r( src_dir, dest_dir )
|
27
|
+
end
|
28
|
+
end
|
23
29
|
end
|
24
30
|
|
25
31
|
# access the options
|
26
32
|
def options #:nodoc:
|
27
|
-
|
33
|
+
unless @options
|
28
34
|
@options = OpenStruct.new
|
29
35
|
# Unless specified copy artifacts to the public directory
|
30
|
-
@options.public_dir = File.join( Dir.pwd, %w[public] )
|
36
|
+
@options.public_dir = ::File.join( Dir.pwd, %w[public] )
|
37
|
+
@options.charts = false
|
38
|
+
@options.gauges = false
|
39
|
+
@options.maps = false
|
31
40
|
end
|
32
|
-
|
41
|
+
@options
|
33
42
|
end
|
34
43
|
|
35
44
|
# sets up cmd line args
|
36
45
|
def default_option_parser #:nodoc:
|
37
|
-
OptionParser.new do |op|
|
46
|
+
::OptionParser.new do |op|
|
38
47
|
op.separator ""
|
39
|
-
op.separator "
|
48
|
+
op.separator "ziyafy options:"
|
49
|
+
|
50
|
+
op.on( "-c", "--charts", "Copy ZiYa charts artifacts only" ) do |dir|
|
51
|
+
options.charts = true
|
52
|
+
end
|
53
|
+
|
54
|
+
op.on( "-g", "--gauges", "Copy ZiYa gauges artifacts only" ) do |dir|
|
55
|
+
options.gauges = true
|
56
|
+
end
|
57
|
+
|
58
|
+
op.on( "-m", "--maps", "Copy ZiYa maps artifacts only" ) do |dir|
|
59
|
+
options.maps = true
|
60
|
+
end
|
61
|
+
|
62
|
+
op.on( "-a", "--all", "Copy all ZiYa artifacts" ) do |dir|
|
63
|
+
options.charts = true
|
64
|
+
options.gauges = true
|
65
|
+
options.maps = true
|
66
|
+
end
|
40
67
|
|
41
68
|
op.on( "-p", "--public_dir FILE", "The location of the public app directory." ) do |dir|
|
42
69
|
options.public_dir = dir
|
@@ -47,7 +74,4 @@ module Ziya
|
|
47
74
|
end
|
48
75
|
end
|
49
76
|
|
50
|
-
Ziya::Ziyafy.new(ARGV)
|
51
|
-
|
52
|
-
|
53
|
-
|
77
|
+
Ziya::Ziyafy.new(ARGV)
|