Sha256: f6b31754c45dbf33d78f831089fd062c42fc231b075160d47ca96a769800fa6f

Contents?: true

Size: 279 Bytes

Versions: 2

Compression:

Stored size: 279 Bytes

Contents

colors = Aeternitas::WebUi::ColorGenerator.new(@datasets.count)

json.labels @labels
json.datasets do
  json.array! @datasets do |pollable, data|
    json.label pollable
    json.data data
    json.backgroundColor colors.next.hex
    json.borderColor colors.current.hex
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
aeternitas_web_ui-0.2.1 app/views/aeternitas/web_ui/dashboard/future_polls.json.jbuilder
aeternitas_web_ui-0.2.0 app/views/aeternitas/web_ui/dashboard/future_polls.json.jbuilder