Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
An easy-as-pie Ruby interface to High Charts.
Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.document
.gitignore
LICENSE
README.rdoc
Rakefile
VERSION
pie-high.gemspec

README.rdoc

Easy as Pie High Charts

This gem gives you an easy-as-pie Ruby interface to High Charts.

Usage

I really hate to say this, but at version 0.1.0, the documentation is the code comments. More to follow as I expand this gem.

In the controller

<tt>

require "high_chart"
require "high_chart_series"
@data_set = DataSet.find(:all)
@series = HighChartSeries.multi_series("name", "data", @data_set)
@my_chart = HighChart.new(@series,
                               {:title => "The Best Chart Ever", :x_axis_labels => ["Like", "Dislike", "Indifferent"], :y_axis_title => "Comparison of Apples to Oranges"}))

</tt>

In the view

<tt>

<script type="text/javascript">
    $(document).ready(function() {
        chart1 = new Highcharts.Chart(
            <%= @my_chart.to_json %>
        );
    });
</script>

<div id="high-chart-container" style="width: 100%; height: 400px"></div>

</tt>

Copyright

Copyright © 2010 Jeff Sutherland. See LICENSE for details.

Something went wrong with that request. Please try again.