Hi,

I have been using the AnnotatedTimeline for a while and I must say
that the documentation is modest at best.
Many things should be explained for clarity, but are not.
The developer is left with guessing which is time consuming.

When you create these docs they should focus on providing as much
important information as possible.

Take this as an example:
http://code.google.com/apis/visualization/documentation/reference.html#DataTable_setProperties

"properties is an Object (name/value map) with additional properties
for this row. If null is specified, all additional properties of the
row will be removed."

Ok. Thanks! Now I just need to try to pass values with random keys and
hope that something might happen.

What is the properties Map keys ? I don't get it. I can find no
example.

Google also refuses to give you the source code so that you can have a
look these things, or is it available out there somewhere? So how do I
figure this out?

This is evident on all major Google documentations that I have
encountered. Including the Android docs. They are large but they often
lack essential information to help make a decision.

Ok. Now my question...

I want to add annotations to columns...

I do this with :

data.setValue, data.setCell ... or we can do this with addRows if you
want to...  none is working for me...

The documenttaion
http://code.google.com/apis/visualization/documentation/gallery/annotatedtimeline.html
claims that :

Annotation title - [Optional, String] If a string column follows the
value column, and the displayAnnotations option is true, this column
holds a short title describing this point. For instance, if this line
represents temperature in Brazil, and this point is a very high
number, the title could be "Hottest day on record".

Annotation text - [Optional string] If a second string column exists
for this series, the cell value will be used as additional descriptive
text for this point. You must set the option displayAnnotations to
true to use this column. You can use HTML tags, if you set allowHtml
to true; there is essentially no size limit, but note that excessively
long entries might overflow the display section. You are not required
to have this column even if you have an annotation title column for
this point. The column label is not used by the chart. For example, if
this were the hottest day on record point, you might say something
like "Next closest day was 10 degrees cooler!".
Configuration Options


That basically means that I should be able to do ( asumming a date
column and a number column added),

that I should be able to do:
addRows ([
[new Date(...), 1, 'title', 'text']
[new Date(...), 2, 'title', 'text']
]

But nothing happens. The other columns can not be used. Do I really
have to add a separate column for annotations only, and if so ( no
problem) how the heck do I add the text to it and not only the title ?
I can't get teh text to appear anywhere...

Here is an example you can try in:
http://code.google.com/apis/ajax/playground/?type=visualization#annotated_time_line

function drawVisualization() {
  var data = new google.visualization.DataTable();
  data.addColumn('date', 'Date');
  data.addColumn('number', 'Sold Pencils');
  data.addRows(2);

  data.setValue(0, 0, new Date(2008, 1 ,1));
  data.setValue(0, 1, 30000, 'aaaa', 'bbbb');

  data.setValue(1, 0, new Date(2008, 1 ,2));
  data.setValue(1, 1, 14045, 'aaaa');


  var annotatedtimeline = new google.visualization.AnnotatedTimeLine(
      document.getElementById('visualization'));
  annotatedtimeline.draw(data, {'displayAnnotations': true});
}

Just paste it...






-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to