Prev | Current Page 59 | Next

David Berube

"Practical Reporting with Ruby and Rails"


In the examples so far, you??™ve seen how to print the results in a readable format. As
you??™ll learn in the next chapter, you can use other formats. Chapter 3 discusses ways that
you can take data and turn it into an attractive graph or chart.
CHAPTER 2 n CALCULATING STATISTICS WITH ACTIVE RECORD 32
Creating Graphs with Ruby
For reporting, you??™ll often need to format data as charts, which can come in a variety of
formats??”line, bar, area, and more. Such graphs won??™t be judged on functionality alone.
Their appearance is a very important factor, so you must strive to make your graphs as
attractive and understandable as possible.
Fortunately, graphing is a very common task, and several graphing utilities are available.
This chapter introduces a few of these utilities, and then demonstrates how to build
charts with Gruff, a powerful Ruby-based graphing library.
Choosing a Graphing Utility
You have many choices for creating charts with Ruby. For example, you can do simple
charting in straight Hypertext Markup Language (HTML) and Cascading Style Sheets
(CSS).


Pages:
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
przeciski pod drogami 2 1 Paula Atherton mieszkanie sosnowiec prezenty