winston/google_visualr — pull request #40 by greinacker (2012-08-12 22:15:12+00:00)
Title: allow decoupling of chart name and class name

From my comment in issue #38 -

> I wanted to override individual chart types (e.g. GoogleVisualr::Interactive::BarChart) to carry some extra data around before rendering. In my case I made a "ClickableBarChart". This also required redefining BaseChart.to_js, because it uses class_name to specify the Google chart type. I propose we have something like "chart_name" as a property, and in BaseChart that simply returns class_name...but in subclasses this could be overridden to be whatever was necessary.

The attached code implements this...