Hi,

I am making a custom module and would like to plot an annotated timeline. The problem is I am not able to find which functions to utilize. Could someone be kind enough to share a pseudocode for the same.

Best Regards

Comments

btomic’s picture

This module is views2 style and, I think, you can't use it easily outside views as function call (or you must make views object by your module and render it through gvs). I think that the better ( simpler ) way is to implement your render function in your module (if you just need atl). All documentation about using Google API you can find at:
http://code.google.com/apis/visualization/documentation/gallery/annotate...

In GVS in file gvs.theme.inc, hook template_preprocess_views_view_gvs makes all necessary things for render all charts. ATL is after lines:

case '10':
$constructor='AnnotatedTimeLine';

So, if you need any suggestion I will glad to help.

kabslock’s picture

Hi there, thanks for your prompt response. I implemented the Timeline render function in my module and got it working.

I am a 'Views noob'. Now I would like to try and use Views to render the graph. Under GVS Style settings in Views, I get a form with many options but I am unable to use it. The drop down boxes of Date, Value-1, String Value-1 et all don't have any values. How do I fetch my values from database and pass it to Views.

Best Regards

btomic’s picture

I'm, personally, using "tablewizard" module to generate views from database table. After that, you have to check types(handlers) of views fields. In a style Values-1,2,3 must be numeric fields. Other fields are text fields (except date). Views makes problems with DATETIME database table field (you have to change date handler in views - some little hack), so it is much better to use TIMESTAMP in database. You must have date field in list of fields and it will be shown in style's Date drop box. At the othe hand, you can use other modules like "node import" or "feeds" and bring data from nodes and use node fields. But first of all check what fields you have in views.

kabslock’s picture

Thank you. I'll try as per your suggestions.

btomic’s picture

Status: Active » Closed (fixed)