All Projects → ytbryan → chart

ytbryan / chart

Licence: MIT license
📊📉 Add beautiful and reusable charts with one line of ruby for Rails 5.x

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to chart

Chartkick
Create beautiful JavaScript charts with one line of Ruby
Stars: ✭ 5,903 (+13954.76%)
Mutual labels:  highcharts, chartjs, google-charts
Chartkick.py
Create beautiful Javascript charts with minimal code
Stars: ✭ 695 (+1554.76%)
Mutual labels:  chart, highcharts, chartjs
Aachartkit
📈📊🚀🚀🚀An elegant modern declarative data visualization chart framework for iOS, iPadOS and macOS. Extremely powerful, supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types. 极其精美而又强大的跨平台数据可视化图表框架,支持柱状图、条形图、折…
Stars: ✭ 4,358 (+10276.19%)
Mutual labels:  chart, highcharts
Vue Chartjs
📊 Vue.js wrapper for Chart.js
Stars: ✭ 4,554 (+10742.86%)
Mutual labels:  chart, chartjs
Go Chartjs
golang library to make https://chartjs.org/ plots (this is vanilla #golang, not gopherjs)
Stars: ✭ 42 (+0%)
Mutual labels:  chart, chartjs
Aachartcore Kotlin
📈📊⛰⛰⛰An elegant modern declarative data visualization chart framework for Android . Extremely powerful, supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types.极其精美而又强大的 Android 数据可视化图表框架,支持柱状图、条形图、折线图、曲线图、折线填充图、曲线填充图、气泡图、扇形图、环形图、散点图、雷达图、混合图等各种类型的多达几十种的信息图图表,完全满足工作所需.
Stars: ✭ 332 (+690.48%)
Mutual labels:  chart, highcharts
Laravel Chartjs
Simple package to facilitate and automate the use of charts in Laravel 5.x using Chartjs v2 library
Stars: ✭ 404 (+861.9%)
Mutual labels:  chart, chartjs
Chart
Quick & smart charting for STDIN
Stars: ✭ 521 (+1140.48%)
Mutual labels:  chart, chartjs
chartjs-chart-timeline
Google-like timeline chart for Chart.js.
Stars: ✭ 44 (+4.76%)
Mutual labels:  chart, chartjs
chartjs-plugin-datasource-prometheus
Chart.js plugin for Prometheus data loading
Stars: ✭ 77 (+83.33%)
Mutual labels:  chart, chartjs
Chartjs Chart Box And Violin Plot
Chart.js Box Plot addon
Stars: ✭ 91 (+116.67%)
Mutual labels:  chart, chartjs
Highcharts Chart
Polymer Element wrapper for highcharts library. Seamlessly create various types of charts from one element.
Stars: ✭ 97 (+130.95%)
Mutual labels:  chart, highcharts
React Jsx Highcharts
Highcharts built with proper React components
Stars: ✭ 336 (+700%)
Mutual labels:  chart, highcharts
React Chartjs 2
React components for Chart.js, the most popular charting library
Stars: ✭ 4,667 (+11011.9%)
Mutual labels:  chart, chartjs
Aachartcore
📈📊☕️☕️☕️An elegant modern declarative data visualization chart framework for Android. Extremely powerful, supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types.极其精美而又强大的 Android 数据可视化图表框架,支持柱状图、条形图、折线图、曲线图、折线填充图、曲线填充图、气泡图、扇形图、环形图、散点图、雷达图、混合图等各种类型的多达几十种的信息图图表,完全满足工作所需.
Stars: ✭ 424 (+909.52%)
Mutual labels:  chart, highcharts
ember-google-analytics-embed
An Ember Addon for adding analytics visualizations using the Google Analytics Embed API.
Stars: ✭ 26 (-38.1%)
Mutual labels:  chart, google-charts
Django Jchart
📈 A Django package for plotting charts using the excellent Chart.JS library.
Stars: ✭ 115 (+173.81%)
Mutual labels:  chart, chartjs
Chart.js-Rounded-Bar-Charts
Rounded Rectangles in Bar Charts
Stars: ✭ 48 (+14.29%)
Mutual labels:  chart, chartjs
Highcharts trendline
HighCharts demo of scatter plot, including a trend line
Stars: ✭ 79 (+88.1%)
Mutual labels:  chart, highcharts
Chart.qml
Chart.qml like Chart.js
Stars: ✭ 100 (+138.1%)
Mutual labels:  chart, chartjs

Chart

See an example on heroku (Example Source Code)

Chart ships with the following awesome charts:

Chart

The motivation for making chart

I was reading up on rails engine and decided to test out my new knowledge by making a gem. As my previous project involves making multiple charts, I understand the pain of having duplicate data structure and functions in javascript and ruby just for the different charts.

Chart is my solution to quickly add Javascript/HTML chart into rails. You can write coffeescript/javascript to further interact with the rendered chart. Chart is inspired by another awesome gem chartkick

The limitation of chart is that it generates in-line javascript and it does not aim to be a 100% wrapper for all chart.

Chart works with Sprockets and your asset pipeline.

Several flavours to choose from.

ChartJS (MIT License)

  • Bar Chart <%= bar :id_of_your_chart, size, data %>
  • Line Chart <%= line :id, size, data %>
  • Pie Chart <%= pie :id, size, data %>
  • Radar Chart <%= radar :id, size, data %>

NVD3 (MIT License)

  • Box Plot <%= boxplot :id, size, data %>
  • Discrete Bar <%= discrete_bar :id, size, data %>
  • Horizontal Grouped Bar <%= horizontal_grouped_bar :id, size, data %>

Google Chart (Open Source)

  • Bar Chart <%= gBar :id, size, data %>
  • Line Chart <%= gLine :id, size, data %>
  • Pie Chart <%= gPie :id, size, data %>

Highchart (Free for Personal usage but paid for Commercial)

  • Bar Chart <%= hBar %>
  • Line Chart <%= hLine %>
  • Pie Chart <%= hPie %>
  • Area Chart <%= hArea %>

Installation

Add this line to your application's Gemfile:

gem 'chart'

At Application.js, write //= require chart after turbolinks. Only require the chart if you need them.

//= require turbolinks
//= require chart
//= require chart2 (not compatible with chart 1.1.1)
//= require nvd3
//= require google
//= require highcharts

At Application.css, write *= require nvd3

*= require_tree .
*= require nvd3

Example Usage

Chart

At your View

<%= pie :pie_chart, @pieSize, @pieData%>

At your Controller

@pieSize = {
    :height => 500,
    :width => 500
  }

  @pieData = [
        {
          value: 300,
          color:"#F7464A",
          highlight: "#FF5A5E",
          label: "Red"
        },
        {
          value: 50,
          color: "#46BFBD",
          highlight: "#5AD3D1",
          label: "Green"
        },
        {
          value: 100,
          color: "#FDB45C",
          highlight: "#FFC870",
          label: "Yellow"
        },
        {
          value: 40,
          color: "#949FB1",
          highlight: "#A8B3C5",
          label: "Grey"
        },
        {
          value: 120,
          color: "#4D5360",
          highlight: "#616774",
          label: "Dark Grey"
        }

      ].to_json

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake false to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ytbryan/chart. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Contact

📮 Bryan Lim [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].