├── .devcontainer └── devcontainer.json ├── .editorconfig ├── .github ├── ISSUE_TEMPLATE.md ├── ISSUE_TEMPLATE │ └── report.yml └── workflows │ └── ci.yml ├── .gitignore ├── .rubocop.yml ├── .yardopts ├── CHANGELOG.md ├── Dockerfile ├── Gemfile ├── MIT-LICENSE ├── README.md ├── Rakefile ├── Steepfile ├── assets └── fonts │ ├── LICENSE.txt │ ├── Roboto-Bold.ttf │ └── Roboto-Regular.ttf ├── before_install_linux.sh ├── docker-build.sh ├── docker-launch.sh ├── gruff.gemspec ├── init.rb ├── lib ├── gruff.rb └── gruff │ ├── accumulator_bar.rb │ ├── area.rb │ ├── bar.rb │ ├── base.rb │ ├── bezier.rb │ ├── box.rb │ ├── bubble.rb │ ├── bullet.rb │ ├── candlestick.rb │ ├── dot.rb │ ├── font.rb │ ├── helper │ ├── bar_conversion.rb │ ├── bar_mixin.rb │ ├── bar_value_label.rb │ └── stacked_mixin.rb │ ├── histogram.rb │ ├── line.rb │ ├── mini │ ├── bar.rb │ ├── legend.rb │ ├── pie.rb │ └── side_bar.rb │ ├── net.rb │ ├── patch │ ├── rmagick.rb │ └── string.rb │ ├── pie.rb │ ├── renderer │ ├── bezier.rb │ ├── circle.rb │ ├── dash_line.rb │ ├── dot.rb │ ├── ellipse.rb │ ├── line.rb │ ├── polygon.rb │ ├── polyline.rb │ ├── rectangle.rb │ ├── renderer.rb │ └── text.rb │ ├── scatter.rb │ ├── side_bar.rb │ ├── side_stacked_bar.rb │ ├── spider.rb │ ├── stacked_area.rb │ ├── stacked_bar.rb │ ├── store │ ├── basic_data.rb │ ├── store.rb │ ├── xy_data.rb │ └── xy_pointsizes_data.rb │ ├── themes.rb │ └── version.rb ├── rails_generators └── gruff │ ├── gruff_generator.rb │ └── templates │ ├── controller.rb │ └── functional_test.rb ├── sig └── generated │ ├── gruff.rbs │ └── gruff │ ├── accumulator_bar.rbs │ ├── area.rbs │ ├── bar.rbs │ ├── base.rbs │ ├── bezier.rbs │ ├── box.rbs │ ├── bubble.rbs │ ├── bullet.rbs │ ├── candlestick.rbs │ ├── dot.rbs │ ├── font.rbs │ ├── helper │ ├── bar_conversion.rbs │ ├── bar_mixin.rbs │ ├── bar_value_label.rbs │ └── stacked_mixin.rbs │ ├── histogram.rbs │ ├── line.rbs │ ├── net.rbs │ ├── pie.rbs │ ├── renderer │ ├── bezier.rbs │ ├── circle.rbs │ ├── dash_line.rbs │ ├── dot.rbs │ ├── ellipse.rbs │ ├── line.rbs │ ├── polyline.rbs │ ├── rectangle.rbs │ ├── renderer.rbs │ └── text.rbs │ ├── scatter.rbs │ ├── side_bar.rbs │ ├── side_stacked_bar.rbs │ ├── spider.rbs │ ├── stacked_area.rbs │ ├── stacked_bar.rbs │ ├── store │ ├── basic_data.rbs │ ├── store.rbs │ ├── xy_data.rbs │ └── xy_pointsizes_data.rbs │ ├── themes.rbs │ └── version.rbs └── test ├── expected ├── TestLabelsForNullData.png ├── accum_bar.png ├── accum_bar_duck_typing.png ├── accum_bar_empty_data.png ├── accum_bar_empty_data_nil.png ├── accum_bar_empty_data_nil_2.png ├── area_duck_typing.png ├── area_empty_data.png ├── area_fill_opacity.png ├── area_keynote.png ├── area_keynote_small.png ├── area_many.png ├── area_many_areas_small.png ├── area_tiny.png ├── area_wide.png ├── bar2_wrapped_legend_16_400.png ├── bar2_wrapped_legend_16_800.png ├── bar2_wrapped_legend_30_400.png ├── bar2_wrapped_legend_30_800.png ├── bar2_wrapped_legend_4_400.png ├── bar2_wrapped_legend_4_800.png ├── bar2_wrapped_legend__400.png ├── bar2_wrapped_legend__800.png ├── bar_axis_label_with_hide_line_markers.png ├── bar_axis_label_with_legend_at_bottom.png ├── bar_background_gradient_bottom_top.png ├── bar_background_gradient_left_right.png ├── bar_background_gradient_right_left.png ├── bar_background_gradient_top_bottom.png ├── bar_background_gradient_topleft_bottomright.png ├── bar_background_gradient_topright_bottomleft.png ├── bar_duck_typing.png ├── bar_empty_data.png ├── bar_formatted_numbers.png ├── bar_group_spacing.png ├── bar_keynote.png ├── bar_keynote_small.png ├── bar_label_format.png ├── bar_legend_at_bottom_wrapped_legend_16_400.png ├── bar_legend_at_bottom_wrapped_legend_16_800.png ├── bar_legend_at_bottom_wrapped_legend_30_400.png ├── bar_legend_at_bottom_wrapped_legend_30_800.png ├── bar_legend_at_bottom_wrapped_legend_4_400.png ├── bar_legend_at_bottom_wrapped_legend_4_800.png ├── bar_legend_at_bottom_wrapped_legend__400.png ├── bar_legend_at_bottom_wrapped_legend__800.png ├── bar_long_legend_text.png ├── bar_manual_colors.png ├── bar_marker_shadow.png ├── bar_nearly_zero_max_10.png ├── bar_negative_value_labels.png ├── bar_no_labels.png ├── bar_no_legend.png ├── bar_no_line_markers.png ├── bar_no_line_markers_or_labels.png ├── bar_no_title.png ├── bar_no_title_or_legend.png ├── bar_odeo.png ├── bar_one_value.png ├── bar_pos_neg.png ├── bar_rails_keynote.png ├── bar_set_absolute_trunc.png ├── bar_set_label_stagger_height.png ├── bar_set_legend_box_size_lg.png ├── bar_set_legend_box_size_sm.png ├── bar_set_marker.png ├── bar_set_trailing_dots_trunc.png ├── bar_spacing_full.png ├── bar_spacing_half.png ├── bar_spacing_none.png ├── bar_tall_graph.png ├── bar_tall_graph_small.png ├── bar_themed.png ├── bar_title_margin.png ├── bar_value_labels.png ├── bar_wide_graph.png ├── bar_wide_graph_small.png ├── bar_wrapped_legend_16_400.png ├── bar_wrapped_legend_16_800.png ├── bar_wrapped_legend_30_400.png ├── bar_wrapped_legend_30_800.png ├── bar_wrapped_legend_4_400.png ├── bar_wrapped_legend_4_800.png ├── bar_wrapped_legend__400.png ├── bar_wrapped_legend__800.png ├── bar_x_y_labels.png ├── bar_y_increment_1.png ├── bar_y_increment_2.0.png ├── bar_y_increment_20.png ├── bar_y_increment_5.png ├── bar_zero_marker_count.png ├── bar_zero_spacing.png ├── base_add_color.png ├── base_attribute_margins.png ├── base_bold_title.png ├── base_font.png ├── base_label_rotation_1.png ├── base_label_rotation_2.png ├── base_label_rotation_legend_at_bottom_xy_axis_label.png ├── base_labels_with_array.png ├── base_legend_with_no_name.png ├── base_margins.png ├── base_multi_line_title.png ├── base_no_data_font_size.png ├── base_object_labels.png ├── base_title_font_size.png ├── bezier.png ├── bezier_2.png ├── bezier_3.png ├── bezier_4.png ├── bezier_duck_typing.png ├── bezier_empty_data.png ├── box.png ├── box_empty_data.png ├── box_outliers.png ├── box_spacing_factor.png ├── bubble.png ├── bullet_greyscale.png ├── bullet_no_options.png ├── bullet_target_width.png ├── candlestick.png ├── candlestick_empty_data.png ├── candlestick_show_vertical_markers.png ├── candlestick_spacing_factor.png ├── dot.png ├── dot_duck_typing.png ├── dot_empty_data.png ├── dot_manual_colors.png ├── dot_marker_shadow_color.png ├── dot_nearly_zero_max_10.png ├── dot_no_labels.png ├── dot_no_legend.png ├── dot_no_line_markers.png ├── dot_no_title.png ├── dot_no_title_or_legend.png ├── dot_one_value.png ├── dot_pos_neg.png ├── dot_set_legend_box_size_lg.png ├── dot_set_legend_box_size_sm.png ├── dot_set_marker.png ├── dot_set_trailing_dots_trunc.png ├── dot_small.png ├── dot_tall_graph.png ├── dot_tall_graph_small.png ├── dot_themed.png ├── dot_wide_graph.png ├── dot_wide_graph_small.png ├── dot_x_y_labels.png ├── dot_y_increment_1.png ├── dot_y_increment_2.0.png ├── dot_y_increment_20.png ├── dot_y_increment_5.png ├── enhancements.png ├── enhancements_dot.png ├── histogram.png ├── histogram_bin_width_after_data_method.png ├── histogram_duck_typing.png ├── histogram_empty_data.png ├── histogram_minmax.png ├── line_all_neg.png ├── line_all_neg_400.png ├── line_all_neg_no_max.png ├── line_baseline.png ├── line_dot_style_diamond.png ├── line_dot_style_square.png ├── line_duck_typing.png ├── line_empty_data.png ├── line_hang_value.png ├── line_hide_dots.png ├── line_hide_line_numbers.png ├── line_hide_lines.png ├── line_jruby_error.png ├── line_large.png ├── line_large_baseline.png ├── line_legend_at_bottom.png ├── line_legend_at_bottom_no_title.png ├── line_many.png ├── line_many_lines_small.png ├── line_many_numbers.png ├── line_marker_label_accuracy.png ├── line_marker_x_count.png ├── line_more_sets_than_colors.png ├── line_no_data.png ├── line_no_data_msg.png ├── line_no_data_other.png ├── line_no_data_with_empty.png ├── line_no_hide.png ├── line_no_legend.png ├── line_no_line_markers.png ├── line_no_title.png ├── line_nothing_but_the_graph.png ├── line_one_value.png ├── line_one_value_array.png ├── line_pos_neg.png ├── line_pos_neg_400.png ├── line_reference_lines.png ├── line_show_vertical_markers.png ├── line_similar_high_end_values.png ├── line_similar_high_end_values_with_floor.png ├── line_small_small_zero.png ├── line_small_values.png ├── line_small_values_small.png ├── line_small_zero.png ├── line_some_nil_points.png ├── line_sorted_drawing.png ├── line_theme_37signals_.png ├── line_theme_37signals_400.png ├── line_theme_keynote_.png ├── line_theme_keynote_400.png ├── line_theme_odeo_.png ├── line_theme_odeo_400.png ├── line_theme_rails_keynote_.png ├── line_theme_rails_keynote_400.png ├── line_tiny.png ├── line_transparent.png ├── line_very_small.png ├── line_webp.webp ├── line_wide_graph.png ├── line_wide_graph_small.png ├── line_xy.png ├── line_xy_color.png ├── line_xy_pairs.png ├── line_xy_pairs_color.png ├── line_y_axis_increment.png ├── mini_bar.png ├── mini_bar_duck_typing.png ├── mini_bar_large_legend.png ├── mini_pie.png ├── mini_pie_duck_typing.png ├── mini_pie_right_legend.png ├── mini_side_bar.png ├── mini_side_bar_duck_typing.png ├── mini_side_bar_multi_color.png ├── net_dots_tiny.png ├── net_duck_typing.png ├── net_empty_data.png ├── net_large.png ├── net_many.png ├── net_many_nets_small.png ├── net_no_data.png ├── net_no_data_msg.png ├── net_no_data_other.png ├── net_no_data_with_empty.png ├── net_no_legend.png ├── net_no_net_markers.png ├── net_no_title.png ├── net_nothing_but_the_graph.png ├── net_similar_high_end_values.png ├── net_small.png ├── net_small_small.png ├── net_small_small_zero.png ├── net_small_zero.png ├── net_wide_graph.png ├── net_wide_graph_small.png ├── pie_adjusted_text_offset_percentage.png ├── pie_duck_typing.png ├── pie_empty_data.png ├── pie_equal.png ├── pie_grey.png ├── pie_keynote.png ├── pie_keynote_small.png ├── pie_label_format.png ├── pie_legend.png ├── pie_legend_small.png ├── pie_nearly_equal.png ├── pie_no_data.png ├── pie_no_data_msg.png ├── pie_no_data_with_empty.png ├── pie_one_val.png ├── pie_pastel.png ├── pie_simple.png ├── pie_start_degree.png ├── pie_wide.png ├── pie_wrapped_legend_16_400.png ├── pie_wrapped_legend_16_800.png ├── pie_wrapped_legend_30_400.png ├── pie_wrapped_legend_30_800.png ├── pie_wrapped_legend_4_400.png ├── pie_wrapped_legend_4_800.png ├── pie_wrapped_legend__400.png ├── pie_wrapped_legend__800.png ├── pie_zero.png ├── scatter_all_neg.png ├── scatter_all_neg_400.png ├── scatter_basic.png ├── scatter_custom_label_format.png ├── scatter_duck_typing.png ├── scatter_hide_line_numbers.png ├── scatter_many.png ├── scatter_no_data.png ├── scatter_no_data_msg.png ├── scatter_no_data_other.png ├── scatter_no_hide.png ├── scatter_no_labels.png ├── scatter_no_legend.png ├── scatter_no_line_markers.png ├── scatter_no_title.png ├── scatter_nothing_but_the_graph.png ├── scatter_pos_neg.png ├── scatter_pos_neg_400.png ├── scatter_show_vertical_markers.png ├── scatter_wide_graph.png ├── scatter_wide_graph_small.png ├── scatter_x_axis_increment.png ├── scatter_xy.png ├── side_bar.png ├── side_bar_all_neg.png ├── side_bar_axis_label_with_hide_line_markers.png ├── side_bar_axis_label_with_legend_at_bottom.png ├── side_bar_data_range.png ├── side_bar_duck_typing.png ├── side_bar_empty_data.png ├── side_bar_group_spacing.png ├── side_bar_label_format.png ├── side_bar_labels.png ├── side_bar_labels_position.png ├── side_bar_no_labels.png ├── side_bar_no_line_markers.png ├── side_bar_no_line_markers_or_labels.png ├── side_bar_pos_neg.png ├── side_bar_set_trailing_dots_trunc.png ├── side_bar_spacing_full.png ├── side_bar_spacing_half.png ├── side_bar_spacing_none.png ├── side_stacked_bar_axis_label_with_hide_line_markers.png ├── side_stacked_bar_axis_label_with_legend_at_bottom.png ├── side_stacked_bar_duck_typing.png ├── side_stacked_bar_empty_data.png ├── side_stacked_bar_keynote.png ├── side_stacked_bar_keynote_small.png ├── side_stacked_bar_label_format.png ├── side_stacked_bar_labels.png ├── side_stacked_bar_long_label.png ├── side_stacked_bar_no_labels.png ├── side_stacked_bar_no_line_markers.png ├── side_stacked_bar_no_line_markers_or_labels.png ├── side_stacked_bar_overlap_coordinate_axes.png ├── side_stacked_bar_wide.png ├── spider_37signals.png ├── spider_duck_typing.png ├── spider_empty_data.png ├── spider_equal.png ├── spider_keynote.png ├── spider_legend.png ├── spider_legend_small.png ├── spider_lots_of_data.png ├── spider_lots_of_data_normal_names.png ├── spider_nearly_equal.png ├── spider_no_axes.png ├── spider_no_background.png ├── spider_no_print.png ├── spider_overlay_1.png ├── spider_overlay_2.png ├── spider_rotation.png ├── spider_small.png ├── spider_wide.png ├── spider_zero.png ├── stacked_area_duck_typing.png ├── stacked_area_empty_data.png ├── stacked_area_keynote.png ├── stacked_area_keynote_small.png ├── stacked_bar_axis_label_with_hide_line_markers.png ├── stacked_bar_axis_label_with_legend_at_bottom.png ├── stacked_bar_duck_typing.png ├── stacked_bar_empty_data.png ├── stacked_bar_keynote.png ├── stacked_bar_keynote_no_space.png ├── stacked_bar_keynote_small.png ├── stacked_bar_label_format.png ├── stacked_bar_no_labels.png ├── stacked_bar_no_line_markers.png ├── stacked_bar_no_line_markers_or_labels.png ├── theme_37signals.png ├── theme_greyscale.png ├── theme_keynote.png ├── theme_odeo.png ├── theme_pastel.png └── theme_rails_keynote.png ├── fixtures ├── ComicNeue-Regular.ttf ├── Pacifico-Regular.ttf ├── Roboto-Light.ttf └── pc306715.jpg ├── gruff_test_case.rb ├── support └── appearance_assertion.rb ├── test_accumulator_bar.rb ├── test_area.rb ├── test_bar.rb ├── test_base.rb ├── test_bezier.rb ├── test_box.rb ├── test_bubble.rb ├── test_bullet.rb ├── test_candlestick.rb ├── test_dot.rb ├── test_histogram.rb ├── test_labels_for_null_data.rb ├── test_legend.rb ├── test_line.rb ├── test_mini_bar.rb ├── test_mini_pie.rb ├── test_mini_side_bar.rb ├── test_net.rb ├── test_pie.rb ├── test_render_text.rb ├── test_scatter.rb ├── test_side_bar.rb ├── test_sidestacked_bar.rb ├── test_spider.rb ├── test_stacked_area.rb ├── test_stacked_bar.rb └── test_themes.rb /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: 2 | // https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/docker-existing-dockerfile 3 | { 4 | "name": "Existing Dockerfile", 5 | 6 | // Sets the run context to one level up instead of the .devcontainer folder. 7 | "context": "..", 8 | 9 | // Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. 10 | "dockerFile": "../Dockerfile" 11 | 12 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 13 | // "forwardPorts": [], 14 | 15 | // Uncomment the next line to run commands after the container is created - for example installing curl. 16 | // "postCreateCommand": "apt-get update && apt-get install -y curl", 17 | 18 | // Uncomment when using a ptrace-based debugger like C++, Go, and Rust 19 | // "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ], 20 | 21 | // Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker. 22 | // "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ], 23 | 24 | // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root. 25 | // "remoteUser": "vscode" 26 | } 27 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs 2 | # @see http://editorconfig.org 3 | root = true 4 | 5 | [*] 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | indent_style = space 11 | tab_width = 2 12 | 13 | [*.{rb,yml,md}] 14 | indent_size = 2 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | 4 | ### Steps to Reproduce 5 | 7 | 8 | ### System Configuration 9 | 10 | 11 | - ImageMagick version: 12 | - RMagick version: 13 | - Gruff version: 14 | - Ruby version: 15 | - Environment (Operating system, version and so on): 16 | - Additional information: 17 | 18 | 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/report.yml: -------------------------------------------------------------------------------- 1 | name: Report 2 | description: Create a report. 3 | body: 4 | - type: textarea 5 | id: description 6 | attributes: 7 | label: Description 8 | description: A description of the bug or feature. 9 | validations: 10 | required: true 11 | - type: textarea 12 | id: reproduce 13 | attributes: 14 | label: Steps to Reproduce 15 | description: | 16 | List of steps, sample code, failing test or link to a project that reproduces the behavior. 17 | Make sure you place a stack trace inside a code (```) block to avoid linking unrelated issues. 18 | validations: 19 | required: true 20 | - type: textarea 21 | id: environment 22 | attributes: 23 | label: System Configuration 24 | description: Tell us about the environment where you are experiencing the bug. 25 | value: | 26 | - ImageMagick version: 27 | - RMagick version: 28 | - Gruff version: 29 | - Ruby version: 30 | - Environment (Operating system, version and so on): 31 | - Additional information: 32 | render: markdown 33 | validations: 34 | required: true 35 | - type: textarea 36 | id: additional-context 37 | attributes: 38 | label: Additional context 39 | description: Add any other context about the problem here. 40 | validations: 41 | required: false 42 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | /.idea/ 3 | /pkg/ 4 | /doc/ 5 | /coverage/ 6 | /vendor/ 7 | /test/output/ 8 | /test/output_java/ 9 | .DS_Store 10 | .bundle 11 | .yardoc 12 | Gemfile.lock 13 | -------------------------------------------------------------------------------- /.yardopts: -------------------------------------------------------------------------------- 1 | --no-private 2 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:24.04 2 | 3 | RUN apt update && \ 4 | apt install -y tzdata sudo && \ 5 | apt install -y make build-essential git bzip2 wget zlib1g-dev libgdbm-dev libreadline-dev libffi-dev 6 | 7 | RUN git clone --depth 1 https://github.com/rbenv/ruby-build.git && \ 8 | cd ruby-build/bin && ./ruby-build 3.0.7 /usr/local 9 | 10 | RUN mkdir /tmp/gruff 11 | WORKDIR /tmp/gruff 12 | ADD Gemfile /tmp/gruff/Gemfile 13 | ADD gruff.gemspec /tmp/gruff/gruff.gemspec 14 | ADD lib /tmp/gruff/lib/ 15 | ADD before_install_linux.sh /tmp/gruff/before_install_linux.sh 16 | 17 | ENV IMAGEMAGICK_VERSION=7.1.1-33 18 | RUN bash /tmp/gruff/before_install_linux.sh && \ 19 | rm -rf /var/lib/apt/lists/* && \ 20 | gem install bundler:2.5.7 && \ 21 | bundle install 22 | 23 | WORKDIR /opt/gruff 24 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | source 'https://rubygems.org' 4 | 5 | # Specify your gem's dependencies in gruff.gemspec 6 | gemspec 7 | 8 | unless defined? JRUBY_VERSION 9 | gem 'rubocop', '~> 1.66' 10 | gem 'rubocop-minitest', '~> 0.36' 11 | gem 'rubocop-performance', '~> 1.21' 12 | gem 'rubocop-rake', '~> 0.6' 13 | end 14 | 15 | gem 'minitest-reporters' 16 | gem 'rake' 17 | gem 'simplecov' 18 | gem 'yard', '~> 0.9.28' 19 | 20 | if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1') && !RUBY_PLATFORM.include?('java') 21 | gem 'rbs-inline', '~> 0.11' 22 | gem 'steep', '~> 1.10' 23 | end 24 | -------------------------------------------------------------------------------- /MIT-LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2005-2012 Topfunky Corporation boss@topfunky.com 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'bundler/gem_tasks' 4 | require 'rake/testtask' 5 | require 'rake/clean' 6 | 7 | CLEAN << 'pkg' 8 | CLEAN << 'test/output/*' 9 | 10 | desc 'Run tests' 11 | task default: :test 12 | 13 | Rake::TestTask.new 14 | 15 | namespace :rbs do 16 | desc 'Update RBS signatures' 17 | task :update do 18 | sh 'bundle exec rbs-inline --output lib' 19 | end 20 | end 21 | 22 | namespace :test do 23 | desc 'Update expected image with output' 24 | task :'image:update' do 25 | require 'rmagick' 26 | require 'fileutils' 27 | 28 | update_expected_images = lambda do |expect_dir, output_dir| 29 | Dir.glob("#{output_dir}/*.png").each do |output_path| 30 | file_name = File.basename(output_path) 31 | expected_path = "#{expect_dir}/#{file_name}" 32 | 33 | error = nil 34 | output_image = Magick::Image.read(output_path).first 35 | 36 | if File.exist?(expected_path) 37 | expected_image = Magick::Image.read(expected_path).first 38 | retry_count = 0 39 | begin 40 | _, error = expected_image.compare_channel(output_image, Magick::PeakAbsoluteErrorMetric) 41 | rescue StandardError => e 42 | GC.start 43 | if retry_count < 5 44 | retry_count += 1 45 | retry 46 | else 47 | raise e 48 | end 49 | end 50 | end 51 | 52 | if error != 0.0 53 | FileUtils.copy(output_path, expected_path) 54 | end 55 | end 56 | end 57 | 58 | update_expected_images.call('test/expected', 'test/output') 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /Steepfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | D = Steep::Diagnostic 4 | 5 | target :lib do 6 | signature 'sig' 7 | 8 | check 'lib' 9 | 10 | library 'bigdecimal' 11 | 12 | configure_code_diagnostics(D::Ruby.lenient) 13 | end 14 | -------------------------------------------------------------------------------- /assets/fonts/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/assets/fonts/Roboto-Bold.ttf -------------------------------------------------------------------------------- /assets/fonts/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/assets/fonts/Roboto-Regular.ttf -------------------------------------------------------------------------------- /before_install_linux.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euox pipefail 4 | 5 | if [ -v STYLE_CHECKS ]; then 6 | set +ux 7 | exit 0 8 | fi 9 | 10 | if [ ! -v IMAGEMAGICK_VERSION ]; then 11 | echo "you must specify an ImageMagick version." 12 | echo "example: 'IMAGEMAGICK_VERSION=6.8.9-10 bash ./before_install_linux.sh'" 13 | exit 1 14 | fi 15 | 16 | sudo apt-get update 17 | 18 | # remove all existing imagemagick related packages 19 | sudo apt-get autoremove -y imagemagick* libmagick* --purge 20 | 21 | # install build tools, ImageMagick delegates 22 | sudo apt-get install -y build-essential libx11-dev libxext-dev zlib1g-dev \ 23 | liblcms2-dev libpng-dev libjpeg-dev libfreetype6-dev \ 24 | libtiff5-dev libwebp-dev liblqr-1-0-dev vim gsfonts ghostscript 25 | 26 | project_dir=$(pwd) 27 | build_dir="${project_dir}/build-ImageMagick/ImageMagick-${IMAGEMAGICK_VERSION}" 28 | if [ -v CONFIGURE_OPTIONS ]; then 29 | build_dir="${build_dir}-${CONFIGURE_OPTIONS}" 30 | fi 31 | 32 | build_imagemagick() { 33 | mkdir -p build-ImageMagick 34 | 35 | version=(${IMAGEMAGICK_VERSION//./ }) 36 | wget "https://imagemagick.org/archive/releases/ImageMagick-${IMAGEMAGICK_VERSION}.tar.xz" 37 | tar -xf "ImageMagick-${IMAGEMAGICK_VERSION}.tar.xz" 38 | rm "ImageMagick-${IMAGEMAGICK_VERSION}.tar.xz" 39 | mv "ImageMagick-${IMAGEMAGICK_VERSION}" "${build_dir}" 40 | 41 | options="--with-magick-plus-plus=no --disable-docs" 42 | if [ -v CONFIGURE_OPTIONS ]; then 43 | options="${CONFIGURE_OPTIONS} ${options}" 44 | fi 45 | 46 | cd "${build_dir}" 47 | ./configure --prefix=/usr "${options}" 48 | make -j $(nproc) 49 | } 50 | 51 | if [ ! -d "${build_dir}" ]; then 52 | build_imagemagick 53 | fi 54 | 55 | cd "${build_dir}" 56 | sudo make install -j $(nproc) 57 | cd "${project_dir}" 58 | 59 | sudo ldconfig 60 | 61 | set +ux 62 | -------------------------------------------------------------------------------- /docker-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | script_dir=$(cd $(dirname ${BASH_SOURCE:-$0}); pwd) 4 | docker build -t gruff ${script_dir} 5 | -------------------------------------------------------------------------------- /docker-launch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | project_dir="$(cd $(dirname ${BASH_SOURCE:-$0}); pwd)/" 4 | docker run -v $project_dir:/opt/gruff --rm -it gruff bash 5 | -------------------------------------------------------------------------------- /gruff.gemspec: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | lib = File.expand_path('lib') 4 | $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) 5 | require 'date' 6 | require 'gruff/version' 7 | 8 | Gem::Specification.new do |s| 9 | s.name = 'gruff' 10 | s.version = Gruff::VERSION 11 | s.authors = ['Geoffrey Grosenbach', 'Uwe Kubosch'] 12 | s.description = 'Beautiful graphs for one or multiple datasets. Can be used on websites or in documents.' 13 | s.email = 'boss@topfunky.com' 14 | s.files = `git ls-files`.split.grep_v(/^test|^docker|^before_install_linux.sh|^Rakefile|^Steepfile/i) 15 | s.homepage = 'https://github.com/topfunky/gruff' 16 | s.require_paths = %w[lib] 17 | s.summary = 'Beautiful graphs for one or multiple datasets.' 18 | s.license = 'MIT' 19 | s.executables = s.files.grep(%r{^bin/}).map { |f| File.basename(f) } 20 | 21 | if defined? JRUBY_VERSION 22 | s.platform = 'java' 23 | s.add_dependency 'rmagick4j' 24 | else 25 | s.add_dependency 'rmagick', '>= 5.5' 26 | end 27 | s.add_dependency 'bigdecimal', '>= 3.0' 28 | s.add_dependency 'histogram' 29 | s.required_ruby_version = '>= 3.0.0' 30 | 31 | s.metadata['bug_tracker_uri'] = 'https://github.com/topfunky/gruff/issues' 32 | s.metadata['changelog_uri'] = 'https://github.com/topfunky/gruff/blob/master/CHANGELOG.md' 33 | s.metadata['rubygems_mfa_required'] = 'true' 34 | end 35 | -------------------------------------------------------------------------------- /init.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # For Rails 4 | require 'gruff' 5 | -------------------------------------------------------------------------------- /lib/gruff/accumulator_bar.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | # 6 | # Gruff::AccumulatorBar is a special bar graph that shows a 7 | # single dataset as a set of stacked bars. 8 | # The bottom bar shows the running total and the top bar shows 9 | # the new value being added to the array. 10 | # 11 | # Here's how to set up a Gruff::AccumulatorBar. 12 | # 13 | # g = Gruff::AccumulatorBar.new 14 | # g.title = 'Your Savings' 15 | # g.data 'First', [1, 1, 1] 16 | # g.write('accumulator_bar.png') 17 | # 18 | class Gruff::AccumulatorBar < Gruff::StackedBar 19 | private 20 | 21 | def setup_data 22 | raise(Gruff::IncorrectNumberOfDatasetsException) unless store.length == 1 23 | 24 | accum_array = store.data.first.points[0..-2].reduce([0]) { |a, v| a << (a.last + v.to_f) } # steep:ignore 25 | data 'Accumulator', accum_array 26 | set_colors 27 | store.reverse! 28 | super 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /lib/gruff/area.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | # 6 | # Gruff::Area provides an area graph which displays graphically 7 | # quantitative data. 8 | # 9 | # Here's how to set up a Gruff::Area. 10 | # 11 | # g = Gruff::Area.new 12 | # g.title = 'Area Graph' 13 | # g.data :Jimmy, [25, 36, 86, 39, 25, 31, 79, 88] 14 | # g.data :Charles, [80, 54, 67, 54, 68, 70, 90, 95] 15 | # g.data :Julie, [22, 29, 35, 38, 36, 40, 46, 57] 16 | # g.write('area.png') 17 | # 18 | class Gruff::Area < Gruff::Base 19 | # Specifies the filling opacity in area graph. Default is +0.85+. 20 | attr_writer :fill_opacity #: Float | Integer 21 | 22 | # Specifies the stroke width in line around area graph. Default is +2.0+. 23 | attr_writer :stroke_width #: Float | Integer 24 | 25 | private 26 | 27 | def initialize_attributes 28 | super 29 | @sorted_drawing = true 30 | @fill_opacity = 0.85 31 | @stroke_width = 2.0 32 | end 33 | 34 | def draw_graph 35 | x_increment = (@graph_width / (column_count - 1)).to_f 36 | 37 | store.norm_data.each do |data_row| 38 | next if data_row.points.empty? 39 | 40 | poly_points = [] 41 | 42 | data_row.points.each_with_index do |data_point, index| 43 | data_point = data_point.to_f 44 | # Use incremented x and scaled y 45 | new_x = @graph_left + (x_increment * index) 46 | new_y = @graph_top + (@graph_height - (data_point * @graph_height)) 47 | 48 | poly_points << new_x 49 | poly_points << new_y 50 | 51 | draw_label(new_x, index) 52 | end 53 | 54 | # Add closing points, draw polygon 55 | poly_points << @graph_right 56 | poly_points << (@graph_bottom - 1) 57 | poly_points << @graph_left 58 | poly_points << (@graph_bottom - 1) 59 | 60 | Gruff::Renderer::Polygon.new(renderer, color: data_row.color, width: @stroke_width, opacity: @fill_opacity).render(poly_points) 61 | end 62 | end 63 | end 64 | -------------------------------------------------------------------------------- /lib/gruff/bezier.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | # 6 | # Gruff::Bezier is a special line graph that have 7 | # the bezier curve. 8 | # 9 | # Here's how to set up a Gruff::Bezier. 10 | # 11 | # dataset = [ 12 | # +0.00, +0.09, +0.19, +0.29, +0.38, +0.47, +0.56, +0.64, +0.71, +0.78, 13 | # +0.84, +0.89, +0.93, +0.96, +0.98, +0.99, +0.99, +0.99, +0.97, +0.94, 14 | # +0.90, +0.86, +0.80, +0.74, +0.67, +0.59, +0.51, +0.42, +0.33, +0.23, 15 | # +0.14, +0.04, -0.06, -0.16, -0.26, -0.36, -0.45, -0.53, -0.62, -0.69, 16 | # -0.76, -0.82, -0.88, -0.92, -0.96, -0.98, -1.00, -1.00, -1.00, -0.99, 17 | # -0.96, -0.93, -0.89, -0.84, -0.78, -0.71, -0.64, -0.56, -0.47, -0.38, 18 | # ] 19 | # g = Gruff::Bezier.new 20 | # g.data 'sin', dataset 21 | # g.write('bezier.png') 22 | # 23 | class Gruff::Bezier < Gruff::Base 24 | private 25 | 26 | def draw_graph 27 | x_increment = (@graph_width / (column_count - 1)).to_f 28 | 29 | renderer_class = RUBY_PLATFORM == 'java' ? Gruff::Renderer::Polyline : Gruff::Renderer::Bezier 30 | stroke_width = clip_value_if_greater_than(@columns / (store.norm_data.first.points.size * 4.0), 5.0) 31 | 32 | store.norm_data.each do |data_row| 33 | next if data_row.points.empty? 34 | 35 | poly_points = [] 36 | 37 | data_row.points.each_with_index do |data_point, index| 38 | data_point = data_point.to_f 39 | # Use incremented x and scaled y 40 | new_x = @graph_left + (x_increment * index) 41 | new_y = @graph_top + (@graph_height - (data_point * @graph_height)) 42 | 43 | if index == 0 && RUBY_PLATFORM != 'java' 44 | poly_points << new_x 45 | poly_points << new_y 46 | end 47 | 48 | poly_points << new_x 49 | poly_points << new_y 50 | 51 | draw_label(new_x, index) 52 | end 53 | 54 | renderer_class.new(renderer, color: data_row.color, width: stroke_width).render(poly_points) 55 | end 56 | end 57 | end 58 | -------------------------------------------------------------------------------- /lib/gruff/font.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | # Handle font setting to draw texts 6 | class Gruff::Font 7 | BOLD_PATH = File.expand_path(File.join(__FILE__, '../../../assets/fonts/Roboto-Bold.ttf')).freeze 8 | private_constant :BOLD_PATH 9 | 10 | REGULAR_PATH = File.expand_path(File.join(__FILE__, '../../../assets/fonts/Roboto-Regular.ttf')).freeze 11 | private_constant :REGULAR_PATH 12 | 13 | # Get/set font path. 14 | attr_accessor :path #: String 15 | 16 | # Get/set font size. 17 | attr_accessor :size #: Float | Integer 18 | 19 | # Get/set font setting whether render bold text. 20 | attr_accessor :bold #: bool 21 | 22 | # Get/set font color. 23 | attr_accessor :color #: String 24 | 25 | # @rbs path: String | nil 26 | # @rbs size: Float | Integer 27 | # @rbs bold: bool 28 | # @rbs color: String 29 | def initialize(path: nil, size: 20.0, bold: false, color: 'white') 30 | @path = path 31 | @bold = bold 32 | @size = size 33 | @color = color 34 | end 35 | 36 | # Get font weight. 37 | # @return [Magick::WeightType] font weight 38 | # TODO: type annotation of return value 39 | def weight 40 | @bold ? Magick::BoldWeight : Magick::NormalWeight 41 | end 42 | 43 | # @private 44 | # @rbs return: String 45 | def file_path 46 | return @path if @path 47 | 48 | @bold ? BOLD_PATH : REGULAR_PATH 49 | end 50 | end 51 | -------------------------------------------------------------------------------- /lib/gruff/helper/bar_conversion.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | ## 6 | # Original Author: David Stokar 7 | # 8 | # This class performs the y coordinates conversion for the bar class. 9 | # 10 | # There are three cases: 11 | # 12 | # 1. Bars all go from zero in positive direction 13 | # 2. Bars all go from zero to negative direction 14 | # 3. Bars either go from zero to positive or from zero to negative 15 | # 16 | # @private 17 | class Gruff::BarConversion 18 | # @rbs top: Float | Integer 19 | # @rbs bottom: Float | Integer 20 | # @rbs minimum_value: Float | Integer 21 | # @rbs maximum_value: Float | Integer 22 | # @rbs spread: Float | Integer 23 | # @rbs return: void 24 | def initialize(top:, bottom:, minimum_value:, maximum_value:, spread:) 25 | @graph_top = top 26 | @graph_height = bottom - top 27 | @spread = spread 28 | @minimum_value = minimum_value 29 | @maximum_value = maximum_value 30 | 31 | if minimum_value >= 0 32 | # all bars go from zero to positive 33 | @mode = 1 34 | elsif maximum_value <= 0 35 | # all bars go from 0 to negative 36 | @mode = 2 37 | else 38 | # bars either go from zero to negative or to positive 39 | @mode = 3 40 | @zero = -minimum_value / @spread 41 | end 42 | end 43 | 44 | # @rbs data_point: Float | Integer 45 | # @rbs return: [Float, Float] 46 | def get_top_bottom_scaled(data_point) 47 | data_point = data_point.to_f 48 | result = [] 49 | 50 | case @mode 51 | when 1 52 | # minimum value >= 0 ( only positive values ) 53 | result[0] = @graph_top + (@graph_height * (1 - data_point)) 54 | result[1] = @graph_top + @graph_height 55 | when 2 56 | # only negative values 57 | result[0] = @graph_top 58 | result[1] = @graph_top + (@graph_height * (1 - data_point)) 59 | when 3 60 | # positive and negative values 61 | val = data_point - (@minimum_value / @spread) 62 | result[0] = @graph_top + (@graph_height * (1 - (val - @zero))) 63 | result[1] = @graph_top + (@graph_height * (1 - @zero)) 64 | end 65 | 66 | # TODO: Remove RBS type annotation 67 | result #: [Float, Float] 68 | end 69 | end 70 | -------------------------------------------------------------------------------- /lib/gruff/helper/bar_mixin.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | # @private 6 | module Gruff::Base::BarMixin 7 | # @rbs return: Array[Array[Gruff::Base::BarMixin::BarData]] 8 | def normalized_group_bars 9 | # steep:ignore:start 10 | @normalized_group_bars ||= begin 11 | group_bars = Array.new(column_count) { [] } 12 | store.norm_data.each_with_index do |data_row, row_index| 13 | data_row.points.each_with_index do |data_point, point_index| 14 | group_bars[point_index] << BarData.new(data_point, store.data[row_index].points[point_index], data_row.color) 15 | end 16 | 17 | # Adjust the number of each group with empty bar 18 | (data_row.points.size..(column_count - 1)).each do |index| 19 | group_bars[index] << BarData.new(0, nil, data_row.color) 20 | end 21 | end 22 | group_bars 23 | end 24 | # steep:ignore:end 25 | end 26 | 27 | # @private 28 | class BarData 29 | attr_accessor :point #: Float | Integer 30 | attr_accessor :value #: nil | Float | Integer 31 | attr_accessor :color #: String 32 | 33 | # @rbs point: Float | Integer 34 | # @rbs value: nil | Float | Integer 35 | # @rbs color: String 36 | # @rbs return: void 37 | def initialize(point, value, color) 38 | @point = point 39 | @value = value 40 | @color = color 41 | end 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /lib/gruff/helper/stacked_mixin.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | # @private 6 | module Gruff::Base::StackedMixin 7 | # Used by StackedBar and child classes. 8 | # 9 | # tsal: moved from Base 03 FEB 2007 10 | def calculate_maximum_by_stack 11 | # steep:ignore:start 12 | # Get sum of each stack 13 | max_hash = Hash.new { |h, k| h[k] = 0.0 } 14 | store.data.each do |data_set| 15 | data_set.points.each_with_index do |data_point, i| 16 | max_hash[i] += data_point.to_f 17 | end 18 | end 19 | 20 | max_hash.each_key do |key| 21 | self.maximum_value = max_hash[key] if max_hash[key] > maximum_value 22 | self.minimum_value = max_hash[key] if max_hash[key] < minimum_value 23 | end 24 | 25 | raise "Can't handle negative values in stacked graph" if minimum_value < 0 26 | # steep:ignore:end 27 | end 28 | 29 | # @rbs return: Array[Array[Gruff::Base::StackedMixin::BarData]] 30 | def normalized_stacked_bars 31 | # steep:ignore:start 32 | @normalized_stacked_bars ||= begin 33 | stacked_bars = Array.new(column_count) { [] } 34 | store.norm_data.each_with_index do |data_row, row_index| 35 | data_row.points.each_with_index do |data_point, point_index| 36 | stacked_bars[point_index] << BarData.new(data_point, store.data[row_index].points[point_index], data_row.color) 37 | end 38 | end 39 | stacked_bars 40 | end 41 | # steep:ignore:end 42 | end 43 | 44 | # @private 45 | class BarData 46 | attr_accessor :point #: Float | Integer 47 | attr_accessor :value #: Float | Integer 48 | attr_accessor :color #: String 49 | 50 | # @rbs point: Float | Integer 51 | # @rbs value: Float | Integer 52 | # @rbs color: String 53 | # @rbs return: void 54 | def initialize(point, value, color) 55 | @point = point 56 | @value = value 57 | @color = color 58 | end 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /lib/gruff/histogram.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | require 'histogram' 6 | 7 | # 8 | # Here's how to set up a Gruff::Histogram. 9 | # 10 | # g = Gruff::Histogram.new 11 | # g.title = 'Histogram Graph' 12 | # g.minimum_bin = 10 13 | # g.bin_width = 20 14 | # g.data :A, [10, 10, 20, 30, 40, 40, 40, 40, 40, 40, 50, 10, 10, 10] 15 | # g.data :B, [100, 100, 100, 100, 90, 90, 80, 30, 30, 30, 30, 30] 16 | # g.write('histogram.png') 17 | # 18 | class Gruff::Histogram < Gruff::Bar 19 | # Specifies interpolation between the min and max of the set. Default is +10+. 20 | attr_writer :bin_width #: Float | Integer 21 | 22 | # Specifies minimum value for bin. 23 | attr_writer :minimum_bin #: Float | Integer 24 | 25 | # Specifies maximum value for bin. 26 | attr_writer :maximum_bin #: Float | Integer 27 | 28 | # @rbs target_width: (String | Float | Integer) 29 | # @rbs return: void 30 | def initialize(target_width = DEFAULT_TARGET_WIDTH) 31 | super 32 | @data = [] 33 | end 34 | 35 | # @rbs name: String | Symbol 36 | # @rbs data_points: Array[Float | Integer] | nil 37 | # @rbs color: String 38 | def data(name, data_points = [], color = nil) 39 | @data << [name, Array(data_points), color] 40 | end 41 | 42 | private 43 | 44 | def initialize_attributes 45 | super 46 | @bin_width = 10 47 | @minimum_bin = nil 48 | @maximum_bin = nil 49 | end 50 | 51 | def setup_data 52 | @data.each do |(name, data_points, color)| 53 | if data_points.empty? 54 | store.add(name, [], color) 55 | else 56 | bins, freqs = HistogramArray.new(data_points.compact).histogram(bin_width: @bin_width, min: @minimum_bin, max: @maximum_bin) # steep:ignore 57 | bins.each_with_index do |bin, index| 58 | @labels[index] = bin 59 | end 60 | store.add(name, freqs, color) 61 | end 62 | end 63 | 64 | super 65 | end 66 | 67 | # @private 68 | # @rbs inherits Array[Float | Integer | nil] 69 | class HistogramArray < Array 70 | # @rbs skip 71 | include ::Histogram 72 | end 73 | end 74 | -------------------------------------------------------------------------------- /lib/gruff/mini/bar.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # 4 | # Makes a small bar graph suitable for display at 200px or even smaller. 5 | # 6 | # Here's how to set up a Gruff::Mini::Bar. 7 | # 8 | # g = Gruff::Mini::Bar.new 9 | # g.title = 'Mini Bar Graph' 10 | # g.data :Art, [0, 5, 8, 15] 11 | # g.data :Philosophy, [10, 3, 2, 8] 12 | # g.data :Science, [2, 15, 8, 11] 13 | # g.write('mini_bar.png') 14 | # 15 | class Gruff::Mini::Bar < Gruff::Bar 16 | private 17 | 18 | include Gruff::Mini::Legend 19 | 20 | def initialize_attributes 21 | super 22 | 23 | @hide_legend = true 24 | @hide_title = true 25 | @hide_line_numbers = true 26 | 27 | @marker_font.size = 50.0 28 | @legend_font.size = 50.0 29 | 30 | @minimum_value = 0.0 31 | end 32 | 33 | def setup_data 34 | expand_canvas_for_vertical_legend # steep:ignore 35 | super 36 | end 37 | 38 | def draw_graph 39 | super 40 | draw_vertical_legend # steep:ignore 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /lib/gruff/mini/pie.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # 4 | # Makes a small pie graph suitable for display at 200px or even smaller. 5 | # 6 | # Here's how to set up a Gruff::Mini::Pie. 7 | # 8 | # g = Gruff::Mini::Pie.new 9 | # g.title = "Visual Pie Graph Test" 10 | # g.data 'Fries', 20 11 | # g.data 'Hamburgers', 50 12 | # g.write("mini_pie_keynote.png") 13 | # 14 | class Gruff::Mini::Pie < Gruff::Pie 15 | private 16 | 17 | include Gruff::Mini::Legend 18 | 19 | def initialize_attributes 20 | super 21 | 22 | @hide_legend = true 23 | @hide_title = true 24 | @hide_line_numbers = true 25 | 26 | @marker_font.size = 50.0 27 | @legend_font.size = 50.0 28 | end 29 | 30 | def setup_data 31 | expand_canvas_for_vertical_legend # steep:ignore 32 | super 33 | end 34 | 35 | def draw_graph 36 | super 37 | draw_vertical_legend # steep:ignore 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /lib/gruff/mini/side_bar.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # 4 | # Makes a small side bar graph suitable for display at 200px or even smaller. 5 | # 6 | # Here's how to set up a Gruff::Mini::SideBar. 7 | # 8 | # g = Gruff::Mini::SideBar.new 9 | # g.title = 'SideBar Graph' 10 | # g.labels = { 11 | # 0 => '5/6', 12 | # 1 => '5/15', 13 | # 2 => '5/24', 14 | # 3 => '5/30', 15 | # } 16 | # g.group_spacing = 20 17 | # g.data :Art, [0, 5, 8, 15] 18 | # g.data :Philosophy, [10, 3, 2, 8] 19 | # g.data :Science, [2, 15, 8, 11] 20 | # g.write('mini_sidebar.png') 21 | # 22 | class Gruff::Mini::SideBar < Gruff::SideBar 23 | private 24 | 25 | include Gruff::Mini::Legend 26 | 27 | def initialize_attributes 28 | super 29 | @hide_legend = true 30 | @hide_title = true 31 | @hide_line_numbers = true 32 | 33 | @marker_font.size = 50.0 34 | @legend_font.size = 50.0 35 | end 36 | 37 | def setup_data 38 | expand_canvas_for_vertical_legend # steep:ignore 39 | super 40 | end 41 | 42 | def draw_graph 43 | super 44 | draw_vertical_legend # steep:ignore 45 | end 46 | end 47 | -------------------------------------------------------------------------------- /lib/gruff/patch/rmagick.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # @private 4 | module Magick 5 | # @private 6 | module GruffAnnotate 7 | refine Draw do 8 | # Additional method to scale annotation text since Draw.scale doesn't. 9 | def annotate_scaled(img, width, height, x, y, text, scale) 10 | scaled_width = [(width * scale), 1].max 11 | scaled_height = [(height * scale), 1].max 12 | 13 | # steep:ignore:start 14 | annotate(img, 15 | scaled_width, scaled_height, 16 | x * scale, y * scale, 17 | text.gsub('%', '%%')) 18 | # steep:ignore:end 19 | end 20 | 21 | if defined? JRUBY_VERSION 22 | # FIXME(uwe): We should NOT need to implement this method. 23 | # Remove this method as soon as RMagick4J Issue #16 is fixed. 24 | # https://github.com/Serabe/RMagick4J/issues/16 25 | def fill=(fill) 26 | fill = { white: '#FFFFFF' }[fill.to_sym] || fill 27 | @draw.fill = Magick4J.ColorDatabase.query_default(fill) 28 | end 29 | end 30 | end 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /lib/gruff/patch/string.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # @private 4 | module String::GruffCommify 5 | THOUSAND_SEPARATOR = ',' 6 | private_constant :THOUSAND_SEPARATOR 7 | 8 | refine String do 9 | # Taken from http://codesnippets.joyent.com/posts/show/330 10 | def commify(delimiter = THOUSAND_SEPARATOR) 11 | gsub(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1#{delimiter}") # steep:ignore 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /lib/gruff/renderer/bezier.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | module Gruff 6 | # @private 7 | class Renderer::Bezier 8 | # @rbs renderer: Gruff::Renderer 9 | # @rbs color: String 10 | # @rbs width: Float | Integer 11 | # @rbs return: void 12 | def initialize(renderer, color:, width: 1.0) 13 | @renderer = renderer 14 | @color = color 15 | @width = width 16 | end 17 | 18 | # @rbs points: Array[Float | Integer] 19 | def render(points) 20 | @renderer.draw.push 21 | @renderer.draw.stroke_width(@width) 22 | @renderer.draw.stroke(@color) 23 | @renderer.draw.fill_opacity(0.0) 24 | @renderer.draw.bezier(*points) 25 | @renderer.draw.pop 26 | end 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /lib/gruff/renderer/circle.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | module Gruff 6 | # @private 7 | class Renderer::Circle 8 | # @rbs renderer: Gruff::Renderer 9 | # @rbs color: String 10 | # @rbs width: Float | Integer 11 | # @rbs opacity: Float | Integer 12 | # @rbs return: void 13 | def initialize(renderer, color:, width: 1.0, opacity: 1.0) 14 | @renderer = renderer 15 | @color = color 16 | @width = width 17 | @opacity = opacity 18 | end 19 | 20 | # @rbs origin_x: Float | Integer 21 | # @rbs origin_y: Float | Integer 22 | # @rbs perim_x: Float | Integer 23 | # @rbs perim_y: Float | Integer 24 | def render(origin_x, origin_y, perim_x, perim_y) 25 | @renderer.draw.push 26 | @renderer.draw.stroke_width(@width) 27 | @renderer.draw.stroke(@color) 28 | @renderer.draw.fill_opacity(@opacity) 29 | @renderer.draw.fill(@color) 30 | @renderer.draw.circle(origin_x, origin_y, perim_x, perim_y) 31 | @renderer.draw.pop 32 | end 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /lib/gruff/renderer/dash_line.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | module Gruff 6 | # @private 7 | class Renderer::DashLine 8 | # @rbs renderer: Gruff::Renderer 9 | # @rbs color: String 10 | # @rbs width: Float | Integer 11 | # @rbs dasharray: Array[Float | Integer] 12 | # @rbs return: void 13 | def initialize(renderer, color:, width:, dasharray: [10, 20]) 14 | @renderer = renderer 15 | @color = color 16 | @width = width 17 | @dasharray = dasharray 18 | end 19 | 20 | # @rbs start_x: Float | Integer 21 | # @rbs start_y: Float | Integer 22 | # @rbs end_x: Float | Integer 23 | # @rbs end_y: Float | Integer 24 | def render(start_x, start_y, end_x, end_y) 25 | @renderer.draw.push 26 | @renderer.draw.stroke_color(@color) 27 | @renderer.draw.stroke_dasharray(*@dasharray) 28 | @renderer.draw.stroke_width(@width) 29 | @renderer.draw.fill_opacity(0.0) 30 | @renderer.draw.line(start_x, start_y, end_x, end_y) 31 | @renderer.draw.pop 32 | end 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /lib/gruff/renderer/dot.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | module Gruff 6 | # @private 7 | class Renderer::Dot 8 | # @rbs renderer: Gruff::Renderer 9 | # @rbs style: :square | :circle | :diamond | 'square' | 'circle' | 'diamond' 10 | # @rbs color: String 11 | # @rbs width: Float | Integer 12 | # @rbs opacity: Float | Integer 13 | # @rbs return: void 14 | def initialize(renderer, style, color:, width: 1.0, opacity: 1.0) 15 | @renderer = renderer 16 | @style = style.to_sym 17 | @color = color 18 | @width = width 19 | @opacity = opacity 20 | end 21 | 22 | # @rbs new_x: Float | Integer 23 | # @rbs new_y: Float | Integer 24 | # @rbs radius: Float | Integer 25 | def render(new_x, new_y, radius) 26 | @renderer.draw.push 27 | @renderer.draw.stroke_width(@width) 28 | @renderer.draw.stroke(@color) 29 | @renderer.draw.fill_opacity(@opacity) 30 | @renderer.draw.fill(@color) 31 | case @style 32 | when :square 33 | square(new_x, new_y, radius) 34 | when :diamond 35 | diamond(new_x, new_y, radius) 36 | else 37 | circle(new_x, new_y, radius) 38 | end 39 | @renderer.draw.pop 40 | end 41 | 42 | private 43 | 44 | def circle(new_x, new_y, radius) 45 | @renderer.draw.circle(new_x, new_y, new_x - radius, new_y) 46 | end 47 | 48 | def square(new_x, new_y, radius) 49 | corner1 = new_x - radius 50 | corner2 = new_y - radius 51 | corner3 = new_x + radius 52 | corner4 = new_y + radius 53 | @renderer.draw.rectangle(corner1, corner2, corner3, corner4) 54 | end 55 | 56 | def diamond(new_x, new_y, radius) 57 | polygon = [] 58 | polygon += [new_x - radius, new_y] 59 | polygon += [new_x, new_y + radius] 60 | polygon += [new_x + radius, new_y] 61 | polygon += [new_x, new_y - radius] 62 | @renderer.draw.polygon(*polygon) 63 | end 64 | end 65 | end 66 | -------------------------------------------------------------------------------- /lib/gruff/renderer/ellipse.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | module Gruff 6 | # @private 7 | class Renderer::Ellipse 8 | # @rbs renderer: Gruff::Renderer 9 | # @rbs color: String 10 | # @rbs width: Float | Integer 11 | # @rbs return: void 12 | def initialize(renderer, color:, width: 1.0) 13 | @renderer = renderer 14 | @color = color 15 | @width = width 16 | end 17 | 18 | # @rbs origin_x: Float | Integer 19 | # @rbs origin_y: Float | Integer 20 | # @rbs width: Float | Integer 21 | # @rbs height: Float | Integer 22 | # @rbs arc_start: Float | Integer 23 | # @rbs arc_end: Float | Integer 24 | def render(origin_x, origin_y, width, height, arc_start, arc_end) 25 | @renderer.draw.push 26 | @renderer.draw.stroke_width(@width) 27 | @renderer.draw.stroke(@color) 28 | @renderer.draw.fill('transparent') 29 | @renderer.draw.ellipse(origin_x, origin_y, width, height, arc_start, arc_end) 30 | @renderer.draw.pop 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /lib/gruff/renderer/line.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | module Gruff 6 | # @private 7 | class Renderer::Line 8 | EPSILON = 0.001 9 | 10 | # @rbs renderer: Gruff::Renderer 11 | # @rbs color: String 12 | # @rbs width: Float | Integer 13 | # @rbs return: void 14 | def initialize(renderer, color:, width: nil) 15 | @renderer = renderer 16 | @color = color 17 | @width = width 18 | end 19 | 20 | # @rbs start_x: Float | Integer 21 | # @rbs start_y: Float | Integer 22 | # @rbs end_x: Float | Integer 23 | # @rbs end_y: Float | Integer 24 | def render(start_x, start_y, end_x, end_y) 25 | render_line(start_x, start_y, end_x, end_y, @color) 26 | end 27 | 28 | private 29 | 30 | def render_line(start_x, start_y, end_x, end_y, color) 31 | # FIXME(uwe): Workaround for Issue #66 32 | # https://github.com/topfunky/gruff/issues/66 33 | # https://github.com/rmagick/rmagick/issues/82 34 | # Remove if the issue gets fixed. 35 | unless defined?(JRUBY_VERSION) 36 | start_x += EPSILON 37 | end_x += EPSILON 38 | start_y += EPSILON 39 | end_y += EPSILON 40 | end 41 | 42 | @renderer.draw.push 43 | @renderer.draw.stroke_width(@width) if @width 44 | @renderer.draw.stroke(color) 45 | @renderer.draw.fill(color) 46 | @renderer.draw.line(start_x, start_y, end_x, end_y) 47 | @renderer.draw.pop 48 | end 49 | end 50 | end 51 | -------------------------------------------------------------------------------- /lib/gruff/renderer/polygon.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Gruff 4 | # @private 5 | class Renderer::Polygon 6 | # @rbs renderer: Gruff::Renderer 7 | # @rbs color: String 8 | # @rbs width: Float | Integer 9 | # @rbs opacity: Float | Integer 10 | # @rbs return: void 11 | def initialize(renderer, color:, width: 1.0, opacity: 1.0) 12 | @renderer = renderer 13 | @color = color 14 | @width = width 15 | @opacity = opacity 16 | end 17 | 18 | # @rbs points: Array[Float | Integer] 19 | def render(points) 20 | @renderer.draw.push 21 | @renderer.draw.stroke_width(@width) 22 | @renderer.draw.stroke(@color) 23 | @renderer.draw.fill_opacity(@opacity) 24 | @renderer.draw.fill(@color) 25 | @renderer.draw.polygon(*points) 26 | @renderer.draw.pop 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/gruff/renderer/polyline.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | module Gruff 6 | # @private 7 | class Renderer::Polyline 8 | # @rbs renderer: Gruff::Renderer 9 | # @rbs color: String 10 | # @rbs width: Float | Integer 11 | # @rbs linejoin: String 12 | # @rbs return: void 13 | def initialize(renderer, color:, width: 1.0, linejoin: 'bevel') 14 | @renderer = renderer 15 | @color = color 16 | @width = width 17 | @linejoin = linejoin 18 | end 19 | 20 | # @rbs points: Array[Float | Integer] 21 | def render(points) 22 | @renderer.draw.push 23 | @renderer.draw.stroke_linejoin(@linejoin) 24 | @renderer.draw.stroke_width(@width) 25 | @renderer.draw.stroke(@color) 26 | @renderer.draw.fill('transparent') 27 | @renderer.draw.polyline(*points) 28 | @renderer.draw.pop 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /lib/gruff/renderer/rectangle.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | module Gruff 6 | # @private 7 | class Renderer::Rectangle 8 | # @rbs renderer: Gruff::Renderer 9 | # @rbs color: String 10 | # @rbs width: Float | Integer 11 | # @rbs opacity: Float | Integer 12 | # @rbs return: void 13 | def initialize(renderer, color: nil, width: 1.0, opacity: 1.0) 14 | @renderer = renderer 15 | @color = color 16 | @width = width 17 | @opacity = opacity 18 | end 19 | 20 | # @rbs upper_left_x: Float | Integer 21 | # @rbs upper_left_y: Float | Integer 22 | # @rbs lower_right_x: Float | Integer 23 | # @rbs lower_right_y: Float | Integer 24 | def render(upper_left_x, upper_left_y, lower_right_x, lower_right_y) 25 | @renderer.draw.push 26 | @renderer.draw.stroke_width(@width) 27 | @renderer.draw.stroke(@color) if @color && @width > 1.0 28 | @renderer.draw.fill_opacity(@opacity) 29 | @renderer.draw.fill(@color) if @color 30 | @renderer.draw.rectangle(upper_left_x, upper_left_y, lower_right_x, lower_right_y) 31 | @renderer.draw.pop 32 | end 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /lib/gruff/store/basic_data.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | module Gruff 6 | class Store 7 | # @private 8 | class BasicData 9 | attr_accessor :label #: String | Symbol 10 | attr_accessor :points #: Array[nil | Float | Integer] 11 | attr_accessor :color #: String 12 | 13 | # @rbs label: String | Symbol 14 | # @rbs points: Array[nil | Float | Integer] | nil 15 | # @rbs color: String 16 | def initialize(label, points, color) 17 | @label = label.to_s 18 | @points = Array(points) 19 | @color = color 20 | end 21 | 22 | alias x_points points 23 | 24 | def y_points 25 | raise NotImplementedError, 'x_points is not implemented for BasicData' 26 | end 27 | 28 | def coordinates 29 | raise NotImplementedError, 'This method is not implemented for BasicData' 30 | end 31 | 32 | def coordinate_and_pointsizes 33 | raise NotImplementedError, 'This method is not implemented for BasicData' 34 | end 35 | 36 | # @rbs return: bool 37 | def empty? 38 | points.empty? 39 | end 40 | 41 | # @rbs return: Integer 42 | def columns 43 | points.length 44 | end 45 | 46 | # @rbs return: Float | Integer 47 | def min 48 | points.compact.min 49 | end 50 | alias min_x min 51 | 52 | # @rbs return: Float | Integer 53 | def max 54 | points.compact.max 55 | end 56 | alias max_x max 57 | 58 | # @rbs minimum: Float | Integer 59 | # @rbs spread: Float | Integer 60 | # @rbs return: Gruff::Store::BasicData 61 | def normalize(minimum:, spread:) 62 | norm_points = points.map do |point| 63 | point.nil? ? nil : (point.to_f - minimum.to_f) / spread 64 | end 65 | 66 | self.class.new(label, norm_points, color) 67 | end 68 | end 69 | end 70 | end 71 | -------------------------------------------------------------------------------- /lib/gruff/store/store.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | module Gruff 6 | # @private 7 | class Store 8 | attr_reader :data #: Array[Gruff::Store::BasicData | Gruff::Store::XYData | Gruff::Store::XYPointsizeData] 9 | 10 | # @rbs return: void 11 | def initialize(data_class) 12 | @data_class = data_class 13 | @data = [] 14 | end 15 | 16 | def add(*args) 17 | @data << @data_class.new(*args) 18 | end 19 | 20 | # @rbs return: Array[Gruff::Store::BasicData | Gruff::Store::XYData | Gruff::Store::XYPointsizeData] 21 | def norm_data 22 | @norm_data || [] 23 | end 24 | 25 | def normalize(**keywords) 26 | @norm_data = @data.map { |data_row| data_row.normalize(**keywords) } # steep:ignore 27 | end 28 | 29 | # @rbs return: bool 30 | def empty? 31 | @data.all?(&:empty?) 32 | end 33 | 34 | # @rbs return: Integer 35 | def length 36 | @data.length 37 | end 38 | 39 | # @rbs return: Integer 40 | def columns 41 | @columns ||= @data.empty? ? 0 : @data.map(&:columns).max 42 | end 43 | 44 | # @rbs return: Float | Integer 45 | def min 46 | @min ||= @data.filter_map(&:min).min 47 | end 48 | alias min_y min 49 | 50 | # @rbs return: Float | Integer 51 | def max 52 | @max ||= @data.filter_map(&:max).max 53 | end 54 | alias max_y max 55 | 56 | # @rbs return: Float | Integer 57 | def min_x 58 | @min_x ||= @data.filter_map(&:min_x).min 59 | end 60 | 61 | # @rbs return: Float | Integer 62 | def max_x 63 | @max_x ||= @data.filter_map(&:max_x).max 64 | end 65 | 66 | def sort_data! 67 | @data = @data.sort_by { |a| -a.points.sum(&:to_f) } 68 | end 69 | 70 | def sort_norm_data! 71 | @norm_data = @norm_data.sort_by { |a| -a.points.sum(&:to_f) } 72 | end 73 | 74 | # @rbs return: Array[Gruff::Store::BasicData | Gruff::Store::XYData | Gruff::Store::XYPointsizeData] 75 | def reverse! 76 | @data.reverse! 77 | end 78 | 79 | # @rbs colors: Array[String] 80 | def change_colors(colors) 81 | index = 0 82 | @data.each do |data_row| 83 | data_row.color ||= begin # steep:ignore 84 | index = (index + 1) % colors.length 85 | colors[index - 1] 86 | end 87 | end 88 | end 89 | end 90 | end 91 | -------------------------------------------------------------------------------- /lib/gruff/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # rbs_inline: enabled 4 | 5 | module Gruff 6 | VERSION = '0.27.0' 7 | end 8 | -------------------------------------------------------------------------------- /rails_generators/gruff/templates/controller.rb: -------------------------------------------------------------------------------- 1 | class <%= controller_class_name %>Controller < ApplicationController 2 | 3 | # To make caching easier, add a line like this to config/routes.rb: 4 | # map.graph "graph/:action/:id/image.png", :controller => "graph" 5 | # 6 | # Then reference it with the named route: 7 | # image_tag graph_url(:action => 'show', :id => 42) 8 | 9 | def show 10 | g = Gruff::Line.new 11 | # Uncomment to use your own theme or font 12 | # See http://colourlovers.com or http://www.firewheeldesign.com/widgets/ for color ideas 13 | # g.theme = { 14 | # :colors => ['#663366', '#cccc99', '#cc6633', '#cc9966', '#99cc99'], 15 | # :marker_color => 'white', 16 | # :background_colors => ['black', '#333333'] 17 | # } 18 | # g.font = File.expand_path('artwork/fonts/VeraBd.ttf', RAILS_ROOT) 19 | 20 | g.title = "Gruff-o-Rama" 21 | 22 | g.data("Apples", [1, 2, 3, 4, 4, 3]) 23 | g.data("Oranges", [4, 8, 7, 9, 8, 9]) 24 | g.data("Watermelon", [2, 3, 1, 5, 6, 8]) 25 | g.data("Peaches", [9, 9, 10, 8, 7, 9]) 26 | 27 | g.labels = {0 => '2004', 2 => '2005', 4 => '2006'} 28 | 29 | send_data(g.to_image.to_blob, :disposition => 'inline', :type => 'image/png', :filename => "gruff.png") 30 | end 31 | 32 | end 33 | -------------------------------------------------------------------------------- /rails_generators/gruff/templates/functional_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '<%= '/..' * controller_class_name.split("::").length %>/test_helper' 2 | require '<%= parent_folder_for_require %><%= controller_file_name %>_controller' 3 | 4 | # Re-raise errors caught by the controller. 5 | class <%= controller_class_name %>Controller; def rescue_action(e) raise e end; end 6 | 7 | class <%= controller_class_name %>ControllerTest < Test::Unit::TestCase 8 | 9 | #fixtures :data 10 | 11 | def setup 12 | @controller = <%= controller_class_name %>Controller.new 13 | @request = ActionController::TestRequest.new 14 | @response = ActionController::TestResponse.new 15 | end 16 | 17 | # TODO Replace this with your actual tests 18 | def test_show 19 | get :show 20 | assert_response :success 21 | assert_equal 'image/png', @response.headers['Content-Type'] 22 | end 23 | 24 | end 25 | -------------------------------------------------------------------------------- /sig/generated/gruff.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff.rb with RBS::Inline 2 | 3 | # # 4 | # = Gruff. Graphs. 5 | module Gruff 6 | # @private 7 | def self.libpath: (untyped path) -> untyped 8 | 9 | # @private 10 | class Renderer 11 | end 12 | 13 | # @private 14 | class Store 15 | end 16 | 17 | # A module for small graphs 18 | module Mini 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /sig/generated/gruff/accumulator_bar.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/accumulator_bar.rb with RBS::Inline 2 | 3 | # 4 | # Gruff::AccumulatorBar is a special bar graph that shows a 5 | # single dataset as a set of stacked bars. 6 | # The bottom bar shows the running total and the top bar shows 7 | # the new value being added to the array. 8 | # 9 | # Here's how to set up a Gruff::AccumulatorBar. 10 | # 11 | # g = Gruff::AccumulatorBar.new 12 | # g.title = 'Your Savings' 13 | # g.data 'First', [1, 1, 1] 14 | # g.write('accumulator_bar.png') 15 | class Gruff::AccumulatorBar < Gruff::StackedBar 16 | private 17 | 18 | def setup_data: () -> untyped 19 | end 20 | -------------------------------------------------------------------------------- /sig/generated/gruff/area.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/area.rb with RBS::Inline 2 | 3 | # 4 | # Gruff::Area provides an area graph which displays graphically 5 | # quantitative data. 6 | # 7 | # Here's how to set up a Gruff::Area. 8 | # 9 | # g = Gruff::Area.new 10 | # g.title = 'Area Graph' 11 | # g.data :Jimmy, [25, 36, 86, 39, 25, 31, 79, 88] 12 | # g.data :Charles, [80, 54, 67, 54, 68, 70, 90, 95] 13 | # g.data :Julie, [22, 29, 35, 38, 36, 40, 46, 57] 14 | # g.write('area.png') 15 | class Gruff::Area < Gruff::Base 16 | # Specifies the filling opacity in area graph. Default is +0.85+. 17 | attr_writer fill_opacity: Float | Integer 18 | 19 | # Specifies the stroke width in line around area graph. Default is +2.0+. 20 | attr_writer stroke_width: Float | Integer 21 | 22 | private 23 | 24 | def initialize_attributes: () -> untyped 25 | 26 | def draw_graph: () -> untyped 27 | end 28 | -------------------------------------------------------------------------------- /sig/generated/gruff/bar.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/bar.rb with RBS::Inline 2 | 3 | # 4 | # Gruff::Bar provide a bar graph that presents categorical data 5 | # with rectangular bars. 6 | # 7 | # Here's how to set up a Gruff::Bar. 8 | # 9 | # g = Gruff::Bar.new 10 | # g.title = 'Bar Graph With Manual Colors' 11 | # g.spacing_factor = 0.1 12 | # g.group_spacing = 20 13 | # g.data :Art, [0, 5, 8, 15], '#990000' 14 | # g.data :Philosophy, [10, 3, 2, 8], '#009900' 15 | # g.data :Science, [2, 15, 8, 11], '#990099' 16 | # g.write('bar.png') 17 | class Gruff::Bar < Gruff::Base 18 | include Gruff::Base::BarMixin 19 | 20 | # Spacing factor applied between bars. 21 | attr_writer bar_spacing: Float | Integer 22 | 23 | # Spacing factor applied between a group of bars belonging to the same label. 24 | attr_writer group_spacing: Float | Integer 25 | 26 | # Set the number output format string or lambda. 27 | # Default is +"%.2f"+. 28 | attr_writer label_formatting: nil | String | Proc 29 | 30 | # Output the values for the bars on a bar graph. 31 | # Default is +false+. 32 | attr_writer show_labels_for_bar_values: bool 33 | 34 | # Prevent drawing of column labels below a bar graph. Default is +false+. 35 | attr_writer hide_labels: bool 36 | 37 | # Value to avoid completely overwriting the coordinate axis 38 | AXIS_MARGIN: ::Float 39 | 40 | # Can be used to adjust the spaces between the bars. 41 | # Accepts values between 0.00 and 1.00 where 0.00 means no spacing at all 42 | # and 1 means that each bars' width is nearly 0 (so each bar is a simple 43 | # line with no x dimension). 44 | # 45 | # Default value is +0.9+. 46 | # 47 | # @rbs space_percent: Float | Integer 48 | def spacing_factor=: (Float | Integer space_percent) -> untyped 49 | 50 | private 51 | 52 | def initialize_attributes: () -> untyped 53 | 54 | def setup_drawing: () -> untyped 55 | 56 | # @rbs return: bool 57 | def hide_labels?: () -> bool 58 | 59 | # @rbs return: bool 60 | def hide_left_label_area?: () -> bool 61 | 62 | # @rbs return: bool 63 | def hide_bottom_label_area?: () -> bool 64 | 65 | def setup_graph_measurements: () -> untyped 66 | 67 | def draw_graph: () -> untyped 68 | 69 | # @rbs return: Float | Integer 70 | def calculate_spacing: () -> (Float | Integer) 71 | 72 | # @rbs return: Proc 73 | def proc_text_metrics: () -> Proc 74 | end 75 | -------------------------------------------------------------------------------- /sig/generated/gruff/bezier.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/bezier.rb with RBS::Inline 2 | 3 | # 4 | # Gruff::Bezier is a special line graph that have 5 | # the bezier curve. 6 | # 7 | # Here's how to set up a Gruff::Bezier. 8 | # 9 | # dataset = [ 10 | # +0.00, +0.09, +0.19, +0.29, +0.38, +0.47, +0.56, +0.64, +0.71, +0.78, 11 | # +0.84, +0.89, +0.93, +0.96, +0.98, +0.99, +0.99, +0.99, +0.97, +0.94, 12 | # +0.90, +0.86, +0.80, +0.74, +0.67, +0.59, +0.51, +0.42, +0.33, +0.23, 13 | # +0.14, +0.04, -0.06, -0.16, -0.26, -0.36, -0.45, -0.53, -0.62, -0.69, 14 | # -0.76, -0.82, -0.88, -0.92, -0.96, -0.98, -1.00, -1.00, -1.00, -0.99, 15 | # -0.96, -0.93, -0.89, -0.84, -0.78, -0.71, -0.64, -0.56, -0.47, -0.38, 16 | # ] 17 | # g = Gruff::Bezier.new 18 | # g.data 'sin', dataset 19 | # g.write('bezier.png') 20 | class Gruff::Bezier < Gruff::Base 21 | private 22 | 23 | def draw_graph: () -> untyped 24 | end 25 | -------------------------------------------------------------------------------- /sig/generated/gruff/bullet.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/bullet.rb with RBS::Inline 2 | 3 | # 4 | # A bullet graph is a variation of a bar graph. 5 | # http://en.wikipedia.org/wiki/Bullet_graph 6 | # 7 | # Here's how to set up a Gruff::Bullet. 8 | # 9 | # g = Gruff::Bullet.new 10 | # g.title = 'Monthly Revenue' 11 | # g.data 75, 100, { target: 80, low: 50, high: 90 } 12 | # g.write('bullet.png') 13 | class Gruff::Bullet < Gruff::Base 14 | # @rbs target_width: String | Float | Integer 15 | # @rbs return: void 16 | def initialize: (?String | Float | Integer target_width) -> void 17 | 18 | def initialize_attributes: () -> untyped 19 | 20 | # @rbs value: Float | Integer 21 | # @rbs maximum_value: Float | Integer 22 | # @rbs options: Hash[Symbol, Float | Integer] 23 | def data: (Float | Integer value, Float | Integer maximum_value, ?Hash[Symbol, Float | Integer] options) -> untyped 24 | 25 | def draw: () -> untyped 26 | 27 | private 28 | 29 | def draw_title: () -> untyped 30 | end 31 | -------------------------------------------------------------------------------- /sig/generated/gruff/dot.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/dot.rb with RBS::Inline 2 | 3 | # 4 | # Graph with dots and labels along a vertical access. 5 | # see: 'Creating More Effective Graphs' by Robbins 6 | # 7 | # Here's how to set up a Gruff::Dot. 8 | # 9 | # g = Gruff::Dot.new 10 | # g.title = 'Dot Graph' 11 | # g.data :Art, [0, 5, 8, 15] 12 | # g.data :Philosophy, [10, 3, 2, 8] 13 | # g.data :Science, [2, 15, 8, 11] 14 | # g.write('dot.png') 15 | class Gruff::Dot < Gruff::Base 16 | # Prevent drawing of column labels below a stacked bar graph. Default is +false+. 17 | attr_writer hide_labels: bool 18 | 19 | # @rbs target_width: (String | Float | Integer) 20 | # @rbs return: void 21 | def initialize: (?String | Float | Integer target_width) -> void 22 | 23 | private 24 | 25 | def initialize_attributes: () -> untyped 26 | 27 | # @rbs return: bool 28 | def hide_labels?: () -> bool 29 | 30 | # @rbs return: bool 31 | def hide_left_label_area?: () -> bool 32 | 33 | # @rbs return: bool 34 | def hide_bottom_label_area?: () -> bool 35 | 36 | def draw_graph: () -> untyped 37 | 38 | # Instead of base class version, draws vertical background lines and label 39 | def draw_line_markers: () -> untyped 40 | 41 | # @rbs y_offset: Float | Integer 42 | # @rbs index: Integer 43 | def draw_label: (Float | Integer y_offset, Integer index) -> untyped 44 | end 45 | -------------------------------------------------------------------------------- /sig/generated/gruff/font.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/font.rb with RBS::Inline 2 | 3 | # Handle font setting to draw texts 4 | class Gruff::Font 5 | BOLD_PATH: untyped 6 | 7 | REGULAR_PATH: untyped 8 | 9 | # Get/set font path. 10 | attr_accessor path: String 11 | 12 | # Get/set font size. 13 | attr_accessor size: Float | Integer 14 | 15 | # Get/set font setting whether render bold text. 16 | attr_accessor bold: bool 17 | 18 | # Get/set font color. 19 | attr_accessor color: String 20 | 21 | # @rbs path: String | nil 22 | # @rbs size: Float | Integer 23 | # @rbs bold: bool 24 | # @rbs color: String 25 | def initialize: (?path: String | nil, ?size: Float | Integer, ?bold: bool, ?color: String) -> untyped 26 | 27 | # Get font weight. 28 | # @return [Magick::WeightType] font weight 29 | # TODO: type annotation of return value 30 | def weight: () -> untyped 31 | 32 | # @private 33 | # @rbs return: String 34 | def file_path: () -> String 35 | end 36 | -------------------------------------------------------------------------------- /sig/generated/gruff/helper/bar_conversion.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/helper/bar_conversion.rb with RBS::Inline 2 | 3 | # # 4 | # Original Author: David Stokar 5 | # 6 | # This class performs the y coordinates conversion for the bar class. 7 | # 8 | # There are three cases: 9 | # 10 | # 1. Bars all go from zero in positive direction 11 | # 2. Bars all go from zero to negative direction 12 | # 3. Bars either go from zero to positive or from zero to negative 13 | # 14 | # @private 15 | class Gruff::BarConversion 16 | # @rbs top: Float | Integer 17 | # @rbs bottom: Float | Integer 18 | # @rbs minimum_value: Float | Integer 19 | # @rbs maximum_value: Float | Integer 20 | # @rbs spread: Float | Integer 21 | # @rbs return: void 22 | def initialize: (top: Float | Integer, bottom: Float | Integer, minimum_value: Float | Integer, maximum_value: Float | Integer, spread: Float | Integer) -> void 23 | 24 | # @rbs data_point: Float | Integer 25 | # @rbs return: [Float, Float] 26 | def get_top_bottom_scaled: (Float | Integer data_point) -> [ Float, Float ] 27 | end 28 | -------------------------------------------------------------------------------- /sig/generated/gruff/helper/bar_mixin.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/helper/bar_mixin.rb with RBS::Inline 2 | 3 | # @private 4 | module Gruff::Base::BarMixin 5 | # @rbs return: Array[Array[Gruff::Base::BarMixin::BarData]] 6 | def normalized_group_bars: () -> Array[Array[Gruff::Base::BarMixin::BarData]] 7 | 8 | # @private 9 | class BarData 10 | attr_accessor point: Float | Integer 11 | 12 | attr_accessor value: nil | Float | Integer 13 | 14 | attr_accessor color: String 15 | 16 | # @rbs point: Float | Integer 17 | # @rbs value: nil | Float | Integer 18 | # @rbs color: String 19 | # @rbs return: void 20 | def initialize: (Float | Integer point, nil | Float | Integer value, String color) -> void 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /sig/generated/gruff/helper/bar_value_label.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/helper/bar_value_label.rb with RBS::Inline 2 | 3 | # @private 4 | module Gruff::BarValueLabel 5 | # @private 6 | # 7 | # @rbs value: Float | Integer 8 | # @rbs format: nil | String | Proc 9 | # @rbs proc_text_metrics: Proc 10 | # @rbs return: [String, untyped] 11 | # TODO: Fix the return type 12 | def self.metrics: (Float | Integer value, nil | String | Proc format, Proc proc_text_metrics) -> [ String, untyped ] 13 | 14 | # @private 15 | class Base 16 | attr_reader coordinate: [ Float | Integer, Float | Integer, Float | Integer, Float | Integer ] 17 | 18 | attr_reader value: Float | Integer 19 | 20 | # @rbs coordinate: [nil | Float | Integer, nil | Float | Integer, nil | Float | Integer, nil | Float | Integer] 21 | # @rbs value: Float | Integer 22 | # @rbs return: void 23 | def initialize: ([ nil | Float | Integer, nil | Float | Integer, nil | Float | Integer, nil | Float | Integer ] coordinate, Float | Integer value) -> void 24 | end 25 | 26 | # @private 27 | class Bar < Base 28 | # @rbs format: nil | String | Proc 29 | # @rbs proc_text_metrics: Proc 30 | # @rbs &: (Float | Integer, Float | Integer, String, Float, Float) -> void 31 | def prepare_rendering: (nil | String | Proc format, Proc proc_text_metrics) { (Float | Integer, Float | Integer, String, Float, Float) -> void } -> untyped 32 | end 33 | 34 | # @private 35 | class SideBar < Base 36 | # @rbs format: nil | String | Proc 37 | # @rbs proc_text_metrics: Proc 38 | # @rbs &: (Float | Integer, Float | Integer, String, Float, Float) -> void 39 | def prepare_rendering: (nil | String | Proc format, Proc proc_text_metrics) { (Float | Integer, Float | Integer, String, Float, Float) -> void } -> untyped 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /sig/generated/gruff/helper/stacked_mixin.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/helper/stacked_mixin.rb with RBS::Inline 2 | 3 | # @private 4 | module Gruff::Base::StackedMixin 5 | # Used by StackedBar and child classes. 6 | # 7 | # tsal: moved from Base 03 FEB 2007 8 | def calculate_maximum_by_stack: () -> untyped 9 | 10 | # @rbs return: Array[Array[Gruff::Base::StackedMixin::BarData]] 11 | def normalized_stacked_bars: () -> Array[Array[Gruff::Base::StackedMixin::BarData]] 12 | 13 | # @private 14 | class BarData 15 | attr_accessor point: Float | Integer 16 | 17 | attr_accessor value: Float | Integer 18 | 19 | attr_accessor color: String 20 | 21 | # @rbs point: Float | Integer 22 | # @rbs value: Float | Integer 23 | # @rbs color: String 24 | # @rbs return: void 25 | def initialize: (Float | Integer point, Float | Integer value, String color) -> void 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /sig/generated/gruff/histogram.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/histogram.rb with RBS::Inline 2 | 3 | # 4 | # Here's how to set up a Gruff::Histogram. 5 | # 6 | # g = Gruff::Histogram.new 7 | # g.title = 'Histogram Graph' 8 | # g.minimum_bin = 10 9 | # g.bin_width = 20 10 | # g.data :A, [10, 10, 20, 30, 40, 40, 40, 40, 40, 40, 50, 10, 10, 10] 11 | # g.data :B, [100, 100, 100, 100, 90, 90, 80, 30, 30, 30, 30, 30] 12 | # g.write('histogram.png') 13 | class Gruff::Histogram < Gruff::Bar 14 | # Specifies interpolation between the min and max of the set. Default is +10+. 15 | attr_writer bin_width: Float | Integer 16 | 17 | # Specifies minimum value for bin. 18 | attr_writer minimum_bin: Float | Integer 19 | 20 | # Specifies maximum value for bin. 21 | attr_writer maximum_bin: Float | Integer 22 | 23 | # @rbs target_width: (String | Float | Integer) 24 | # @rbs return: void 25 | def initialize: (?String | Float | Integer target_width) -> void 26 | 27 | # @rbs name: String | Symbol 28 | # @rbs data_points: Array[Float | Integer] | nil 29 | # @rbs color: String 30 | def data: (String | Symbol name, ?Array[Float | Integer] | nil data_points, ?String color) -> untyped 31 | 32 | private 33 | 34 | def initialize_attributes: () -> untyped 35 | 36 | def setup_data: () -> untyped 37 | 38 | # @private 39 | # @rbs inherits Array[Float | Integer | nil] 40 | class HistogramArray < Array[Float | Integer | nil] 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /sig/generated/gruff/net.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/net.rb with RBS::Inline 2 | 3 | # See also the Spider graph. 4 | # 5 | # Here's how to make a Gruff::Net. 6 | # 7 | # g = Gruff::Net.new 8 | # g.title = "Net Graph" 9 | # g.labels = { 10 | # 0 => '5/6', 11 | # 1 => '5/15', 12 | # 2 => '5/24', 13 | # 3 => '5/30', 14 | # 4 => '6/4', 15 | # 5 => '6/12', 16 | # 6 => '6/21', 17 | # 7 => '6/28' 18 | # } 19 | # g.line_width = 3 20 | # g.dot_radius = 4 21 | # g.data :Jimmy, [25, 36, 86, 39, 25, 31, 79, 88] 22 | # g.data :Julie, [22, 29, 35, 38, 36, 40, 46, 57] 23 | # g.write("net.png") 24 | class Gruff::Net < Gruff::Base 25 | # Hide parts of the graph to fit more data points, or for a different appearance. 26 | attr_writer hide_dots: bool 27 | 28 | # Dimensions of lines and dots; calculated based on dataset size if left unspecified. 29 | attr_writer line_width: Float | Integer 30 | 31 | attr_writer dot_radius: Float | Integer 32 | 33 | private 34 | 35 | def initialize_attributes: () -> untyped 36 | 37 | def setup_drawing: () -> untyped 38 | 39 | def setup_graph_measurements: () -> untyped 40 | 41 | def draw_graph: () -> untyped 42 | 43 | # the lines connecting in the center, with the first line vertical 44 | def draw_line_markers: () -> untyped 45 | 46 | # @rbs center_x: Float | Integer 47 | # @rbs center_y: Float | Integer 48 | # @rbs angle: Float | Integer 49 | # @rbs radius: Float 50 | # @rbs amount: String | Integer 51 | def draw_label: (Float | Integer center_x, Float | Integer center_y, Float | Integer angle, Float radius, String | Integer amount) -> untyped 52 | end 53 | -------------------------------------------------------------------------------- /sig/generated/gruff/renderer/bezier.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/renderer/bezier.rb with RBS::Inline 2 | 3 | module Gruff 4 | # @private 5 | class Renderer::Bezier 6 | # @rbs renderer: Gruff::Renderer 7 | # @rbs color: String 8 | # @rbs width: Float | Integer 9 | # @rbs return: void 10 | def initialize: (Gruff::Renderer renderer, color: String, ?width: Float | Integer) -> void 11 | 12 | # @rbs points: Array[Float | Integer] 13 | def render: (Array[Float | Integer] points) -> untyped 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /sig/generated/gruff/renderer/circle.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/renderer/circle.rb with RBS::Inline 2 | 3 | module Gruff 4 | # @private 5 | class Renderer::Circle 6 | # @rbs renderer: Gruff::Renderer 7 | # @rbs color: String 8 | # @rbs width: Float | Integer 9 | # @rbs opacity: Float | Integer 10 | # @rbs return: void 11 | def initialize: (Gruff::Renderer renderer, color: String, ?width: Float | Integer, ?opacity: Float | Integer) -> void 12 | 13 | # @rbs origin_x: Float | Integer 14 | # @rbs origin_y: Float | Integer 15 | # @rbs perim_x: Float | Integer 16 | # @rbs perim_y: Float | Integer 17 | def render: (Float | Integer origin_x, Float | Integer origin_y, Float | Integer perim_x, Float | Integer perim_y) -> untyped 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /sig/generated/gruff/renderer/dash_line.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/renderer/dash_line.rb with RBS::Inline 2 | 3 | module Gruff 4 | # @private 5 | class Renderer::DashLine 6 | # @rbs renderer: Gruff::Renderer 7 | # @rbs color: String 8 | # @rbs width: Float | Integer 9 | # @rbs dasharray: Array[Float | Integer] 10 | # @rbs return: void 11 | def initialize: (Gruff::Renderer renderer, color: String, width: Float | Integer, ?dasharray: Array[Float | Integer]) -> void 12 | 13 | # @rbs start_x: Float | Integer 14 | # @rbs start_y: Float | Integer 15 | # @rbs end_x: Float | Integer 16 | # @rbs end_y: Float | Integer 17 | def render: (Float | Integer start_x, Float | Integer start_y, Float | Integer end_x, Float | Integer end_y) -> untyped 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /sig/generated/gruff/renderer/dot.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/renderer/dot.rb with RBS::Inline 2 | 3 | module Gruff 4 | # @private 5 | class Renderer::Dot 6 | # @rbs renderer: Gruff::Renderer 7 | # @rbs style: :square | :circle | :diamond | 'square' | 'circle' | 'diamond' 8 | # @rbs color: String 9 | # @rbs width: Float | Integer 10 | # @rbs opacity: Float | Integer 11 | # @rbs return: void 12 | def initialize: (Gruff::Renderer renderer, :square | :circle | :diamond | "square" | "circle" | "diamond" style, color: String, ?width: Float | Integer, ?opacity: Float | Integer) -> void 13 | 14 | # @rbs new_x: Float | Integer 15 | # @rbs new_y: Float | Integer 16 | # @rbs radius: Float | Integer 17 | def render: (Float | Integer new_x, Float | Integer new_y, Float | Integer radius) -> untyped 18 | 19 | private 20 | 21 | def circle: (untyped new_x, untyped new_y, untyped radius) -> untyped 22 | 23 | def square: (untyped new_x, untyped new_y, untyped radius) -> untyped 24 | 25 | def diamond: (untyped new_x, untyped new_y, untyped radius) -> untyped 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /sig/generated/gruff/renderer/ellipse.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/renderer/ellipse.rb with RBS::Inline 2 | 3 | module Gruff 4 | # @private 5 | class Renderer::Ellipse 6 | # @rbs renderer: Gruff::Renderer 7 | # @rbs color: String 8 | # @rbs width: Float | Integer 9 | # @rbs return: void 10 | def initialize: (Gruff::Renderer renderer, color: String, ?width: Float | Integer) -> void 11 | 12 | # @rbs origin_x: Float | Integer 13 | # @rbs origin_y: Float | Integer 14 | # @rbs width: Float | Integer 15 | # @rbs height: Float | Integer 16 | # @rbs arc_start: Float | Integer 17 | # @rbs arc_end: Float | Integer 18 | def render: (Float | Integer origin_x, Float | Integer origin_y, Float | Integer width, Float | Integer height, Float | Integer arc_start, Float | Integer arc_end) -> untyped 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /sig/generated/gruff/renderer/line.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/renderer/line.rb with RBS::Inline 2 | 3 | module Gruff 4 | # @private 5 | class Renderer::Line 6 | EPSILON: ::Float 7 | 8 | # @rbs renderer: Gruff::Renderer 9 | # @rbs color: String 10 | # @rbs width: Float | Integer 11 | # @rbs return: void 12 | def initialize: (Gruff::Renderer renderer, color: String, ?width: Float | Integer) -> void 13 | 14 | # @rbs start_x: Float | Integer 15 | # @rbs start_y: Float | Integer 16 | # @rbs end_x: Float | Integer 17 | # @rbs end_y: Float | Integer 18 | def render: (Float | Integer start_x, Float | Integer start_y, Float | Integer end_x, Float | Integer end_y) -> untyped 19 | 20 | private 21 | 22 | def render_line: (untyped start_x, untyped start_y, untyped end_x, untyped end_y, untyped color) -> untyped 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /sig/generated/gruff/renderer/polyline.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/renderer/polyline.rb with RBS::Inline 2 | 3 | module Gruff 4 | # @private 5 | class Renderer::Polyline 6 | # @rbs renderer: Gruff::Renderer 7 | # @rbs color: String 8 | # @rbs width: Float | Integer 9 | # @rbs linejoin: String 10 | # @rbs return: void 11 | def initialize: (Gruff::Renderer renderer, color: String, ?width: Float | Integer, ?linejoin: String) -> void 12 | 13 | # @rbs points: Array[Float | Integer] 14 | def render: (Array[Float | Integer] points) -> untyped 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /sig/generated/gruff/renderer/rectangle.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/renderer/rectangle.rb with RBS::Inline 2 | 3 | module Gruff 4 | # @private 5 | class Renderer::Rectangle 6 | # @rbs renderer: Gruff::Renderer 7 | # @rbs color: String 8 | # @rbs width: Float | Integer 9 | # @rbs opacity: Float | Integer 10 | # @rbs return: void 11 | def initialize: (Gruff::Renderer renderer, ?color: String, ?width: Float | Integer, ?opacity: Float | Integer) -> void 12 | 13 | # @rbs upper_left_x: Float | Integer 14 | # @rbs upper_left_y: Float | Integer 15 | # @rbs lower_right_x: Float | Integer 16 | # @rbs lower_right_y: Float | Integer 17 | def render: (Float | Integer upper_left_x, Float | Integer upper_left_y, Float | Integer lower_right_x, Float | Integer lower_right_y) -> untyped 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /sig/generated/gruff/renderer/renderer.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/renderer/renderer.rb with RBS::Inline 2 | 3 | module Gruff 4 | # @private 5 | class Renderer 6 | attr_accessor text_renderers: Array[Gruff::Renderer::Text] 7 | 8 | attr_reader draw: untyped 9 | 10 | attr_reader image: untyped 11 | 12 | attr_reader scale: real 13 | 14 | # @rbs columns: Integer 15 | # @rbs rows: Integer 16 | # @rbs scale: Float | Integer 17 | # @rbs theme_options: ::Hash[Symbol, untyped] 18 | # @rbs return: void 19 | def initialize: (Integer columns, Integer rows, Float | Integer scale, ::Hash[Symbol, untyped] theme_options) -> void 20 | 21 | def finish: () -> untyped 22 | 23 | # @rbs columns: Integer 24 | # @rbs rows: Integer 25 | def transparent_background: (Integer columns, Integer rows) -> untyped 26 | 27 | private 28 | 29 | def background: (untyped columns, untyped rows, untyped scale, untyped theme_options) -> untyped 30 | 31 | # Use with a theme to use an image (800x600 original) background. 32 | def image_background: (untyped scale, untyped image_path) -> untyped 33 | 34 | # Make a new image at the current size with a solid +color+. 35 | def solid_background: (untyped columns, untyped rows, untyped color) -> untyped 36 | 37 | # Use with a theme definition method to draw a gradated background. 38 | def gradated_background: (untyped columns, untyped rows, untyped top_color, untyped bottom_color, ?untyped direct) -> untyped 39 | 40 | # Use with a theme to make a transparent background 41 | def render_transparent_background: (untyped columns, untyped rows) -> untyped 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /sig/generated/gruff/renderer/text.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/renderer/text.rb with RBS::Inline 2 | 3 | module Gruff 4 | # @private 5 | class Renderer::Text 6 | # @rbs renderer: Gruff::Renderer 7 | # @rbs text: String 8 | # @rbs font: Gruff::Font 9 | # @rbs rotation: Float | Integer 10 | def initialize: (Gruff::Renderer renderer, String text, font: Gruff::Font, ?rotation: Float | Integer) -> untyped 11 | 12 | attr_reader width: Float | Integer 13 | 14 | attr_reader height: Float | Integer 15 | 16 | attr_reader x: Float | Integer 17 | 18 | attr_reader y: Float | Integer 19 | 20 | attr_reader gravity: untyped 21 | 22 | # @rbs width: Float | Integer 23 | # @rbs height: Float | Integer 24 | # @rbs x: Float | Integer 25 | # @rbs y: Float | Integer 26 | # @rbs gravity: untyped 27 | def add_to_render_queue: (Float | Integer width, Float | Integer height, Float | Integer x, Float | Integer y, ?untyped gravity) -> untyped 28 | 29 | # @rbs width: Float | Integer 30 | # @rbs height: Float | Integer 31 | # @rbs x: Float | Integer 32 | # @rbs y: Float | Integer 33 | # @rbs gravity: untyped 34 | def render: (Float | Integer width, Float | Integer height, Float | Integer x, Float | Integer y, ?untyped gravity) -> untyped 35 | 36 | def metrics: () -> untyped 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /sig/generated/gruff/side_stacked_bar.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/side_stacked_bar.rb with RBS::Inline 2 | 3 | # 4 | # New gruff graph type added to enable sideways stacking bar charts 5 | # (basically looks like a x/y flip of a standard stacking bar chart) 6 | # 7 | # Here's how to set up a Gruff::SideStackedBar. 8 | # 9 | # g = Gruff::SideStackedBar.new 10 | # g.title = 'SideStackedBar Graph' 11 | # g.labels = { 12 | # 0 => '5/6', 13 | # 1 => '5/15', 14 | # 2 => '5/24', 15 | # 3 => '5/30', 16 | # } 17 | # g.data :Art, [0, 5, 8, 15] 18 | # g.data :Philosophy, [10, 3, 2, 8] 19 | # g.data :Science, [2, 15, 8, 11] 20 | # g.write('side_stacked_bar.png') 21 | class Gruff::SideStackedBar < Gruff::SideBar 22 | include Gruff::Base::StackedMixin 23 | 24 | # Spacing factor applied between bars. 25 | attr_writer bar_spacing: Float | Integer 26 | 27 | # Number of pixels between bar segments. 28 | attr_writer segment_spacing: Float | Integer 29 | 30 | # Set the number output format string or lambda. 31 | # Default is +"%.2f"+. 32 | attr_writer label_formatting: nil | String | Proc 33 | 34 | # Output the values for the bars on a bar graph. 35 | # Default is +false+. 36 | attr_writer show_labels_for_bar_values: bool 37 | 38 | # Prevent drawing of column labels left of a side stacked bar graph. Default is +false+. 39 | attr_writer hide_labels: bool 40 | 41 | # @rbs target_width: (String | Float | Integer) 42 | # @rbs return: void 43 | def initialize: (?String | Float | Integer target_width) -> void 44 | 45 | private 46 | 47 | def initialize_attributes: () -> untyped 48 | 49 | def setup_data: () -> untyped 50 | 51 | def draw_graph: () -> untyped 52 | end 53 | -------------------------------------------------------------------------------- /sig/generated/gruff/spider.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/spider.rb with RBS::Inline 2 | 3 | # Experimental!!! See also the Net graph. 4 | # 5 | # Here's how to set up a Gruff::Spider. 6 | # 7 | # g = Gruff::Spider.new(30) 8 | # g.title = "Spider Graph" 9 | # g.data :Strength, [10] 10 | # g.data :Dexterity, [16] 11 | # g.data :Constitution, [12] 12 | # g.data :Intelligence, [12] 13 | # g.data :Wisdom, [10] 14 | # g.data 'Charisma', [16] 15 | # g.write("spider.png") 16 | class Gruff::Spider < Gruff::Base 17 | # Hide all text. 18 | attr_writer hide_axes: bool 19 | 20 | attr_writer rotation: Float | Integer 21 | 22 | # @rbs max_value: Float | Integer 23 | # @rbs target_width: (String | Float | Integer) 24 | # @rbs return: void 25 | def initialize: (Float | Integer max_value, ?String | Float | Integer target_width) -> void 26 | 27 | # @rbs value: bool 28 | def hide_text=: (bool value) -> untyped 29 | 30 | private 31 | 32 | def initialize_attributes: () -> untyped 33 | 34 | def setup_drawing: () -> untyped 35 | 36 | def setup_graph_measurements: () -> untyped 37 | 38 | def setup_data: () -> untyped 39 | 40 | def draw_graph: () -> untyped 41 | 42 | # @rbs value: nil | Float | Integer 43 | def normalize_points: (nil | Float | Integer value) -> untyped 44 | 45 | def draw_label: (untyped center_x, untyped center_y, untyped angle, untyped radius, untyped amount) -> untyped 46 | 47 | def draw_axes: (untyped center_x, untyped center_y, untyped radius, untyped additive_angle, ?untyped line_color) -> untyped 48 | 49 | def draw_polygon: (untyped center_x, untyped center_y, untyped additive_angle, ?untyped color) -> untyped 50 | end 51 | -------------------------------------------------------------------------------- /sig/generated/gruff/stacked_area.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/stacked_area.rb with RBS::Inline 2 | 3 | # 4 | # Here's how to set up a Gruff::StackedArea. 5 | # 6 | # g = Gruff::StackedArea.new 7 | # g.title = 'StackedArea Graph' 8 | # g.data :Jimmy, [25, 36, 86, 39, 25, 31, 79, 88] 9 | # g.data :Charles, [80, 54, 67, 54, 68, 70, 90, 95] 10 | # g.data :Julie, [22, 29, 35, 38, 36, 40, 46, 57] 11 | # g.write('stacked_area.png') 12 | class Gruff::StackedArea < Gruff::Base 13 | include Gruff::Base::StackedMixin 14 | 15 | # @deprecated 16 | def last_series_goes_on_bottom=: (untyped _value) -> untyped 17 | 18 | private 19 | 20 | def initialize_attributes: () -> untyped 21 | 22 | def setup_data: () -> untyped 23 | 24 | def draw_graph: () -> untyped 25 | end 26 | -------------------------------------------------------------------------------- /sig/generated/gruff/stacked_bar.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/stacked_bar.rb with RBS::Inline 2 | 3 | # 4 | # Here's how to set up a Gruff::StackedBar. 5 | # 6 | # g = Gruff::StackedBar.new 7 | # g.title = 'StackedBar Graph' 8 | # g.data :Art, [0, 5, 8, 15] 9 | # g.data :Philosophy, [10, 3, 2, 8] 10 | # g.data :Science, [2, 15, 8, 11] 11 | # g.write('stacked_bar.png') 12 | class Gruff::StackedBar < Gruff::Base 13 | include Gruff::Base::StackedMixin 14 | 15 | # Spacing factor applied between bars. 16 | attr_writer bar_spacing: Float | Integer 17 | 18 | # Number of pixels between bar segments. 19 | attr_writer segment_spacing: Float | Integer 20 | 21 | # Set the number output format string or lambda. 22 | # Default is +"%.2f"+. 23 | attr_writer label_formatting: nil | String | Proc 24 | 25 | # Output the values for the bars on a bar graph. 26 | # Default is +false+. 27 | attr_writer show_labels_for_bar_values: bool 28 | 29 | # Prevent drawing of column labels below a stacked bar graph. Default is +false+. 30 | attr_writer hide_labels: bool 31 | 32 | private 33 | 34 | def initialize_attributes: () -> untyped 35 | 36 | def setup_drawing: () -> untyped 37 | 38 | def setup_data: () -> untyped 39 | 40 | def setup_graph_measurements: () -> untyped 41 | 42 | # Draws a bar graph, but multiple sets are stacked on top of each other. 43 | def draw_graph: () -> untyped 44 | 45 | # @rbs return: bool 46 | def hide_labels?: () -> bool 47 | 48 | # @rbs return: bool 49 | def hide_left_label_area?: () -> bool 50 | 51 | # @rbs return: bool 52 | def hide_bottom_label_area?: () -> bool 53 | 54 | # @rbs return: Proc 55 | def proc_text_metrics: () -> Proc 56 | end 57 | -------------------------------------------------------------------------------- /sig/generated/gruff/store/basic_data.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/store/basic_data.rb with RBS::Inline 2 | 3 | module Gruff 4 | class Store 5 | # @private 6 | class BasicData 7 | attr_accessor label: String | Symbol 8 | 9 | attr_accessor points: Array[nil | Float | Integer] 10 | 11 | attr_accessor color: String 12 | 13 | # @rbs label: String | Symbol 14 | # @rbs points: Array[nil | Float | Integer] | nil 15 | # @rbs color: String 16 | def initialize: (String | Symbol label, Array[nil | Float | Integer] | nil points, String color) -> untyped 17 | 18 | alias x_points points 19 | 20 | def y_points: () -> untyped 21 | 22 | def coordinates: () -> untyped 23 | 24 | def coordinate_and_pointsizes: () -> untyped 25 | 26 | # @rbs return: bool 27 | def empty?: () -> bool 28 | 29 | # @rbs return: Integer 30 | def columns: () -> Integer 31 | 32 | # @rbs return: Float | Integer 33 | def min: () -> (Float | Integer) 34 | 35 | alias min_x min 36 | 37 | # @rbs return: Float | Integer 38 | def max: () -> (Float | Integer) 39 | 40 | alias max_x max 41 | 42 | # @rbs minimum: Float | Integer 43 | # @rbs spread: Float | Integer 44 | # @rbs return: Gruff::Store::BasicData 45 | def normalize: (minimum: Float | Integer, spread: Float | Integer) -> Gruff::Store::BasicData 46 | end 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /sig/generated/gruff/store/store.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/store/store.rb with RBS::Inline 2 | 3 | module Gruff 4 | # @private 5 | class Store 6 | attr_reader data: Array[Gruff::Store::BasicData | Gruff::Store::XYData | Gruff::Store::XYPointsizeData] 7 | 8 | # @rbs return: void 9 | def initialize: (untyped data_class) -> void 10 | 11 | def add: (*untyped args) -> untyped 12 | 13 | # @rbs return: Array[Gruff::Store::BasicData | Gruff::Store::XYData | Gruff::Store::XYPointsizeData] 14 | def norm_data: () -> Array[Gruff::Store::BasicData | Gruff::Store::XYData | Gruff::Store::XYPointsizeData] 15 | 16 | def normalize: (**untyped keywords) -> untyped 17 | 18 | # @rbs return: bool 19 | def empty?: () -> bool 20 | 21 | # @rbs return: Integer 22 | def length: () -> Integer 23 | 24 | # @rbs return: Integer 25 | def columns: () -> Integer 26 | 27 | # @rbs return: Float | Integer 28 | def min: () -> (Float | Integer) 29 | 30 | alias min_y min 31 | 32 | # @rbs return: Float | Integer 33 | def max: () -> (Float | Integer) 34 | 35 | alias max_y max 36 | 37 | # @rbs return: Float | Integer 38 | def min_x: () -> (Float | Integer) 39 | 40 | # @rbs return: Float | Integer 41 | def max_x: () -> (Float | Integer) 42 | 43 | def sort_data!: () -> untyped 44 | 45 | def sort_norm_data!: () -> untyped 46 | 47 | # @rbs return: Array[Gruff::Store::BasicData | Gruff::Store::XYData | Gruff::Store::XYPointsizeData] 48 | def reverse!: () -> Array[Gruff::Store::BasicData | Gruff::Store::XYData | Gruff::Store::XYPointsizeData] 49 | 50 | # @rbs colors: Array[String] 51 | def change_colors: (Array[String] colors) -> untyped 52 | end 53 | end 54 | -------------------------------------------------------------------------------- /sig/generated/gruff/store/xy_data.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/store/xy_data.rb with RBS::Inline 2 | 3 | module Gruff 4 | class Store 5 | # @private 6 | class XYData 7 | attr_accessor label: String 8 | 9 | attr_accessor x_points: Array[nil | Float | Integer] 10 | 11 | attr_accessor y_points: Array[nil | Float | Integer] 12 | 13 | attr_accessor color: String 14 | 15 | # @rbs label: String | Symbol 16 | # @rbs x_points: Array[nil | Float | Integer] | nil 17 | # @rbs y_points: Array[nil | Float | Integer] | nil 18 | # @rbs color: String 19 | def initialize: (String | Symbol label, Array[nil | Float | Integer] | nil x_points, Array[nil | Float | Integer] | nil y_points, String color) -> untyped 20 | 21 | alias points y_points 22 | 23 | # @rbs return: Array[[Float | Integer | nil, Float | Integer | nil]] 24 | def coordinates: () -> Array[[ Float | Integer | nil, Float | Integer | nil ]] 25 | 26 | def coordinate_and_pointsizes: () -> untyped 27 | 28 | # @rbs return: bool 29 | def empty?: () -> bool 30 | 31 | # @rbs return: Integer 32 | def columns: () -> Integer 33 | 34 | # @rbs return: Float | Integer 35 | def min: () -> (Float | Integer) 36 | 37 | alias min_y min 38 | 39 | # @rbs return: Float | Integer 40 | def max: () -> (Float | Integer) 41 | 42 | alias max_y max 43 | 44 | # @rbs return: Float | Integer 45 | def min_x: () -> (Float | Integer) 46 | 47 | # @rbs return: Float | Integer 48 | def max_x: () -> (Float | Integer) 49 | 50 | # @rbs minimum_x: Float | Integer 51 | # @rbs minimum_y: Float | Integer 52 | # @rbs spread_x: Float | Integer 53 | # @rbs spread_y: Float | Integer 54 | # @rbs return: Gruff::Store::XYData 55 | def normalize: (minimum_x: Float | Integer, minimum_y: Float | Integer, spread_x: Float | Integer, spread_y: Float | Integer) -> Gruff::Store::XYData 56 | end 57 | end 58 | end 59 | -------------------------------------------------------------------------------- /sig/generated/gruff/store/xy_pointsizes_data.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/store/xy_pointsizes_data.rb with RBS::Inline 2 | 3 | module Gruff 4 | class Store 5 | # @private 6 | class XYPointsizeData 7 | attr_accessor label: String 8 | 9 | attr_accessor x_points: Array[nil | Float | Integer] 10 | 11 | attr_accessor y_points: Array[nil | Float | Integer] 12 | 13 | attr_accessor point_sizes: Array[nil | Float | Integer] 14 | 15 | attr_accessor color: String 16 | 17 | # @rbs label: String | Symbol 18 | # @rbs x_points: Array[nil | Float | Integer] | nil 19 | # @rbs y_points: Array[nil | Float | Integer] | nil 20 | # @rbs point_sizes: Array[nil | Float | Integer] 21 | # @rbs color: String 22 | def initialize: (String | Symbol label, Array[nil | Float | Integer] | nil x_points, Array[nil | Float | Integer] | nil y_points, Array[nil | Float | Integer] point_sizes, String color) -> untyped 23 | 24 | alias points y_points 25 | 26 | def coordinates: () -> untyped 27 | 28 | # @rbs return: Array[[Float | Integer | nil, Float | Integer | nil, Float | Integer]] 29 | def coordinate_and_pointsizes: () -> Array[[ Float | Integer | nil, Float | Integer | nil, Float | Integer ]] 30 | 31 | # @rbs return: bool 32 | def empty?: () -> bool 33 | 34 | # @rbs return: Integer 35 | def columns: () -> Integer 36 | 37 | # @rbs return: Float | Integer 38 | def min: () -> (Float | Integer) 39 | 40 | alias min_y min 41 | 42 | # @rbs return: Float | Integer 43 | def max: () -> (Float | Integer) 44 | 45 | alias max_y max 46 | 47 | # @rbs return: Float | Integer 48 | def min_x: () -> (Float | Integer) 49 | 50 | # @rbs return: Float | Integer 51 | def max_x: () -> (Float | Integer) 52 | 53 | # @rbs minimum_x: Float | Integer 54 | # @rbs minimum_y: Float | Integer 55 | # @rbs spread_x: Float | Integer 56 | # @rbs spread_y: Float | Integer 57 | # @rbs return: Gruff::Store::XYPointsizeData 58 | def normalize: (minimum_x: Float | Integer, minimum_y: Float | Integer, spread_x: Float | Integer, spread_y: Float | Integer) -> Gruff::Store::XYPointsizeData 59 | end 60 | end 61 | end 62 | -------------------------------------------------------------------------------- /sig/generated/gruff/themes.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/themes.rb with RBS::Inline 2 | 3 | module Gruff 4 | module Themes 5 | # A color scheme similar to the popular presentation software. 6 | KEYNOTE: untyped 7 | 8 | # A color scheme plucked from the colors on the popular usability blog. 9 | THIRTYSEVEN_SIGNALS: untyped 10 | 11 | # A color scheme from the colors used on the 2005 Rails keynote 12 | # presentation at RubyConf. 13 | RAILS_KEYNOTE: untyped 14 | 15 | # A color scheme similar to that used on the popular podcast site. 16 | ODEO: untyped 17 | 18 | # A pastel theme 19 | PASTEL: untyped 20 | 21 | # A greyscale theme 22 | GREYSCALE: untyped 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /sig/generated/gruff/version.rbs: -------------------------------------------------------------------------------- 1 | # Generated from lib/gruff/version.rb with RBS::Inline 2 | 3 | module Gruff 4 | VERSION: ::String 5 | end 6 | -------------------------------------------------------------------------------- /test/expected/TestLabelsForNullData.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/TestLabelsForNullData.png -------------------------------------------------------------------------------- /test/expected/accum_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/accum_bar.png -------------------------------------------------------------------------------- /test/expected/accum_bar_duck_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/accum_bar_duck_typing.png -------------------------------------------------------------------------------- /test/expected/accum_bar_empty_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/accum_bar_empty_data.png -------------------------------------------------------------------------------- /test/expected/accum_bar_empty_data_nil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/accum_bar_empty_data_nil.png -------------------------------------------------------------------------------- /test/expected/accum_bar_empty_data_nil_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/accum_bar_empty_data_nil_2.png -------------------------------------------------------------------------------- /test/expected/area_duck_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/area_duck_typing.png -------------------------------------------------------------------------------- /test/expected/area_empty_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/area_empty_data.png -------------------------------------------------------------------------------- /test/expected/area_fill_opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/area_fill_opacity.png -------------------------------------------------------------------------------- /test/expected/area_keynote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/area_keynote.png -------------------------------------------------------------------------------- /test/expected/area_keynote_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/area_keynote_small.png -------------------------------------------------------------------------------- /test/expected/area_many.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/area_many.png -------------------------------------------------------------------------------- /test/expected/area_many_areas_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/area_many_areas_small.png -------------------------------------------------------------------------------- /test/expected/area_tiny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/area_tiny.png -------------------------------------------------------------------------------- /test/expected/area_wide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/area_wide.png -------------------------------------------------------------------------------- /test/expected/bar2_wrapped_legend_16_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar2_wrapped_legend_16_400.png -------------------------------------------------------------------------------- /test/expected/bar2_wrapped_legend_16_800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar2_wrapped_legend_16_800.png -------------------------------------------------------------------------------- /test/expected/bar2_wrapped_legend_30_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar2_wrapped_legend_30_400.png -------------------------------------------------------------------------------- /test/expected/bar2_wrapped_legend_30_800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar2_wrapped_legend_30_800.png -------------------------------------------------------------------------------- /test/expected/bar2_wrapped_legend_4_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar2_wrapped_legend_4_400.png -------------------------------------------------------------------------------- /test/expected/bar2_wrapped_legend_4_800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar2_wrapped_legend_4_800.png -------------------------------------------------------------------------------- /test/expected/bar2_wrapped_legend__400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar2_wrapped_legend__400.png -------------------------------------------------------------------------------- /test/expected/bar2_wrapped_legend__800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar2_wrapped_legend__800.png -------------------------------------------------------------------------------- /test/expected/bar_axis_label_with_hide_line_markers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_axis_label_with_hide_line_markers.png -------------------------------------------------------------------------------- /test/expected/bar_axis_label_with_legend_at_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_axis_label_with_legend_at_bottom.png -------------------------------------------------------------------------------- /test/expected/bar_background_gradient_bottom_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_background_gradient_bottom_top.png -------------------------------------------------------------------------------- /test/expected/bar_background_gradient_left_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_background_gradient_left_right.png -------------------------------------------------------------------------------- /test/expected/bar_background_gradient_right_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_background_gradient_right_left.png -------------------------------------------------------------------------------- /test/expected/bar_background_gradient_top_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_background_gradient_top_bottom.png -------------------------------------------------------------------------------- /test/expected/bar_background_gradient_topleft_bottomright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_background_gradient_topleft_bottomright.png -------------------------------------------------------------------------------- /test/expected/bar_background_gradient_topright_bottomleft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_background_gradient_topright_bottomleft.png -------------------------------------------------------------------------------- /test/expected/bar_duck_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_duck_typing.png -------------------------------------------------------------------------------- /test/expected/bar_empty_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_empty_data.png -------------------------------------------------------------------------------- /test/expected/bar_formatted_numbers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_formatted_numbers.png -------------------------------------------------------------------------------- /test/expected/bar_group_spacing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_group_spacing.png -------------------------------------------------------------------------------- /test/expected/bar_keynote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_keynote.png -------------------------------------------------------------------------------- /test/expected/bar_keynote_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_keynote_small.png -------------------------------------------------------------------------------- /test/expected/bar_label_format.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_label_format.png -------------------------------------------------------------------------------- /test/expected/bar_legend_at_bottom_wrapped_legend_16_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_legend_at_bottom_wrapped_legend_16_400.png -------------------------------------------------------------------------------- /test/expected/bar_legend_at_bottom_wrapped_legend_16_800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_legend_at_bottom_wrapped_legend_16_800.png -------------------------------------------------------------------------------- /test/expected/bar_legend_at_bottom_wrapped_legend_30_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_legend_at_bottom_wrapped_legend_30_400.png -------------------------------------------------------------------------------- /test/expected/bar_legend_at_bottom_wrapped_legend_30_800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_legend_at_bottom_wrapped_legend_30_800.png -------------------------------------------------------------------------------- /test/expected/bar_legend_at_bottom_wrapped_legend_4_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_legend_at_bottom_wrapped_legend_4_400.png -------------------------------------------------------------------------------- /test/expected/bar_legend_at_bottom_wrapped_legend_4_800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_legend_at_bottom_wrapped_legend_4_800.png -------------------------------------------------------------------------------- /test/expected/bar_legend_at_bottom_wrapped_legend__400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_legend_at_bottom_wrapped_legend__400.png -------------------------------------------------------------------------------- /test/expected/bar_legend_at_bottom_wrapped_legend__800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_legend_at_bottom_wrapped_legend__800.png -------------------------------------------------------------------------------- /test/expected/bar_long_legend_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_long_legend_text.png -------------------------------------------------------------------------------- /test/expected/bar_manual_colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_manual_colors.png -------------------------------------------------------------------------------- /test/expected/bar_marker_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_marker_shadow.png -------------------------------------------------------------------------------- /test/expected/bar_nearly_zero_max_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_nearly_zero_max_10.png -------------------------------------------------------------------------------- /test/expected/bar_negative_value_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_negative_value_labels.png -------------------------------------------------------------------------------- /test/expected/bar_no_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_no_labels.png -------------------------------------------------------------------------------- /test/expected/bar_no_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_no_legend.png -------------------------------------------------------------------------------- /test/expected/bar_no_line_markers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_no_line_markers.png -------------------------------------------------------------------------------- /test/expected/bar_no_line_markers_or_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_no_line_markers_or_labels.png -------------------------------------------------------------------------------- /test/expected/bar_no_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_no_title.png -------------------------------------------------------------------------------- /test/expected/bar_no_title_or_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_no_title_or_legend.png -------------------------------------------------------------------------------- /test/expected/bar_odeo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_odeo.png -------------------------------------------------------------------------------- /test/expected/bar_one_value.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_one_value.png -------------------------------------------------------------------------------- /test/expected/bar_pos_neg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_pos_neg.png -------------------------------------------------------------------------------- /test/expected/bar_rails_keynote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_rails_keynote.png -------------------------------------------------------------------------------- /test/expected/bar_set_absolute_trunc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_set_absolute_trunc.png -------------------------------------------------------------------------------- /test/expected/bar_set_label_stagger_height.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_set_label_stagger_height.png -------------------------------------------------------------------------------- /test/expected/bar_set_legend_box_size_lg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_set_legend_box_size_lg.png -------------------------------------------------------------------------------- /test/expected/bar_set_legend_box_size_sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_set_legend_box_size_sm.png -------------------------------------------------------------------------------- /test/expected/bar_set_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_set_marker.png -------------------------------------------------------------------------------- /test/expected/bar_set_trailing_dots_trunc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_set_trailing_dots_trunc.png -------------------------------------------------------------------------------- /test/expected/bar_spacing_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_spacing_full.png -------------------------------------------------------------------------------- /test/expected/bar_spacing_half.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_spacing_half.png -------------------------------------------------------------------------------- /test/expected/bar_spacing_none.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_spacing_none.png -------------------------------------------------------------------------------- /test/expected/bar_tall_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_tall_graph.png -------------------------------------------------------------------------------- /test/expected/bar_tall_graph_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_tall_graph_small.png -------------------------------------------------------------------------------- /test/expected/bar_themed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_themed.png -------------------------------------------------------------------------------- /test/expected/bar_title_margin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_title_margin.png -------------------------------------------------------------------------------- /test/expected/bar_value_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_value_labels.png -------------------------------------------------------------------------------- /test/expected/bar_wide_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_wide_graph.png -------------------------------------------------------------------------------- /test/expected/bar_wide_graph_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_wide_graph_small.png -------------------------------------------------------------------------------- /test/expected/bar_wrapped_legend_16_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_wrapped_legend_16_400.png -------------------------------------------------------------------------------- /test/expected/bar_wrapped_legend_16_800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_wrapped_legend_16_800.png -------------------------------------------------------------------------------- /test/expected/bar_wrapped_legend_30_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_wrapped_legend_30_400.png -------------------------------------------------------------------------------- /test/expected/bar_wrapped_legend_30_800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_wrapped_legend_30_800.png -------------------------------------------------------------------------------- /test/expected/bar_wrapped_legend_4_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_wrapped_legend_4_400.png -------------------------------------------------------------------------------- /test/expected/bar_wrapped_legend_4_800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_wrapped_legend_4_800.png -------------------------------------------------------------------------------- /test/expected/bar_wrapped_legend__400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_wrapped_legend__400.png -------------------------------------------------------------------------------- /test/expected/bar_wrapped_legend__800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_wrapped_legend__800.png -------------------------------------------------------------------------------- /test/expected/bar_x_y_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_x_y_labels.png -------------------------------------------------------------------------------- /test/expected/bar_y_increment_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_y_increment_1.png -------------------------------------------------------------------------------- /test/expected/bar_y_increment_2.0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_y_increment_2.0.png -------------------------------------------------------------------------------- /test/expected/bar_y_increment_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_y_increment_20.png -------------------------------------------------------------------------------- /test/expected/bar_y_increment_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_y_increment_5.png -------------------------------------------------------------------------------- /test/expected/bar_zero_marker_count.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_zero_marker_count.png -------------------------------------------------------------------------------- /test/expected/bar_zero_spacing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bar_zero_spacing.png -------------------------------------------------------------------------------- /test/expected/base_add_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/base_add_color.png -------------------------------------------------------------------------------- /test/expected/base_attribute_margins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/base_attribute_margins.png -------------------------------------------------------------------------------- /test/expected/base_bold_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/base_bold_title.png -------------------------------------------------------------------------------- /test/expected/base_font.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/base_font.png -------------------------------------------------------------------------------- /test/expected/base_label_rotation_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/base_label_rotation_1.png -------------------------------------------------------------------------------- /test/expected/base_label_rotation_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/base_label_rotation_2.png -------------------------------------------------------------------------------- /test/expected/base_label_rotation_legend_at_bottom_xy_axis_label.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/base_label_rotation_legend_at_bottom_xy_axis_label.png -------------------------------------------------------------------------------- /test/expected/base_labels_with_array.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/base_labels_with_array.png -------------------------------------------------------------------------------- /test/expected/base_legend_with_no_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/base_legend_with_no_name.png -------------------------------------------------------------------------------- /test/expected/base_margins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/base_margins.png -------------------------------------------------------------------------------- /test/expected/base_multi_line_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/base_multi_line_title.png -------------------------------------------------------------------------------- /test/expected/base_no_data_font_size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/base_no_data_font_size.png -------------------------------------------------------------------------------- /test/expected/base_object_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/base_object_labels.png -------------------------------------------------------------------------------- /test/expected/base_title_font_size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/base_title_font_size.png -------------------------------------------------------------------------------- /test/expected/bezier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bezier.png -------------------------------------------------------------------------------- /test/expected/bezier_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bezier_2.png -------------------------------------------------------------------------------- /test/expected/bezier_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bezier_3.png -------------------------------------------------------------------------------- /test/expected/bezier_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bezier_4.png -------------------------------------------------------------------------------- /test/expected/bezier_duck_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bezier_duck_typing.png -------------------------------------------------------------------------------- /test/expected/bezier_empty_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bezier_empty_data.png -------------------------------------------------------------------------------- /test/expected/box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/box.png -------------------------------------------------------------------------------- /test/expected/box_empty_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/box_empty_data.png -------------------------------------------------------------------------------- /test/expected/box_outliers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/box_outliers.png -------------------------------------------------------------------------------- /test/expected/box_spacing_factor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/box_spacing_factor.png -------------------------------------------------------------------------------- /test/expected/bubble.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bubble.png -------------------------------------------------------------------------------- /test/expected/bullet_greyscale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bullet_greyscale.png -------------------------------------------------------------------------------- /test/expected/bullet_no_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bullet_no_options.png -------------------------------------------------------------------------------- /test/expected/bullet_target_width.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/bullet_target_width.png -------------------------------------------------------------------------------- /test/expected/candlestick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/candlestick.png -------------------------------------------------------------------------------- /test/expected/candlestick_empty_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/candlestick_empty_data.png -------------------------------------------------------------------------------- /test/expected/candlestick_show_vertical_markers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/candlestick_show_vertical_markers.png -------------------------------------------------------------------------------- /test/expected/candlestick_spacing_factor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/candlestick_spacing_factor.png -------------------------------------------------------------------------------- /test/expected/dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot.png -------------------------------------------------------------------------------- /test/expected/dot_duck_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_duck_typing.png -------------------------------------------------------------------------------- /test/expected/dot_empty_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_empty_data.png -------------------------------------------------------------------------------- /test/expected/dot_manual_colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_manual_colors.png -------------------------------------------------------------------------------- /test/expected/dot_marker_shadow_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_marker_shadow_color.png -------------------------------------------------------------------------------- /test/expected/dot_nearly_zero_max_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_nearly_zero_max_10.png -------------------------------------------------------------------------------- /test/expected/dot_no_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_no_labels.png -------------------------------------------------------------------------------- /test/expected/dot_no_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_no_legend.png -------------------------------------------------------------------------------- /test/expected/dot_no_line_markers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_no_line_markers.png -------------------------------------------------------------------------------- /test/expected/dot_no_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_no_title.png -------------------------------------------------------------------------------- /test/expected/dot_no_title_or_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_no_title_or_legend.png -------------------------------------------------------------------------------- /test/expected/dot_one_value.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_one_value.png -------------------------------------------------------------------------------- /test/expected/dot_pos_neg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_pos_neg.png -------------------------------------------------------------------------------- /test/expected/dot_set_legend_box_size_lg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_set_legend_box_size_lg.png -------------------------------------------------------------------------------- /test/expected/dot_set_legend_box_size_sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_set_legend_box_size_sm.png -------------------------------------------------------------------------------- /test/expected/dot_set_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_set_marker.png -------------------------------------------------------------------------------- /test/expected/dot_set_trailing_dots_trunc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_set_trailing_dots_trunc.png -------------------------------------------------------------------------------- /test/expected/dot_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_small.png -------------------------------------------------------------------------------- /test/expected/dot_tall_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_tall_graph.png -------------------------------------------------------------------------------- /test/expected/dot_tall_graph_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_tall_graph_small.png -------------------------------------------------------------------------------- /test/expected/dot_themed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_themed.png -------------------------------------------------------------------------------- /test/expected/dot_wide_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_wide_graph.png -------------------------------------------------------------------------------- /test/expected/dot_wide_graph_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_wide_graph_small.png -------------------------------------------------------------------------------- /test/expected/dot_x_y_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_x_y_labels.png -------------------------------------------------------------------------------- /test/expected/dot_y_increment_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_y_increment_1.png -------------------------------------------------------------------------------- /test/expected/dot_y_increment_2.0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_y_increment_2.0.png -------------------------------------------------------------------------------- /test/expected/dot_y_increment_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_y_increment_20.png -------------------------------------------------------------------------------- /test/expected/dot_y_increment_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/dot_y_increment_5.png -------------------------------------------------------------------------------- /test/expected/enhancements.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/enhancements.png -------------------------------------------------------------------------------- /test/expected/enhancements_dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/enhancements_dot.png -------------------------------------------------------------------------------- /test/expected/histogram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/histogram.png -------------------------------------------------------------------------------- /test/expected/histogram_bin_width_after_data_method.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/histogram_bin_width_after_data_method.png -------------------------------------------------------------------------------- /test/expected/histogram_duck_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/histogram_duck_typing.png -------------------------------------------------------------------------------- /test/expected/histogram_empty_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/histogram_empty_data.png -------------------------------------------------------------------------------- /test/expected/histogram_minmax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/histogram_minmax.png -------------------------------------------------------------------------------- /test/expected/line_all_neg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_all_neg.png -------------------------------------------------------------------------------- /test/expected/line_all_neg_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_all_neg_400.png -------------------------------------------------------------------------------- /test/expected/line_all_neg_no_max.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_all_neg_no_max.png -------------------------------------------------------------------------------- /test/expected/line_baseline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_baseline.png -------------------------------------------------------------------------------- /test/expected/line_dot_style_diamond.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_dot_style_diamond.png -------------------------------------------------------------------------------- /test/expected/line_dot_style_square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_dot_style_square.png -------------------------------------------------------------------------------- /test/expected/line_duck_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_duck_typing.png -------------------------------------------------------------------------------- /test/expected/line_empty_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_empty_data.png -------------------------------------------------------------------------------- /test/expected/line_hang_value.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_hang_value.png -------------------------------------------------------------------------------- /test/expected/line_hide_dots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_hide_dots.png -------------------------------------------------------------------------------- /test/expected/line_hide_line_numbers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_hide_line_numbers.png -------------------------------------------------------------------------------- /test/expected/line_hide_lines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_hide_lines.png -------------------------------------------------------------------------------- /test/expected/line_jruby_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_jruby_error.png -------------------------------------------------------------------------------- /test/expected/line_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_large.png -------------------------------------------------------------------------------- /test/expected/line_large_baseline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_large_baseline.png -------------------------------------------------------------------------------- /test/expected/line_legend_at_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_legend_at_bottom.png -------------------------------------------------------------------------------- /test/expected/line_legend_at_bottom_no_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_legend_at_bottom_no_title.png -------------------------------------------------------------------------------- /test/expected/line_many.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_many.png -------------------------------------------------------------------------------- /test/expected/line_many_lines_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_many_lines_small.png -------------------------------------------------------------------------------- /test/expected/line_many_numbers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_many_numbers.png -------------------------------------------------------------------------------- /test/expected/line_marker_label_accuracy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_marker_label_accuracy.png -------------------------------------------------------------------------------- /test/expected/line_marker_x_count.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_marker_x_count.png -------------------------------------------------------------------------------- /test/expected/line_more_sets_than_colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_more_sets_than_colors.png -------------------------------------------------------------------------------- /test/expected/line_no_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_no_data.png -------------------------------------------------------------------------------- /test/expected/line_no_data_msg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_no_data_msg.png -------------------------------------------------------------------------------- /test/expected/line_no_data_other.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_no_data_other.png -------------------------------------------------------------------------------- /test/expected/line_no_data_with_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_no_data_with_empty.png -------------------------------------------------------------------------------- /test/expected/line_no_hide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_no_hide.png -------------------------------------------------------------------------------- /test/expected/line_no_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_no_legend.png -------------------------------------------------------------------------------- /test/expected/line_no_line_markers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_no_line_markers.png -------------------------------------------------------------------------------- /test/expected/line_no_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_no_title.png -------------------------------------------------------------------------------- /test/expected/line_nothing_but_the_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_nothing_but_the_graph.png -------------------------------------------------------------------------------- /test/expected/line_one_value.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_one_value.png -------------------------------------------------------------------------------- /test/expected/line_one_value_array.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_one_value_array.png -------------------------------------------------------------------------------- /test/expected/line_pos_neg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_pos_neg.png -------------------------------------------------------------------------------- /test/expected/line_pos_neg_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_pos_neg_400.png -------------------------------------------------------------------------------- /test/expected/line_reference_lines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_reference_lines.png -------------------------------------------------------------------------------- /test/expected/line_show_vertical_markers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_show_vertical_markers.png -------------------------------------------------------------------------------- /test/expected/line_similar_high_end_values.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_similar_high_end_values.png -------------------------------------------------------------------------------- /test/expected/line_similar_high_end_values_with_floor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_similar_high_end_values_with_floor.png -------------------------------------------------------------------------------- /test/expected/line_small_small_zero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_small_small_zero.png -------------------------------------------------------------------------------- /test/expected/line_small_values.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_small_values.png -------------------------------------------------------------------------------- /test/expected/line_small_values_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_small_values_small.png -------------------------------------------------------------------------------- /test/expected/line_small_zero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_small_zero.png -------------------------------------------------------------------------------- /test/expected/line_some_nil_points.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_some_nil_points.png -------------------------------------------------------------------------------- /test/expected/line_sorted_drawing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_sorted_drawing.png -------------------------------------------------------------------------------- /test/expected/line_theme_37signals_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_theme_37signals_.png -------------------------------------------------------------------------------- /test/expected/line_theme_37signals_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_theme_37signals_400.png -------------------------------------------------------------------------------- /test/expected/line_theme_keynote_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_theme_keynote_.png -------------------------------------------------------------------------------- /test/expected/line_theme_keynote_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_theme_keynote_400.png -------------------------------------------------------------------------------- /test/expected/line_theme_odeo_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_theme_odeo_.png -------------------------------------------------------------------------------- /test/expected/line_theme_odeo_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_theme_odeo_400.png -------------------------------------------------------------------------------- /test/expected/line_theme_rails_keynote_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_theme_rails_keynote_.png -------------------------------------------------------------------------------- /test/expected/line_theme_rails_keynote_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_theme_rails_keynote_400.png -------------------------------------------------------------------------------- /test/expected/line_tiny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_tiny.png -------------------------------------------------------------------------------- /test/expected/line_transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_transparent.png -------------------------------------------------------------------------------- /test/expected/line_very_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_very_small.png -------------------------------------------------------------------------------- /test/expected/line_webp.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_webp.webp -------------------------------------------------------------------------------- /test/expected/line_wide_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_wide_graph.png -------------------------------------------------------------------------------- /test/expected/line_wide_graph_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_wide_graph_small.png -------------------------------------------------------------------------------- /test/expected/line_xy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_xy.png -------------------------------------------------------------------------------- /test/expected/line_xy_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_xy_color.png -------------------------------------------------------------------------------- /test/expected/line_xy_pairs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_xy_pairs.png -------------------------------------------------------------------------------- /test/expected/line_xy_pairs_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_xy_pairs_color.png -------------------------------------------------------------------------------- /test/expected/line_y_axis_increment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/line_y_axis_increment.png -------------------------------------------------------------------------------- /test/expected/mini_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/mini_bar.png -------------------------------------------------------------------------------- /test/expected/mini_bar_duck_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/mini_bar_duck_typing.png -------------------------------------------------------------------------------- /test/expected/mini_bar_large_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/mini_bar_large_legend.png -------------------------------------------------------------------------------- /test/expected/mini_pie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/mini_pie.png -------------------------------------------------------------------------------- /test/expected/mini_pie_duck_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/mini_pie_duck_typing.png -------------------------------------------------------------------------------- /test/expected/mini_pie_right_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/mini_pie_right_legend.png -------------------------------------------------------------------------------- /test/expected/mini_side_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/mini_side_bar.png -------------------------------------------------------------------------------- /test/expected/mini_side_bar_duck_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/mini_side_bar_duck_typing.png -------------------------------------------------------------------------------- /test/expected/mini_side_bar_multi_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/mini_side_bar_multi_color.png -------------------------------------------------------------------------------- /test/expected/net_dots_tiny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_dots_tiny.png -------------------------------------------------------------------------------- /test/expected/net_duck_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_duck_typing.png -------------------------------------------------------------------------------- /test/expected/net_empty_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_empty_data.png -------------------------------------------------------------------------------- /test/expected/net_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_large.png -------------------------------------------------------------------------------- /test/expected/net_many.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_many.png -------------------------------------------------------------------------------- /test/expected/net_many_nets_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_many_nets_small.png -------------------------------------------------------------------------------- /test/expected/net_no_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_no_data.png -------------------------------------------------------------------------------- /test/expected/net_no_data_msg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_no_data_msg.png -------------------------------------------------------------------------------- /test/expected/net_no_data_other.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_no_data_other.png -------------------------------------------------------------------------------- /test/expected/net_no_data_with_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_no_data_with_empty.png -------------------------------------------------------------------------------- /test/expected/net_no_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_no_legend.png -------------------------------------------------------------------------------- /test/expected/net_no_net_markers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_no_net_markers.png -------------------------------------------------------------------------------- /test/expected/net_no_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_no_title.png -------------------------------------------------------------------------------- /test/expected/net_nothing_but_the_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_nothing_but_the_graph.png -------------------------------------------------------------------------------- /test/expected/net_similar_high_end_values.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_similar_high_end_values.png -------------------------------------------------------------------------------- /test/expected/net_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_small.png -------------------------------------------------------------------------------- /test/expected/net_small_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_small_small.png -------------------------------------------------------------------------------- /test/expected/net_small_small_zero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_small_small_zero.png -------------------------------------------------------------------------------- /test/expected/net_small_zero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_small_zero.png -------------------------------------------------------------------------------- /test/expected/net_wide_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_wide_graph.png -------------------------------------------------------------------------------- /test/expected/net_wide_graph_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/net_wide_graph_small.png -------------------------------------------------------------------------------- /test/expected/pie_adjusted_text_offset_percentage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_adjusted_text_offset_percentage.png -------------------------------------------------------------------------------- /test/expected/pie_duck_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_duck_typing.png -------------------------------------------------------------------------------- /test/expected/pie_empty_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_empty_data.png -------------------------------------------------------------------------------- /test/expected/pie_equal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_equal.png -------------------------------------------------------------------------------- /test/expected/pie_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_grey.png -------------------------------------------------------------------------------- /test/expected/pie_keynote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_keynote.png -------------------------------------------------------------------------------- /test/expected/pie_keynote_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_keynote_small.png -------------------------------------------------------------------------------- /test/expected/pie_label_format.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_label_format.png -------------------------------------------------------------------------------- /test/expected/pie_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_legend.png -------------------------------------------------------------------------------- /test/expected/pie_legend_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_legend_small.png -------------------------------------------------------------------------------- /test/expected/pie_nearly_equal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_nearly_equal.png -------------------------------------------------------------------------------- /test/expected/pie_no_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_no_data.png -------------------------------------------------------------------------------- /test/expected/pie_no_data_msg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_no_data_msg.png -------------------------------------------------------------------------------- /test/expected/pie_no_data_with_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_no_data_with_empty.png -------------------------------------------------------------------------------- /test/expected/pie_one_val.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_one_val.png -------------------------------------------------------------------------------- /test/expected/pie_pastel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_pastel.png -------------------------------------------------------------------------------- /test/expected/pie_simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_simple.png -------------------------------------------------------------------------------- /test/expected/pie_start_degree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_start_degree.png -------------------------------------------------------------------------------- /test/expected/pie_wide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_wide.png -------------------------------------------------------------------------------- /test/expected/pie_wrapped_legend_16_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_wrapped_legend_16_400.png -------------------------------------------------------------------------------- /test/expected/pie_wrapped_legend_16_800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_wrapped_legend_16_800.png -------------------------------------------------------------------------------- /test/expected/pie_wrapped_legend_30_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_wrapped_legend_30_400.png -------------------------------------------------------------------------------- /test/expected/pie_wrapped_legend_30_800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_wrapped_legend_30_800.png -------------------------------------------------------------------------------- /test/expected/pie_wrapped_legend_4_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_wrapped_legend_4_400.png -------------------------------------------------------------------------------- /test/expected/pie_wrapped_legend_4_800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_wrapped_legend_4_800.png -------------------------------------------------------------------------------- /test/expected/pie_wrapped_legend__400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_wrapped_legend__400.png -------------------------------------------------------------------------------- /test/expected/pie_wrapped_legend__800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_wrapped_legend__800.png -------------------------------------------------------------------------------- /test/expected/pie_zero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/pie_zero.png -------------------------------------------------------------------------------- /test/expected/scatter_all_neg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_all_neg.png -------------------------------------------------------------------------------- /test/expected/scatter_all_neg_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_all_neg_400.png -------------------------------------------------------------------------------- /test/expected/scatter_basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_basic.png -------------------------------------------------------------------------------- /test/expected/scatter_custom_label_format.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_custom_label_format.png -------------------------------------------------------------------------------- /test/expected/scatter_duck_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_duck_typing.png -------------------------------------------------------------------------------- /test/expected/scatter_hide_line_numbers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_hide_line_numbers.png -------------------------------------------------------------------------------- /test/expected/scatter_many.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_many.png -------------------------------------------------------------------------------- /test/expected/scatter_no_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_no_data.png -------------------------------------------------------------------------------- /test/expected/scatter_no_data_msg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_no_data_msg.png -------------------------------------------------------------------------------- /test/expected/scatter_no_data_other.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_no_data_other.png -------------------------------------------------------------------------------- /test/expected/scatter_no_hide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_no_hide.png -------------------------------------------------------------------------------- /test/expected/scatter_no_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_no_labels.png -------------------------------------------------------------------------------- /test/expected/scatter_no_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_no_legend.png -------------------------------------------------------------------------------- /test/expected/scatter_no_line_markers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_no_line_markers.png -------------------------------------------------------------------------------- /test/expected/scatter_no_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_no_title.png -------------------------------------------------------------------------------- /test/expected/scatter_nothing_but_the_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_nothing_but_the_graph.png -------------------------------------------------------------------------------- /test/expected/scatter_pos_neg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_pos_neg.png -------------------------------------------------------------------------------- /test/expected/scatter_pos_neg_400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_pos_neg_400.png -------------------------------------------------------------------------------- /test/expected/scatter_show_vertical_markers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_show_vertical_markers.png -------------------------------------------------------------------------------- /test/expected/scatter_wide_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_wide_graph.png -------------------------------------------------------------------------------- /test/expected/scatter_wide_graph_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_wide_graph_small.png -------------------------------------------------------------------------------- /test/expected/scatter_x_axis_increment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_x_axis_increment.png -------------------------------------------------------------------------------- /test/expected/scatter_xy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/scatter_xy.png -------------------------------------------------------------------------------- /test/expected/side_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar.png -------------------------------------------------------------------------------- /test/expected/side_bar_all_neg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar_all_neg.png -------------------------------------------------------------------------------- /test/expected/side_bar_axis_label_with_hide_line_markers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar_axis_label_with_hide_line_markers.png -------------------------------------------------------------------------------- /test/expected/side_bar_axis_label_with_legend_at_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar_axis_label_with_legend_at_bottom.png -------------------------------------------------------------------------------- /test/expected/side_bar_data_range.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar_data_range.png -------------------------------------------------------------------------------- /test/expected/side_bar_duck_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar_duck_typing.png -------------------------------------------------------------------------------- /test/expected/side_bar_empty_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar_empty_data.png -------------------------------------------------------------------------------- /test/expected/side_bar_group_spacing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar_group_spacing.png -------------------------------------------------------------------------------- /test/expected/side_bar_label_format.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar_label_format.png -------------------------------------------------------------------------------- /test/expected/side_bar_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar_labels.png -------------------------------------------------------------------------------- /test/expected/side_bar_labels_position.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar_labels_position.png -------------------------------------------------------------------------------- /test/expected/side_bar_no_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar_no_labels.png -------------------------------------------------------------------------------- /test/expected/side_bar_no_line_markers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar_no_line_markers.png -------------------------------------------------------------------------------- /test/expected/side_bar_no_line_markers_or_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar_no_line_markers_or_labels.png -------------------------------------------------------------------------------- /test/expected/side_bar_pos_neg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar_pos_neg.png -------------------------------------------------------------------------------- /test/expected/side_bar_set_trailing_dots_trunc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar_set_trailing_dots_trunc.png -------------------------------------------------------------------------------- /test/expected/side_bar_spacing_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar_spacing_full.png -------------------------------------------------------------------------------- /test/expected/side_bar_spacing_half.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar_spacing_half.png -------------------------------------------------------------------------------- /test/expected/side_bar_spacing_none.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_bar_spacing_none.png -------------------------------------------------------------------------------- /test/expected/side_stacked_bar_axis_label_with_hide_line_markers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_stacked_bar_axis_label_with_hide_line_markers.png -------------------------------------------------------------------------------- /test/expected/side_stacked_bar_axis_label_with_legend_at_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_stacked_bar_axis_label_with_legend_at_bottom.png -------------------------------------------------------------------------------- /test/expected/side_stacked_bar_duck_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_stacked_bar_duck_typing.png -------------------------------------------------------------------------------- /test/expected/side_stacked_bar_empty_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_stacked_bar_empty_data.png -------------------------------------------------------------------------------- /test/expected/side_stacked_bar_keynote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_stacked_bar_keynote.png -------------------------------------------------------------------------------- /test/expected/side_stacked_bar_keynote_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_stacked_bar_keynote_small.png -------------------------------------------------------------------------------- /test/expected/side_stacked_bar_label_format.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_stacked_bar_label_format.png -------------------------------------------------------------------------------- /test/expected/side_stacked_bar_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_stacked_bar_labels.png -------------------------------------------------------------------------------- /test/expected/side_stacked_bar_long_label.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_stacked_bar_long_label.png -------------------------------------------------------------------------------- /test/expected/side_stacked_bar_no_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_stacked_bar_no_labels.png -------------------------------------------------------------------------------- /test/expected/side_stacked_bar_no_line_markers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_stacked_bar_no_line_markers.png -------------------------------------------------------------------------------- /test/expected/side_stacked_bar_no_line_markers_or_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_stacked_bar_no_line_markers_or_labels.png -------------------------------------------------------------------------------- /test/expected/side_stacked_bar_overlap_coordinate_axes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_stacked_bar_overlap_coordinate_axes.png -------------------------------------------------------------------------------- /test/expected/side_stacked_bar_wide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/side_stacked_bar_wide.png -------------------------------------------------------------------------------- /test/expected/spider_37signals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_37signals.png -------------------------------------------------------------------------------- /test/expected/spider_duck_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_duck_typing.png -------------------------------------------------------------------------------- /test/expected/spider_empty_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_empty_data.png -------------------------------------------------------------------------------- /test/expected/spider_equal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_equal.png -------------------------------------------------------------------------------- /test/expected/spider_keynote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_keynote.png -------------------------------------------------------------------------------- /test/expected/spider_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_legend.png -------------------------------------------------------------------------------- /test/expected/spider_legend_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_legend_small.png -------------------------------------------------------------------------------- /test/expected/spider_lots_of_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_lots_of_data.png -------------------------------------------------------------------------------- /test/expected/spider_lots_of_data_normal_names.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_lots_of_data_normal_names.png -------------------------------------------------------------------------------- /test/expected/spider_nearly_equal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_nearly_equal.png -------------------------------------------------------------------------------- /test/expected/spider_no_axes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_no_axes.png -------------------------------------------------------------------------------- /test/expected/spider_no_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_no_background.png -------------------------------------------------------------------------------- /test/expected/spider_no_print.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_no_print.png -------------------------------------------------------------------------------- /test/expected/spider_overlay_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_overlay_1.png -------------------------------------------------------------------------------- /test/expected/spider_overlay_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_overlay_2.png -------------------------------------------------------------------------------- /test/expected/spider_rotation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_rotation.png -------------------------------------------------------------------------------- /test/expected/spider_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_small.png -------------------------------------------------------------------------------- /test/expected/spider_wide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_wide.png -------------------------------------------------------------------------------- /test/expected/spider_zero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/spider_zero.png -------------------------------------------------------------------------------- /test/expected/stacked_area_duck_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/stacked_area_duck_typing.png -------------------------------------------------------------------------------- /test/expected/stacked_area_empty_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/stacked_area_empty_data.png -------------------------------------------------------------------------------- /test/expected/stacked_area_keynote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/stacked_area_keynote.png -------------------------------------------------------------------------------- /test/expected/stacked_area_keynote_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/stacked_area_keynote_small.png -------------------------------------------------------------------------------- /test/expected/stacked_bar_axis_label_with_hide_line_markers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/stacked_bar_axis_label_with_hide_line_markers.png -------------------------------------------------------------------------------- /test/expected/stacked_bar_axis_label_with_legend_at_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/stacked_bar_axis_label_with_legend_at_bottom.png -------------------------------------------------------------------------------- /test/expected/stacked_bar_duck_typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/stacked_bar_duck_typing.png -------------------------------------------------------------------------------- /test/expected/stacked_bar_empty_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/stacked_bar_empty_data.png -------------------------------------------------------------------------------- /test/expected/stacked_bar_keynote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/stacked_bar_keynote.png -------------------------------------------------------------------------------- /test/expected/stacked_bar_keynote_no_space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/stacked_bar_keynote_no_space.png -------------------------------------------------------------------------------- /test/expected/stacked_bar_keynote_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/stacked_bar_keynote_small.png -------------------------------------------------------------------------------- /test/expected/stacked_bar_label_format.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/stacked_bar_label_format.png -------------------------------------------------------------------------------- /test/expected/stacked_bar_no_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/stacked_bar_no_labels.png -------------------------------------------------------------------------------- /test/expected/stacked_bar_no_line_markers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/stacked_bar_no_line_markers.png -------------------------------------------------------------------------------- /test/expected/stacked_bar_no_line_markers_or_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/stacked_bar_no_line_markers_or_labels.png -------------------------------------------------------------------------------- /test/expected/theme_37signals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/theme_37signals.png -------------------------------------------------------------------------------- /test/expected/theme_greyscale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/theme_greyscale.png -------------------------------------------------------------------------------- /test/expected/theme_keynote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/theme_keynote.png -------------------------------------------------------------------------------- /test/expected/theme_odeo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/theme_odeo.png -------------------------------------------------------------------------------- /test/expected/theme_pastel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/theme_pastel.png -------------------------------------------------------------------------------- /test/expected/theme_rails_keynote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/expected/theme_rails_keynote.png -------------------------------------------------------------------------------- /test/fixtures/ComicNeue-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/fixtures/ComicNeue-Regular.ttf -------------------------------------------------------------------------------- /test/fixtures/Pacifico-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/fixtures/Pacifico-Regular.ttf -------------------------------------------------------------------------------- /test/fixtures/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/fixtures/Roboto-Light.ttf -------------------------------------------------------------------------------- /test/fixtures/pc306715.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topfunky/gruff/3fb238ec506fbf24a32d492e38be3906bf3c89da/test/fixtures/pc306715.jpg -------------------------------------------------------------------------------- /test/support/appearance_assertion.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'minitest/unit' 4 | 5 | module MiniTest 6 | module Assertions 7 | def assert_same_image(expected_image_path, output_image, delta = 0.0) 8 | return if ENV['SKIP_CHECK'] 9 | # not supported yet 10 | return if RUBY_PLATFORM == 'java' 11 | return if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.4.0') 12 | 13 | expected_path = File.expand_path(expected_image_path) 14 | expected_image = Magick::Image.read(expected_path).first 15 | 16 | if output_image.is_a?(String) 17 | output_path = File.expand_path(output_image) 18 | output_image = Magick::Image.read(output_path).first 19 | end 20 | 21 | _, error = expected_image.compare_channel(output_image, Magick::PeakAbsoluteErrorMetric) 22 | @assert_same_image_retry_count = 0 23 | 24 | assert_in_delta(0.0, error, delta) 25 | rescue StandardError => e 26 | @assert_same_image_retry_count ||= 0 27 | GC.start 28 | 29 | if @assert_same_image_retry_count < 1 30 | @assert_same_image_retry_count += 1 31 | 32 | assert_same_image(expected_image_path, output_image, delta) 33 | else 34 | raise e 35 | end 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /test/test_bezier.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative 'gruff_test_case' 4 | 5 | class TestBezier < GruffTestCase 6 | def setup 7 | @data_args = [ 8 | 75, 9 | 100, 10 | { 11 | target: 80, 12 | low: 50, 13 | high: 90 14 | } 15 | ] 16 | end 17 | 18 | def test_bezier 19 | g = Gruff::Bezier.new 20 | g.title = 'Bezier?' 21 | g.data 'Series 1', [0, 100] 22 | g.write('test/output/bezier.png') 23 | 24 | assert_same_image('test/expected/bezier.png', 'test/output/bezier.png') 25 | end 26 | 27 | def test_bezier_2 28 | g = Gruff::Bezier.new 29 | g.data 'Series 2', [0, 127, 150] 30 | g.write('test/output/bezier_2.png') 31 | 32 | assert_same_image('test/expected/bezier_2.png', 'test/output/bezier_2.png') 33 | end 34 | 35 | def test_bezier_3 36 | g = Gruff::Bezier.new 37 | g.data 'Series 3', [100, 300, 200, 250] 38 | g.minimum_value = 0 39 | g.write('test/output/bezier_3.png') 40 | 41 | assert_same_image('test/expected/bezier_3.png', 'test/output/bezier_3.png') 42 | end 43 | 44 | def test_bezier_4 45 | # issue 87 46 | g = Gruff::Bezier.new 47 | g.data( 48 | 'test', 49 | [ 50 | 0.00233034904691358, 51 | 0.0024406001456790108, 52 | 0.008512412911111114, 53 | 0.03504837642469136, 54 | 0.3403206903185184, 55 | 2.9516386719456804 56 | ] 57 | ) 58 | g.write('test/output/bezier_4.png') 59 | 60 | assert_same_image('test/expected/bezier_4.png', 'test/output/bezier_4.png') 61 | end 62 | 63 | def test_empty_data 64 | g = Gruff::Bezier.new 65 | g.title = 'Contained Empty Data' 66 | g.data 'A', [] 67 | g.data 'B', [nil, +0.09, +0.19, +0.29, +0.38, +0.47, +0.56, +0.64, +0.71, +0.78] 68 | g.data 'C', nil 69 | 70 | g.write('test/output/bezier_empty_data.png') 71 | 72 | assert_same_image('test/expected/bezier_empty_data.png', 'test/output/bezier_empty_data.png') 73 | end 74 | 75 | def test_duck_typing 76 | g = Gruff::Bezier.new 77 | g.data :Bob, GruffCustomData.new([50, 19, 31, 89, 20, 54, 37, 65]), '#33A6B8' 78 | g.write('test/output/bezier_duck_typing.png') 79 | 80 | assert_same_image('test/expected/bezier_duck_typing.png', 'test/output/bezier_duck_typing.png') 81 | end 82 | end 83 | -------------------------------------------------------------------------------- /test/test_bubble.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative 'gruff_test_case' 4 | 5 | class TestBubble < GruffTestCase 6 | def test_bubble 7 | g = Gruff::Bubble.new 8 | g.theme_rails_keynote 9 | g.title = 'Bubble Graph' 10 | g.data :A, [1.1, 1.5, 1.6, 1.8, 2.0, 2.2], [1.0, 1.5, 2.0, 2.5, 4.0, 4.5], [0.1, 0.1, 0.2, 0.5, 0.2, 0.1] 11 | g.data :B, [2.5, 3.0, 3.5, 4.0, 4.2, 4.5], [6.0, 6.2, 6.4, 6.5, 6.8, 7.0], [0.4, 0.1, 0.3, 0.2, 0.3, 0.1] 12 | g.data :C, [8.0, 8.5, 8.8, 9.0, 9.2, 9.8], [7.0, 7.0, 7.4, 7.8, 8.4, 9.0], [0.2, 0.3, 0.2, 0.1, 0.4, 0.2] 13 | g.minimum_value = 0 14 | g.maximum_value = 10 15 | g.minimum_x_value = 0 16 | g.maximum_x_value = 10 17 | g.fill_opacity = 0.6 18 | g.stroke_width = 2.0 19 | g.write('test/output/bubble.png') 20 | 21 | assert_same_image('test/expected/bubble.png', 'test/output/bubble.png') 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /test/test_bullet.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative 'gruff_test_case' 4 | 5 | class TestGruffBullet < GruffTestCase 6 | def setup 7 | @data_args = [ 8 | 75, 9 | 100, 10 | { 11 | target: 80, 12 | low: 50, 13 | high: 90 14 | } 15 | ] 16 | end 17 | 18 | def test_bullet_graph 19 | g = Gruff::Bullet.new 20 | g.title = 'Monthly Revenue' 21 | g.data(*@data_args) 22 | g.replace_colors( 23 | %w[ 24 | #0779e4 25 | #4cbbb9 26 | #77d8d8 27 | #2c003e 28 | #ffa372 29 | #ffbd69 30 | #85a392 31 | #efa8e4 32 | #5a3f11 33 | #2b580c 34 | #323232 35 | #bae5e5 36 | ] 37 | ) 38 | g.write('test/output/bullet_greyscale.png') 39 | 40 | assert_same_image('test/expected/bullet_greyscale.png', 'test/output/bullet_greyscale.png') 41 | end 42 | 43 | def test_target_width 44 | g = Gruff::Bullet.new(500) 45 | g.title = 'Monthly Revenue' 46 | g.data(*@data_args) 47 | g.replace_colors( 48 | %w[ 49 | #0779e4 50 | #4cbbb9 51 | #77d8d8 52 | #2c003e 53 | #ffa372 54 | #ffbd69 55 | #85a392 56 | #efa8e4 57 | #5a3f11 58 | #2b580c 59 | #323232 60 | #bae5e5 61 | ] 62 | ) 63 | g.write('test/output/bullet_target_width.png') 64 | 65 | assert_same_image('test/expected/bullet_target_width.png', 'test/output/bullet_target_width.png') 66 | end 67 | 68 | def test_no_options 69 | g = Gruff::Bullet.new 70 | g.data(*@data_args) 71 | g.replace_colors( 72 | %w[ 73 | #0779e4 74 | #4cbbb9 75 | #77d8d8 76 | #2c003e 77 | #ffa372 78 | #ffbd69 79 | #85a392 80 | #efa8e4 81 | #5a3f11 82 | #2b580c 83 | #323232 84 | #bae5e5 85 | ] 86 | ) 87 | g.write('test/output/bullet_no_options.png') 88 | 89 | assert_same_image('test/expected/bullet_no_options.png', 'test/output/bullet_no_options.png') 90 | end 91 | end 92 | -------------------------------------------------------------------------------- /test/test_labels_for_null_data.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative 'gruff_test_case' 4 | 5 | class TestLabelsForNullData < GruffTestCase 6 | def setup 7 | @dataset = [nil, 1, 2, 1, nil] 8 | 9 | @labels = { 10 | 0 => '1', 11 | 1 => '2', 12 | 2 => '3', 13 | 3 => '4', 14 | 4 => '5' 15 | } 16 | end 17 | 18 | def test_labels 19 | g = Gruff::Line.new 20 | g.title = 'Labels For Null Data' 21 | g.labels = @labels 22 | g.data('data', @dataset) 23 | g.minimum_value = 0 24 | 25 | g.write('test/output/TestLabelsForNullData.png') 26 | 27 | assert_same_image('test/expected/TestLabelsForNullData.png', 'test/output/TestLabelsForNullData.png') 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /test/test_mini_bar.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative 'gruff_test_case' 4 | 5 | class TestMiniBar < GruffTestCase 6 | def test_simple_bar 7 | setup_single_dataset 8 | g = setup_basic_graph(Gruff::Mini::Bar, 200) 9 | g.hide_mini_legend = true 10 | write_test_file(g, 'mini_bar.png') 11 | 12 | assert_same_image('test/expected/mini_bar.png', 'test/output/mini_bar.png') 13 | end 14 | 15 | def test_large_legend 16 | g = Gruff::Mini::Bar.new(200) 17 | g.data 'a' * 50, [25, 36, 86, 39, 25, 31, 79, 88], '#113285' 18 | g.data 'b' * 50, [80, 54, 67, 54, 68, 70, 90, 95], '#86A697' 19 | g.write('test/output/mini_bar_large_legend.png') 20 | 21 | assert_same_image('test/expected/mini_bar_large_legend.png', 'test/output/mini_bar_large_legend.png') 22 | end 23 | 24 | def test_duck_typing 25 | g = Gruff::Mini::Bar.new(200) 26 | g.data :Jimmy, [25, 36, 86, 39, 25, 31, 79, 88], '#113285' 27 | g.data :Charles, [80, 54, 67, 54, 68, 70, 90, 95], '#86A697' 28 | g.data :Julie, [22, 29, 35, 38, 36, 40, 46, 57], '#E03C8A' 29 | g.data :Jane, [95, 95, 95, 90, 85, 80, 88, 100], '#72636E' 30 | g.data :Philip, [90, 34, 23, 12, 78, 89, 98, 88], '#86C166' 31 | g.data :Arthur, [5, 10, 13, 11, 6, 16, 22, 32], '#60373E' 32 | 33 | g.data :Bob, GruffCustomData.new([50, 19, 31, 89, 20, 54, 37, 65]), '#33A6B8' 34 | g.write('test/output/mini_bar_duck_typing.png') 35 | 36 | assert_same_image('test/expected/mini_bar_duck_typing.png', 'test/output/mini_bar_duck_typing.png') 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /test/test_mini_pie.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative 'gruff_test_case' 4 | 5 | class TestMiniPie < GruffTestCase 6 | def test_simple_pie 7 | g = setup_basic_graph(Gruff::Mini::Pie, 200) 8 | write_test_file(g, 'mini_pie.png') 9 | 10 | assert_same_image('test/expected/mini_pie.png', 'test/output/mini_pie.png') 11 | end 12 | 13 | def test_pie_with_legend_right 14 | g = setup_basic_graph(Gruff::Mini::Pie, 200) 15 | g.legend_position = :right 16 | write_test_file(g, 'mini_pie_right_legend.png') 17 | 18 | assert_same_image('test/expected/mini_pie_right_legend.png', 'test/output/mini_pie_right_legend.png') 19 | end 20 | 21 | def test_duck_typing 22 | g = Gruff::Mini::Pie.new(200) 23 | g.data :A, GruffCustomData.new([25]), '#113285' 24 | g.data :B, GruffCustomData.new([20]), '#86A697' 25 | g.data :C, GruffCustomData.new([55]), '#E03C8A' 26 | 27 | g.data :Bob, GruffCustomData.new([50, 19, 31, 89, 20, 54, 37, 65]), '#33A6B8' 28 | g.write('test/output/mini_pie_duck_typing.png') 29 | 30 | assert_same_image('test/expected/mini_pie_duck_typing.png', 'test/output/mini_pie_duck_typing.png') 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /test/test_mini_side_bar.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative 'gruff_test_case' 4 | 5 | class TestMiniSideBar < GruffTestCase 6 | def test_one_color 7 | @datasets = [ 8 | [:Jimmy, [25, 36, 86, 39]] 9 | ] 10 | @labels = { 11 | 0 => 'Auto', 12 | 1 => 'Entertainment', 13 | 2 => 'Food', 14 | 3 => 'Bus' 15 | } 16 | 17 | g = setup_basic_graph(Gruff::Mini::SideBar, 200) 18 | write_test_file(g, 'mini_side_bar.png') 19 | 20 | assert_same_image('test/expected/mini_side_bar.png', 'test/output/mini_side_bar.png') 21 | end 22 | 23 | def test_multi_color 24 | g = setup_basic_graph(Gruff::Mini::SideBar, 200) 25 | write_test_file(g, 'mini_side_bar_multi_color.png') 26 | 27 | assert_same_image('test/expected/mini_side_bar_multi_color.png', 'test/output/mini_side_bar_multi_color.png') 28 | end 29 | 30 | def test_duck_typing 31 | g = Gruff::Mini::SideBar.new(200) 32 | g.data :Jimmy, [25, 36, 86, 39, 25, 31, 79, 88], '#113285' 33 | g.data :Charles, [80, 54, 67, 54, 68, 70, 90, 95], '#86A697' 34 | g.data :Julie, [22, 29, 35, 38, 36, 40, 46, 57], '#E03C8A' 35 | g.data :Jane, [95, 95, 95, 90, 85, 80, 88, 100], '#72636E' 36 | g.data :Philip, [90, 34, 23, 12, 78, 89, 98, 88], '#86C166' 37 | g.data :Arthur, [5, 10, 13, 11, 6, 16, 22, 32], '#60373E' 38 | 39 | g.data :Bob, GruffCustomData.new([50, 19, 31, 89, 20, 54, 37, 65]), '#33A6B8' 40 | g.write('test/output/mini_side_bar_duck_typing.png') 41 | 42 | assert_same_image('test/expected/mini_side_bar_duck_typing.png', 'test/output/mini_side_bar_duck_typing.png') 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /test/test_render_text.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative 'gruff_test_case' 4 | 5 | class TestRenderText < GruffTestCase 6 | def test_metrics 7 | g = Gruff::Line.new 8 | g.data :Jimmy, [25, 36, 86, 39, 25, 31, 79, 88] 9 | g.data :Charles, [80, 54, 67, 54, 68, 70, 90, 95] 10 | g.title = 'hello %S' 11 | g.draw 12 | 13 | pass 14 | end 15 | end 16 | --------------------------------------------------------------------------------