Sha256: e4df4506e66f9a85ab99740cde579e642a8b5830e4b7cb7c451d7faf5a4e59bc

Contents?: true

Size: 458 Bytes

Versions: 1

Compression:

Stored size: 458 Bytes

Contents

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require "pi_charts"

# create a new line chart
chart = PiCharts::Bar.new

# add labels ( x values )

chart.add_labels(["January", "February", "March", "April", "May"])

# add datasets
chart.add_dataset(label: "cats", data: [ 3, 1, 3, 3 ])
chart.add_dataset(label: "dogs", data: [ 7, 3, 3, 1 ])

# neat 'lil configurations
chart.hover
chart.responsive

# generate html / js for chart
puts chart.html

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pi_charts-1.0.0 examples/bar_chart.rb