Project

pie-high

0.0
No commit activity in last 3 years
No release in over 3 years
High Charts is one of the best JavaScript charting libraries there is. Here is a straight-forward Ruby API to harness all the power High Charts has to offer. Includes support for Ruport pivot tables.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.1.9
>= 1.2.9
>= 1.6.1
 Project Readme

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 © 2010 Jeff Sutherland. See LICENSE for details.