The Poker Copilot Blog

Tracking the development of Poker Copilot, Mac OS X software for poker analysis and statistics.

Friday, 6 June 2008

Day 6: Creating the Charts

Charts are important for my poker app. I'm using a nice open source Java charting library called JFreeChart. Well, sort of nice. It's powerful and flexible but comes with no documentation. If you actually want to know how to use it, you have to pay 30 euros for the documentation and demos. However I found it was well worth paying the money. With the help of the docs, sample code, and forums, you can make JFreeChart do just about anything.

I use JFreeChart not only to create my poker app's main charts, but also the sparklines. The sparklines were tricky, but with the helpful JFreeChart forums I soon had it sorted.

A great benefit of using JFreeChart is the ability to customise just about every aspect of a chart. Here's what my line charts looked like before I customised the line renderer:


With a bit of inspiration from Google Analytics, here's what my line charts look like now:


The customisation took about 10 lines of code. As ever, the difficulty lies in knowing what 10 lines of code to write.

3 comments:

Mike said...

Reminds me of the old story, told in many variations:

A company was having problems with their boiler and despite all their efforts they couldn't fix it so they called a gas repair man.

The man arrived and with his hammer he hit the boiler hard.

The boiler erupted back into life.

He gave them a bill for $52,000. It was listed as shown:

$2,000 - expenses
$50,000 - knowing where to hit the boiler.

Sometimes even as much as knowing where a punctuation mark is missing from a piece of code can be worth as much.

By the way, you don't know of an equivilent chart for ASP.NET, do you?

Steve McLeod said...

Mike,

your old story is spot on!

I don't know any equivalent of JFreeChart for .NET.

Steve

Loren C said...

Mike,

Take a look at zedgraph.org - it is not as nice as JFreeChart .. but it is pretty good

-Loren

 

Poker Copilot

Free 30 Day Trial

Only $69

Order risk free with our 30-day money back guarantee.

  • Poker tracking software for Mac OS X
  • Supports PokerStars, Winamax, Merge Network, Ongame Network
  • Analyses your opponents while you play
  • On-table HUD for Mac
  • Easy to use, easy to understand

Watch a demo of the major features of Poker Copilot