Skip to content

cziko/nochart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NoChart
=======

  No more Flash Charts!
  Don't get me wrong - this is the first prototype.
  Code is not thought trough at all. Will be improved.
  Currently only bar chart.

Future dev
=======

 * support for max value 
 * support for pie charts
 * support for point charts

Installation
=======

* cp vendor/plugins/nochart/lib/no_chart.css public/stylesheets/
* cp vendor/plugins/nochart/lib/no_chart.js public/javascripts/
* add to your layout: <%= stylesheet_link_tag 'no_chart' %>
* if want to use js UI add to your layout: <%= javascript_include_tag 'no_chart' %>
* if want to use js UI add to your body tag: onload="load_no_chart_ui();"
* chart needs to be in html element that has height defined 
* use <%= no_chart(label_x, label_y, data_array) %> to
  generate your html chart

* check out this sample:

<div style="width: 700px; height: 500px;">
  <% label_x = [] %>
  <% label_y = [] %>
  <% (1..30).each{|x| label_x << x }%>
  <% (1..30).each{|x| label_y << x }%>

  <% data_array = ["2", "3", "4", "5", "6", "4",
                   "4", "2", "1", "1", "2", "2", 
                   "4", "2", "1", "1", "2", "2", 
                   "4", "3", "1", "13", "2", "23",
                   "3", "2", "23", "22", "11", "3"] %>

  <%= no_chart(label_x, label_y, data_array) %>

</div>

or uncomment body in no_chart.css and put chart
directly in the body tags.

Copyright (c) 2009 [Pawel Niznik (cziko)], released under the MIT license

About

No more flash charts!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages