Sha256: 6ff85460ad478dc8f1274bc4b1a58b4012af7cfd19eb886d2652380dcc65c74a

Contents?: true

Size: 463 Bytes

Versions: 58

Compression:

Stored size: 463 Bytes

Contents

module Hyrax
  module ChartsHelper
    # @example A chart with a drilldown
    #   {
    #     "First" => {
    #       "Second" => 3,
    #       "Third" => 3
    #     }
    #   }
    # @example A chart without a drilldown
    #   {
    #     "First" => 3,
    #     "Second" => 4
    #   }
    def hash_to_chart(data)
      data = ChartData.new(data)
      {
        drilldown: { series: data.drilldown },
        series: data.series
      }
    end
  end
end

Version data entries

58 entries across 58 versions & 2 rubygems

Version Path
hyrax-2.9.6 app/helpers/hyrax/charts_helper.rb
hyrax-2.9.5 app/helpers/hyrax/charts_helper.rb
hyrax-2.9.4 app/helpers/hyrax/charts_helper.rb
hyrax-2.9.3 app/helpers/hyrax/charts_helper.rb
hyrax-2.9.2 app/helpers/hyrax/charts_helper.rb
hyrax-2.9.1 app/helpers/hyrax/charts_helper.rb
hyrax-2.9.0 app/helpers/hyrax/charts_helper.rb
hyrax-2.8.0 app/helpers/hyrax/charts_helper.rb
hyrax-2.7.2 app/helpers/hyrax/charts_helper.rb
hyrax-2.7.1 app/helpers/hyrax/charts_helper.rb
hyrax-2.7.0 app/helpers/hyrax/charts_helper.rb
hyrax-2.6.0 app/helpers/hyrax/charts_helper.rb
hyrax-3.0.0.pre.rc1 app/helpers/hyrax/charts_helper.rb
hyrax-3.0.0.pre.beta3 app/helpers/hyrax/charts_helper.rb
hyrax-2.5.1 app/helpers/hyrax/charts_helper.rb
hyrax-2.5.0 app/helpers/hyrax/charts_helper.rb
hyrax-3.0.0.pre.beta2 app/helpers/hyrax/charts_helper.rb
hyrax-2.4.1 app/helpers/hyrax/charts_helper.rb
hyrax-3.0.0.pre.beta1 app/helpers/hyrax/charts_helper.rb
hyrax-2.4.0 app/helpers/hyrax/charts_helper.rb