On-click Events for Bar Charts in OFC2
Waaaay back in November of 2008, I contributed some code to the Open Flash Chart project. At the time, most charts in the library allowed for click events within the chart - one of the few that didn’t handle clicks was the bar chart. Unfortunately, that’s exactly what I needed for bar charts in an application I was working on for a consulting job with Assembla.
Luckily, though, the project is open source (duh! It’s right there in the name!) so I decided to dig into the guts of library. This was my first experience with Adobe Flex. It was a bit intimidating at first, but the library is really well organized and it was easy to find exactly what I needed to adjust.
After an hour or so of hacking around and testing, I had successfully added on-click events to bar chart elements in Open Flash Chart. I gotta say, it was pretty satisfying. That was my first real contribution to an open source project, and it felt good.
Since I submitted my patch over a year ago, there have been several more releases of Open Flash Chart. It just keeps getting better and better, and it’s my go-to library for charts in my Rails applications.
Get the Open Flash Chart from: http://openflashchart.com/
The plugin I used to get it to play nice with my Rails application can be found at: http://github.com/pullmonkey/open_flash_chart
And finally, here are some links I’m going to use to brag about my (minor) contribution:
- Click Events for (most types of) Bar Charts
- Open Flash Chart II - Bar Graphs with on-click
Comments are closed.