The interactive charts don't support anything like that. You can try to do
the overlay yourself, though it is quite tricky to get positioning correct,
especially if your data is rather dynamic. I dug up a function I wrote that
does something like what I think you want, feel free to modify it.
/* appends a marker to a chart representing a national goal target
* parameters:
* div = the id of the div to add the markers to
* percents = array of percent values representing the positions of
each marker in the chart
* array values represent markers in descending order from the
top (ie index 0 = topmost marker)
* values of "-1" represent skipped elements (to put markers at
20% for the first and third bar, use {0.2, -1, 0.2}
* the total number of values passed must equal the total number
of bars
* top = array of distances from the top of the chart in pixels for
marker positions in the chart
* array values represent markers in descending order from the
top (ie index 0 = topmost marker)
* values of "-1" represent skipped elements
* the total number of values passed must equal the total number
of bars
* left = distance in pixels from the left edge of the chart to the
zero point on the x-axis
* width = width of the chart area (excluding axes, labels, and
legends) in pixels.
* alternatively, distance from 0% to 100% in pixels if chart
goes higher than 100%
* src = the URL of the image for the marker
*/
function appendMarkers(div, percents, top, left, width, src) {
var img;
for (i = 0; i < percents.length; i++) {
if (percents[i] >= 0) {
img = document.createElement("img");
img.src = src;
img.style.position = "absolute";
img.id = div.id + "_marker_" + i;
img.style.top = top[i] + "px";
img.style.left = left + (percents[i] * width) + "px";
div.appendChild(img);
}
}
}
The function overlays a marker that represents a goal target onto a bar
chart. It must be called *after* the chart is drawn or the markers get
wiped out. You can adapt this for other chart types, though it could be
considerably more complicated to work with some chart types.
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/wlBKfRPPyf8J.
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.