I frequently see questions come up here in regards to problems with the AnnotatedTimeline charts, which are difficult or effectively impossible to solve in ATL charts but are easily solvable using a
Dashboard with a
LineChart and a
ChartRangeFilter. I recognize that migrating may not be an easy task for some API users, so in aide of users who wish to make the migration, I am developing a tool which attempts to simplify the process to the greatest extent possible. In its most basic form, the tool requires very little changes to code based on an existing AnnotatedTimeline:
1) load the "controls" package instead of the "annotatedtimeline" package
2) change "google.visualization.AnnotatedTimeline" to "asgallant.LineChartAsAnnotatedTimeline"
3) when calling the chart's draw method, pass "true" as a 3rd parameter, to tell the tool to convert from ATL options to LineChart options
The tool also offers more comprehensive options which allow for customization of the chart and control for more advanced users (they accept the same options as ComboCharts and ChartRangeFilters, respectively). The attached "example.html" file offers more details on how to use the tool.
Events do not currently bubble up to the migration tool, but you can register for events by using one of the #getChart, #getChartWrapper, #getControl, or #getControlWrapper methods, depending on the nature of your event handler.
This is currently in beta stage, I don't recommend you use this tool for any production charts, but I would appreciate any feedback on bugs and suggestions for improvement.