Sha256: 094d0cdecb4aeb16a55ce778b6ef5092b6f5e410bfe48b9eccbd37131980fefa

Contents?: true

Size: 533 Bytes

Versions: 1

Compression:

Stored size: 533 Bytes

Contents

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

# create a new line chart
chart = PiCharts::Line.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, 7])
chart.add_dataset(label: "dogs", data: [7, 3, 3, 1, 3])

# no line for cats or dogs
chart.no_line("cats")
chart.no_line("dogs")

# 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/line_chart_no_line.rb