Feb 02

There are various library for manipulating image,one of them is GD library.
In this post i quickly show how to resize an image or generate thumbnail of image using GD2.

Basic steps as follows

  1. First import image
  2. Resize an import image to desired size
  3. Export Image to desired file

above code is extracted from rchart.

Tagged with:
Nov 18

In my recent work i have face some difficulties for generating different report for different organization or client using same application,because every client have their own reporting format.

Like SAAS based application if it is generate some MIS report and if client require some more or less information depending upon his requirement we can give some editable facilities to edit and generate report.

So to fulfill this kind of requirement user editable report which contains Markup + ruby code for reporting purpose.
I am using liquid ,acts_as_flying_saucer,rchart,textile/Html for generating report.

Continue reading »

Tagged with:
Oct 01

Rchart is ruby port of the slick pChart charting library.

Using Rchart we can develop various format of chart.

  • Line Chart
  • Cubic Curve Chart
  • Bar Chart
  • Pie Chart
  • Filled Line Chart
  • Stacked Bar Chart

And many more ,You can checkout examples of rchart.Some of examples are listed below.

Stacked Bar Chart

Rchart:- Stacked Bar Chart


Rchart - 3D Pie Chart

Rchart - 3D Pie Chart

Rchart -Line Chart

Rchart -Line Chart

Rchart gem require ruby-gd gem and GD library.

To install rchart gem on ubuntu following packages needed.

  • sudo apt-get install libgd-ruby
  • sudo apt-get install libpng-dev
  • sudo apt-get install libgd2-xpm-dev
  • sudo gem install ruby-gd

After installing rchart,You can checkout examples of rchart.

More examples of rchart is available on http://amardaxini.github.com/rchart/.

Online Documentation is available on http://rdoc.info/gems/rchart/1.1.1/frames

If you have found any difficulties to install or running rchart,then comment on this post or write issues on github.

Tagged with:
preload preload preload