Sha256: c8127af12300b0c7e3a2904cbd3ca47f639c483891d6bd000e6b4cc3176e2fb5

Contents?: true

Size: 487 Bytes

Versions: 69

Compression:

Stored size: 487 Bytes

Contents

module ForestAdminDatasourceToolkit
  module Components
    module Charts
      class PieChart
        include ForestAdminDatasourceToolkit::Validations

        attr_reader :data

        def initialize(data)
          super()
          @data = data
        end

        def serialize
          data.each do |item|
            ChartValidator.validate?(!item.key?(:key) || !item.key?(:value), item, "'key', 'value'")
          end

          data
        end
      end
    end
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
forest_admin_datasource_toolkit-1.0.0.pre.beta.98 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.97 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.96 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.95 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.94 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.93 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.92 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.91 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.90 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.89 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.88 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.87 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.86 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.85 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.83 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.82 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.81 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.80 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.79 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.78 lib/forest_admin_datasource_toolkit/components/charts/pie_chart.rb