ziya 2.0.7 → 2.1.6
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -3,7 +3,7 @@
|
|
3
3
|
#
|
4
4
|
# Author:: Fernand Galiana
|
5
5
|
# -----------------------------------------------------------------------------
|
6
|
-
module Ziya::
|
6
|
+
module Ziya::Charts::Support
|
7
7
|
# Rect component to draw a rectangle on the chart. Must be set up within the draw
|
8
8
|
# component.
|
9
9
|
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=draw
|
@@ -4,9 +4,7 @@
|
|
4
4
|
# Author:: Fernand Galiana
|
5
5
|
# Date:: Dec 15th, 2006
|
6
6
|
# -----------------------------------------------------------------------------
|
7
|
-
|
8
|
-
|
9
|
-
module Ziya::Components
|
7
|
+
module Ziya::Charts::Support
|
10
8
|
# Specifies the ability to scroll a chart by setting single or double sliders
|
11
9
|
# on the chart.
|
12
10
|
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=scroll
|
@@ -3,9 +3,7 @@
|
|
3
3
|
#
|
4
4
|
# Author:: Fernand Galiana
|
5
5
|
# -----------------------------------------------------------------------------
|
6
|
-
|
7
|
-
|
8
|
-
module Ziya::Components
|
6
|
+
module Ziya::Charts::Support
|
9
7
|
# Specifies the gap betwen cols/bars and gap between series for column and bar
|
10
8
|
# charts only.
|
11
9
|
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=series
|
@@ -3,7 +3,7 @@
|
|
3
3
|
#
|
4
4
|
# Author:: Fernand Galiana
|
5
5
|
# -----------------------------------------------------------------------------
|
6
|
-
module Ziya::
|
6
|
+
module Ziya::Charts::Support
|
7
7
|
# Specifies the shadow filter to be applied to some component ie chart_rect, axis_value, etc...
|
8
8
|
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=filter
|
9
9
|
# for additional documentation, examples and futher detail.
|
@@ -4,7 +4,7 @@
|
|
4
4
|
# Author:: Fernand Galiana
|
5
5
|
# Date:: Dec 15th, 2006
|
6
6
|
# -----------------------------------------------------------------------------
|
7
|
-
module Ziya::
|
7
|
+
module Ziya::Charts::Support
|
8
8
|
# Text component to draw text on the chart. Must be set up within the draw
|
9
9
|
# component.
|
10
10
|
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=draw
|
@@ -13,5 +13,13 @@ module Ziya::Components
|
|
13
13
|
has_attribute :layer, :transition, :delay, :duration, :x, :y, :width,
|
14
14
|
:height, :h_align, :v_align, :rotation, :font, :bold, :size,
|
15
15
|
:color, :alpha, :shadow, :bevel, :glow, :blur, :text
|
16
|
+
|
17
|
+
# -------------------------------------------------------------------------
|
18
|
+
# Dump has_attribute into xml element
|
19
|
+
def flatten( xml )
|
20
|
+
opts = options.clone
|
21
|
+
text = opts.delete( :text )
|
22
|
+
xml.text( opts ) { |x| x.text!( text.to_s ) }
|
23
|
+
end
|
16
24
|
end
|
17
25
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
#
|
7
7
|
# Author:: Fernand Galiana
|
8
8
|
# -----------------------------------------------------------------------------
|
9
|
-
module Ziya::
|
9
|
+
module Ziya::Charts::Support
|
10
10
|
# Specifies the label for the chart element actual value. This can be setup to
|
11
11
|
# be fixed or as a tooltip
|
12
12
|
# See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=tooltip
|
@@ -4,7 +4,7 @@
|
|
4
4
|
#
|
5
5
|
# Author:: Fernand Galiana
|
6
6
|
# -----------------------------------------------------------------------------
|
7
|
-
module Ziya::
|
7
|
+
module Ziya::Charts::Support
|
8
8
|
# Updates the chart at intervals, without reloading the web page. This makes it possible
|
9
9
|
# to display charts with live data, change the chart's look over time for emphasis, or
|
10
10
|
# create a slideshow from different charts.
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# -----------------------------------------------------------------------------
|
2
|
+
# Various text utils. Yes indeed lifted from Inflector.
|
3
|
+
#
|
4
|
+
# Author:: Fernand Galiana
|
5
|
+
# Date:: Dec 15th, 2006
|
6
|
+
# -----------------------------------------------------------------------------
|
7
|
+
class String
|
8
|
+
# Pulled from the Rails Inflector class and modified slightly to fit our needs.
|
9
|
+
def camelize_it()
|
10
|
+
self.gsub(/\/(.?)/) { "::" + $1.upcase }.gsub(/(^|_)(.)/) { $2.upcase }
|
11
|
+
end
|
12
|
+
|
13
|
+
# Same as Rails Inflector but eliminating inflector dependency
|
14
|
+
def underscore
|
15
|
+
self.to_s.gsub(/::/, '/').
|
16
|
+
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
|
17
|
+
gsub(/([a-z\d])([A-Z])/,'\1_\2').
|
18
|
+
tr("-", "_").
|
19
|
+
downcase
|
20
|
+
end
|
21
|
+
|
22
|
+
# Pulled from the Rails Inflector class and modified slightly to fit our needs.
|
23
|
+
def classify
|
24
|
+
self.sub(/.*\./, '').camelize_it
|
25
|
+
end
|
26
|
+
|
27
|
+
# strip out module name and return bare class name
|
28
|
+
def demodulize
|
29
|
+
self.gsub( /^.*::/, '' )
|
30
|
+
end
|
31
|
+
end
|
data/lib/ziya/gauges/base.rb
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
+
require 'ziya/yaml_helpers/gauges'
|
2
|
+
require 'ziya/html_helpers/gauges'
|
3
|
+
require 'erb'
|
4
|
+
require 'cgi'
|
5
|
+
|
1
6
|
module Ziya::Gauges
|
2
7
|
class Base
|
3
|
-
include Ziya::
|
8
|
+
include Ziya::YamlHelpers::Gauges, Ziya::HtmlHelpers::Gauges
|
4
9
|
|
5
10
|
attr_accessor :license, :design_id
|
6
11
|
attr_reader :type, :components
|
@@ -12,7 +17,7 @@ module Ziya::Gauges
|
|
12
17
|
|
13
18
|
# load up associated helper
|
14
19
|
loaded = load_helper( Ziya.helpers_dir ) if Ziya.helpers_dir
|
15
|
-
Ziya.logger.
|
20
|
+
Ziya.logger.debug( ">>> ZiYa -- no helper for gauge `#{design_id}" ) unless loaded
|
16
21
|
|
17
22
|
# init defaults
|
18
23
|
@options = default_options
|
@@ -64,7 +69,7 @@ module Ziya::Gauges
|
|
64
69
|
|
65
70
|
# retrieve bundled design directory
|
66
71
|
def bundled_designs_dir
|
67
|
-
Ziya.path( %w[gauges designs] )
|
72
|
+
Ziya.path( %w[resources gauges designs] )
|
68
73
|
end
|
69
74
|
|
70
75
|
# -----------------------------------------------------------------------
|
@@ -74,7 +79,7 @@ module Ziya::Gauges
|
|
74
79
|
unless helper_file =~ /^(#{design_id}_helper).rb$/ or helper_file =~ /^(base_helper).rb$/
|
75
80
|
next
|
76
81
|
end
|
77
|
-
Ziya.logger.
|
82
|
+
Ziya.logger.debug( ">>> ZiYa loading custom helper `#{$1}" )
|
78
83
|
# BOZO !! This will only work in rails ??
|
79
84
|
if defined? RAILS_ROOT
|
80
85
|
require_dependency File.join(helper_dir, $1)
|
@@ -118,7 +123,7 @@ module Ziya::Gauges
|
|
118
123
|
elsif std_design
|
119
124
|
design = std_design
|
120
125
|
end
|
121
|
-
# Ziya.logger.
|
126
|
+
# Ziya.logger.info "!!!! Design #{design_id} -- \n#{design.to_yaml}"
|
122
127
|
# flatten components to xml
|
123
128
|
design.components.each do |name, value|
|
124
129
|
# Ziya.logger.debug "Processing #{name}"
|
@@ -148,23 +153,23 @@ module Ziya::Gauges
|
|
148
153
|
# -----------------------------------------------------------------------
|
149
154
|
# Load yaml file associated with class if any
|
150
155
|
def inflate( clazz, designs_dir, design )
|
151
|
-
class_name =
|
156
|
+
class_name = clazz.to_s.demodulize.underscore
|
152
157
|
begin
|
153
158
|
file_name = "#{designs_dir}/#{design}.yml"
|
154
159
|
Ziya.logger.debug ">>> ZiYa attempt to load design file '#{file_name}"
|
155
160
|
return nil unless File.exists?( file_name )
|
156
161
|
yml = IO.read( file_name )
|
157
|
-
# Ziya.logger.
|
162
|
+
# Ziya.logger.info ">>> Unprocessed yaml...\n#{yml}\n"
|
158
163
|
processed = erb_render( yml )
|
159
|
-
# Ziya.logger.
|
164
|
+
# Ziya.logger.info ">>> Processed yaml...\n#{processed}"
|
160
165
|
load = YAML::load( processed )
|
161
|
-
Ziya.logger.
|
166
|
+
Ziya.logger.debug ">>> ZiYa successfully loaded design file `#{file_name}"
|
162
167
|
return load
|
163
168
|
rescue SystemCallError => boom
|
164
|
-
Ziya.logger.
|
169
|
+
Ziya.logger.debug boom
|
165
170
|
rescue => bang
|
166
|
-
Ziya.logger.
|
167
|
-
bang.backtrace.each { |l| Ziya.logger.
|
171
|
+
Ziya.logger.info ">>> ZiYa -- Error encountered loading design file `#{file_name} -- #{bang}"
|
172
|
+
bang.backtrace[0..3].each { |l| Ziya.logger.debug( l ) }
|
168
173
|
end
|
169
174
|
nil
|
170
175
|
end
|
@@ -1,32 +1,24 @@
|
|
1
1
|
module Ziya::Gauges::Support
|
2
|
-
class Base < Ziya::
|
3
|
-
include Ziya::
|
2
|
+
class Base < Ziya::Charts::Support::Base
|
3
|
+
include Ziya::YamlHelpers::Gauges
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------
|
6
6
|
# converts component to yaml style component for yaml parser consumption
|
7
7
|
def to_comp_yaml( name, indent_multiplier=1 )
|
8
8
|
buff = []
|
9
9
|
tab = indent( indent_multiplier )
|
10
|
-
buff << "#{dial(
|
10
|
+
buff << "#{dial( self.class.name.demodulize, name )}"
|
11
11
|
options.each_pair do |k,v|
|
12
12
|
if v.is_a? YAML::Omap
|
13
13
|
buff << "#{tab}#{indent}#{dials}"
|
14
14
|
v.each do |name, comp|
|
15
|
-
buff << "#{tab}#{indent(2)}#{dial(
|
15
|
+
buff << "#{tab}#{indent(2)}#{dial( comp.class.name.demodulize, name )}"
|
16
16
|
comp.options.each_pair { |k,v| buff << "#{tab}#{indent(4)}#{k}: #{v}"}
|
17
17
|
end
|
18
18
|
else
|
19
19
|
buff << "#{tab}#{indent(1)}#{k}: #{v}" if options[k] and !options[k].to_s.empty?
|
20
20
|
end
|
21
21
|
end
|
22
|
-
|
23
|
-
# if ( self.respond_to? :dials )
|
24
|
-
# buff << "#{tab}dials:"
|
25
|
-
# for dial in dials do
|
26
|
-
# buff << "#{tab}#{dial( demodulize( dial.class.name ) )}"
|
27
|
-
# dial.options.each_pair { |k,v| buff << "#{tab}#{tab}#{k}: #{v}"}
|
28
|
-
# end
|
29
|
-
# end
|
30
22
|
buff.join( "\n" )
|
31
23
|
end
|
32
24
|
end
|
@@ -12,7 +12,7 @@ module Ziya::Gauges::Support
|
|
12
12
|
has_attribute :start_num, :end_num,
|
13
13
|
:font, :size, :bold, :width, :height, :align
|
14
14
|
|
15
|
-
# overrides flatten to generate a series of radial tick
|
15
|
+
# overrides flatten to generate a series of radial tick marks
|
16
16
|
def flatten( xml )
|
17
17
|
number = start_num
|
18
18
|
i = start_angle
|
@@ -0,0 +1 @@
|
|
1
|
+
Ziya.require_all_libs_relative_to __FILE__, "html_helpers"
|
@@ -0,0 +1,91 @@
|
|
1
|
+
require 'ziya/core_ext/string'
|
2
|
+
|
3
|
+
module Ziya
|
4
|
+
module HtmlHelpers
|
5
|
+
module Base
|
6
|
+
|
7
|
+
def mime() "application/x-shockwave-flash"; end
|
8
|
+
def plugin_url() "http://www.macromedia.com/go/getflashplayer"; end
|
9
|
+
|
10
|
+
# Set the wmode to opaque if a bgcolor is specified. If not set to
|
11
|
+
# transparent mode unless user overrides it
|
12
|
+
def setup_wmode( options )
|
13
|
+
if options[:bgcolor]
|
14
|
+
options[:wmode] = "opaque" unless options[:wmode]
|
15
|
+
else
|
16
|
+
options[:wmode] = "transparent" unless options[:wmode]
|
17
|
+
options[:bgcolor] = "#FFFFFF"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
# Check args for size option in the format wXy (Submitted by Sam Livingston-Gray)
|
22
|
+
def setup_movie_size( options )
|
23
|
+
if options[:size] =~ /(\d+)x(\d+)/
|
24
|
+
options[:width] = $1
|
25
|
+
options[:height] = $2
|
26
|
+
options.delete :size
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
# escape url
|
31
|
+
def escape_url( url )
|
32
|
+
url ? CGI.escape( url.gsub( /&/, '&' ) ) : url
|
33
|
+
end
|
34
|
+
|
35
|
+
# # All this stolen form rails to make Ziya work with other fmks....
|
36
|
+
def tag(name, options = nil, open = false, escape = true)
|
37
|
+
"<#{name}#{tag_options(options, escape) if options}" + (open ? ">" : " />")
|
38
|
+
end
|
39
|
+
|
40
|
+
def escape_once(html)
|
41
|
+
html.to_s.gsub(/[\"><]|&(?!([a-zA-Z]+|(#\d+));)/) { |special| escape_chars[special] }
|
42
|
+
end
|
43
|
+
|
44
|
+
def tag_options(options, escape = true)
|
45
|
+
unless !options or options.empty?
|
46
|
+
attrs = []
|
47
|
+
if escape
|
48
|
+
options.each do |key, value|
|
49
|
+
next unless value
|
50
|
+
key = key.to_s
|
51
|
+
value = escape_once(value)
|
52
|
+
attrs << %(#{key}="#{value}")
|
53
|
+
end
|
54
|
+
else
|
55
|
+
attrs = options.map { |key, value| %(#{key}="#{value}") }
|
56
|
+
end
|
57
|
+
" #{attrs.sort * ' '}" unless attrs.empty?
|
58
|
+
end
|
59
|
+
end
|
60
|
+
#
|
61
|
+
# def content_tag(name, content_or_options_with_block = nil, options = nil, escape = true, &block)
|
62
|
+
# if block_given?
|
63
|
+
# options = content_or_options_with_block if content_or_options_with_block.is_a?(Hash)
|
64
|
+
# content = capture_block(&block)
|
65
|
+
# content_tag = content_tag_string(name, content, options, escape)
|
66
|
+
# block_is_within_action_view?(block) ? concat(content_tag, block.binding) : content_tag
|
67
|
+
# else
|
68
|
+
# content = content_or_options_with_block
|
69
|
+
# content_tag_string(name, content, options, escape)
|
70
|
+
# end
|
71
|
+
# end
|
72
|
+
#
|
73
|
+
# def capture_block( *args, &block )
|
74
|
+
# block.call(*args)
|
75
|
+
# end
|
76
|
+
#
|
77
|
+
# def content_tag_string(name, content, options, escape = true)
|
78
|
+
# tag_options = tag_options(options, escape) if options
|
79
|
+
# "<#{name}#{tag_options}>#{content}</#{name}>"
|
80
|
+
# end
|
81
|
+
#
|
82
|
+
# def block_is_within_action_view?(block)
|
83
|
+
# eval("defined? _erbout", block.binding)
|
84
|
+
# end
|
85
|
+
#
|
86
|
+
def escape_chars
|
87
|
+
{ '&' => '&', '"' => '"', '>' => '>', '<' => '<' }
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
@@ -0,0 +1,200 @@
|
|
1
|
+
# Generates necessary html flash tag to support ZiYa
|
2
|
+
#
|
3
|
+
# TODO -- Rewrite to use content tag block instead...
|
4
|
+
#
|
5
|
+
# Author: Fernand Galiana
|
6
|
+
|
7
|
+
module Ziya::HtmlHelpers::Charts
|
8
|
+
include Ziya::HtmlHelpers::Base
|
9
|
+
|
10
|
+
# generates a javascript tag to include the js script to create object and
|
11
|
+
# embed tags
|
12
|
+
def ziya_javascript_include_tag( opts={} )
|
13
|
+
options = { :swf_path => chart_path,
|
14
|
+
:major_vers => 9,
|
15
|
+
:minor_vers => 0,
|
16
|
+
:req_vers => 45 }.merge!( opts )
|
17
|
+
|
18
|
+
js = <<-JS
|
19
|
+
<script language="javascript" type="text/javascript">
|
20
|
+
AC_FL_RunContent = 0;
|
21
|
+
DetectFlashVer = 0;
|
22
|
+
</script>
|
23
|
+
<script src="#{options[:swf_path]}/AC_RunActiveContent.js" language="javascript"></script>
|
24
|
+
<script language="javascript" type="text/javascript">
|
25
|
+
var requiredMajorVersion = #{options[:major_vers]};
|
26
|
+
var requiredMinorVersion = #{options[:minor_vers]};
|
27
|
+
var requiredRevision = #{options[:req_vers]};
|
28
|
+
</script>
|
29
|
+
JS
|
30
|
+
end
|
31
|
+
|
32
|
+
def default_chart_options
|
33
|
+
{
|
34
|
+
:width => "400",
|
35
|
+
:height => "300",
|
36
|
+
:bgcolor => "ffffff",
|
37
|
+
:wmode => "opaque",
|
38
|
+
:menu => true,
|
39
|
+
:full_screen => true,
|
40
|
+
:align => "l",
|
41
|
+
:salign => "tl",
|
42
|
+
:scale => "noscale",
|
43
|
+
:use_cache => false,
|
44
|
+
:timeout => nil,
|
45
|
+
:retry => 2,
|
46
|
+
:use_stage => false,
|
47
|
+
:id => "ziya_chart",
|
48
|
+
:swf_path => chart_path,
|
49
|
+
:asset_url => chart_path
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
# generates necessary object and embed tags to display a flash movie on various
|
54
|
+
# browsers using javascript
|
55
|
+
def ziya_chart_js( url, chart_options={} )
|
56
|
+
options = default_chart_options.merge( chart_options )
|
57
|
+
|
58
|
+
# Setup options for opaque mode
|
59
|
+
setup_wmode( options )
|
60
|
+
|
61
|
+
# setup width and height
|
62
|
+
setup_movie_size( options )
|
63
|
+
|
64
|
+
flash_vars = url ? charts_swf : charts_swf_base
|
65
|
+
xml_swf_path = flash_vars % [options[:swf_path], escape_url(url)]
|
66
|
+
xml_swf_path << "&chart_id=#{options[:id]}"
|
67
|
+
xml_swf_path << "×tamp=#{Time.now.to_i}" if options[:cache] == false
|
68
|
+
xml_swf_path << "&timeout=#{options[:timeout]}&retry=#{options[:retry]}" if options[:timeout]
|
69
|
+
xml_swf_path << "&stage_width=#{options[:width]}&stage_height=#{options[:height]}" if options[:use_stage] == true
|
70
|
+
|
71
|
+
js = <<-JS
|
72
|
+
<script language="javascript" type="text/javascript">
|
73
|
+
if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
|
74
|
+
alert( "This page requires AC_RunActiveContent.js." );
|
75
|
+
}
|
76
|
+
else {
|
77
|
+
var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
|
78
|
+
if( hasRightVersion ) {
|
79
|
+
AC_FL_RunContent(
|
80
|
+
'codebase' , 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0',
|
81
|
+
'width' , '#{options[:width]}',
|
82
|
+
'height' , '#{options[:height]}',
|
83
|
+
'scale' , '#{options[:scale]}',
|
84
|
+
'salign' , '#{options[:salign]}',
|
85
|
+
'bgcolor' , '#{options[:bgcolor]}',
|
86
|
+
'wmode' , '#{options[:wmode]}',
|
87
|
+
'movie' , '#{options[:swf_path]}/charts',
|
88
|
+
'src' , '#{options[:swf_path]}/charts',
|
89
|
+
'FlashVars' , '#{xml_swf_path}',
|
90
|
+
'id' , '#{options[:id]}',
|
91
|
+
'name' , '#{options[:id]}',
|
92
|
+
'menu' , '#{options[:menu]}',
|
93
|
+
'allowFullScreen' , '#{options[:full_screen]}',
|
94
|
+
'allowScriptAccess','sameDomain',
|
95
|
+
'quality' , 'high',
|
96
|
+
'align' , '#{options[:align]}',
|
97
|
+
'pluginspage' , 'http://www.macromedia.com/go/getflashplayer',
|
98
|
+
'play' , 'true',
|
99
|
+
'devicefont' , 'false'
|
100
|
+
);
|
101
|
+
}
|
102
|
+
else {
|
103
|
+
var alternateContent = 'This content requires the Adobe Flash Player. '
|
104
|
+
+ '<u><a href=http://www.macromedia.com/go/getflash/>Get Flash</a></u>.';
|
105
|
+
document.write(alternateContent);
|
106
|
+
}
|
107
|
+
}
|
108
|
+
</script>
|
109
|
+
JS
|
110
|
+
end
|
111
|
+
|
112
|
+
# generates neccessary html tags to display a chart.
|
113
|
+
def ziya_chart( url, chart_options = {} )
|
114
|
+
options = default_chart_options.merge( chart_options )
|
115
|
+
|
116
|
+
flash_vars = url ? charts_swf : charts_swf_base
|
117
|
+
_ziya_chart( url, flash_vars, "charts.swf", options )
|
118
|
+
end
|
119
|
+
|
120
|
+
# genereates composite chart urls
|
121
|
+
def gen_composite_path( swf_chart_dir, url, chart_id=null )
|
122
|
+
buff = ""
|
123
|
+
if url
|
124
|
+
buff = composite_url % [swf_chart_dir, swf_chart_dir, escape_url( url )]
|
125
|
+
else
|
126
|
+
buff = composite_base_url % [swf_chart_dir, "/charts" ]
|
127
|
+
end
|
128
|
+
buff << "&chart_id=#{chart_id}" if chart_id
|
129
|
+
buff
|
130
|
+
end
|
131
|
+
|
132
|
+
# =========================================================================
|
133
|
+
# private
|
134
|
+
|
135
|
+
# Const accessors...
|
136
|
+
def composite_base_url() "%s/charts.swf?library_path=%s/charts_library" end
|
137
|
+
def composite_url() "#{composite_base_url}&xml_source=%s" end
|
138
|
+
def charts_swf_base() "library_path=%s/charts_library"; end
|
139
|
+
def charts_swf() "#{charts_swf_base}&xml_source=%s"; end
|
140
|
+
def chart_path() "/charts"; end
|
141
|
+
def class_id() "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" end
|
142
|
+
def codebase() "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0"; end
|
143
|
+
|
144
|
+
# generates swf path
|
145
|
+
def gen_swf_path( path_directive, swf_dir, url )
|
146
|
+
path_directive % [swf_dir, escape_url( url )]
|
147
|
+
end
|
148
|
+
|
149
|
+
# generated the object and embed tag necessary for the flash movie
|
150
|
+
def _ziya_chart( url, swf_path, swf_file, options )
|
151
|
+
# Setup options for opaque mode
|
152
|
+
setup_wmode( options )
|
153
|
+
|
154
|
+
# setup width and height
|
155
|
+
setup_movie_size( options )
|
156
|
+
|
157
|
+
color_param = tag( 'param', {:name => 'bgcolor', :value => options[:bgcolor]}, true )
|
158
|
+
color_param += tag( 'param', {:name => "wmode", :value => options[:wmode]}, true )
|
159
|
+
|
160
|
+
xml_swf_path = gen_swf_path( swf_path, options[:swf_path], url )
|
161
|
+
xml_swf_path << "&timestamp=#{Time.now.to_i}" if options[:cache] == false
|
162
|
+
xml_swf_path << "&timeout=#{options[:timeout]}" if options[:timeout]
|
163
|
+
xml_swf_path << "&stage_width=#{options[:width]}&stage_height=#{options[:height]}" if options[:use_stage] == true
|
164
|
+
|
165
|
+
tags = <<-TAGS
|
166
|
+
<object codebase="#{codebase}" classid="#{class_id}" id="#{options[:id]}" height="#{options[:height]}" width="#{options[:width]}">
|
167
|
+
<param name="scale" value="noscale"/>
|
168
|
+
<param name="salign" value="#{options[:salign]}"/>
|
169
|
+
<param name="bgcolor" value="#{options[:bgcolor]}"/>
|
170
|
+
<param name="wmode" value="#{options[:wmode]}"/>
|
171
|
+
<param name="movie" value="#{options[:asset_url]}/#{swf_file}"/>
|
172
|
+
<param name="Flashvars" value="#{xml_swf_path}&chart_id=#{options[:id]}"/>
|
173
|
+
<param name="menu" value="true"/>
|
174
|
+
<param name="allowFullScreen" value="true"/>
|
175
|
+
<param name="allowScriptAccess" value="#{options[:script_access]}"/>
|
176
|
+
<param name="quality" value="high"/>
|
177
|
+
<param name="play" value="true"/>
|
178
|
+
<param name="devicefont" value="false"/>
|
179
|
+
<embed scale="noscale"
|
180
|
+
allowfullscreen = "true"
|
181
|
+
allowscriptaccess = "#{options[:script_access]}"
|
182
|
+
bgcolor = "#{options[:bgcolor]}"
|
183
|
+
devicefont = "false"
|
184
|
+
flashvars = "#{xml_swf_path}&chart_id=#{options[:id]}"
|
185
|
+
menu = "true"
|
186
|
+
name = "#{options[:id]}"
|
187
|
+
play = "true"
|
188
|
+
pluginspage = "#{plugin_url}"
|
189
|
+
quality = "high"
|
190
|
+
salign = "#{options[:salign]}"
|
191
|
+
src = "#{options[:asset_url]}/#{swf_file}"
|
192
|
+
type = "#{mime}"
|
193
|
+
wmode = "#{options[:wmode]}"
|
194
|
+
align = "#{options[:align]}"
|
195
|
+
height = "#{options[:height]}"
|
196
|
+
width = "#{options[:width]}"/>
|
197
|
+
</object>
|
198
|
+
TAGS
|
199
|
+
end
|
200
|
+
end
|