Actually, i found solutions to all 3 points from above.
1.) Number 3. Not really sexy, but it works. The last parameter
assures that every bubble has the same size. The underscore character
at the beginning assures that "Line-Point" appears at the end of the
name list.
['_Line-Point 1',new Date (2009,3,1),0,0,27000],
['_Line-Point 2',new Date (2009,3,1),50000,57500,27000],
['_Line-Point 3',new Date (2009,3,1),100000,115000,27000],
['_Line-Point 4',new Date (2009,3,1),150000,172500,27000],
['_Line-Point 5',new Date (2009,3,1),200000,230000,27000],
2.) Here is the code to solve question 1 and 2. Although there are a
few shortcomings. The line is fixed and doesn't move to your data. But
just find out yourself.
-> To draw a line, use this javascript code:
function draw(){
var canvas = document.getElementById('canvastest');
var centertext = "15%";
if (canvas.getContext){
var bild = canvas.getContext('2d');
bild.lineWidth = 9.0;
bild.strokeStyle= "rgb(0,0,0)";
bild.beginPath();
bild.moveTo(125,650);
bild.lineTo(715,115);
bild.stroke();
bild.strokeStyle= "rgb(0,0,0)";
bild.beginPath();
bild.stroke();
ctx.mozTextStyle = "12pt sans serif";
ctx.fillStyle = "red";
var len = ctx.mozMeasureText(centertext);
ctx.translate((- len)/2, 0);
ctx.mozDrawText(centertext);
}
-> Insert this code in your html file:
<body onload="draw();">
<div id="chart_div" style="width: 1024px; height: 760px; z-index: 2;
filter:alpha(opacity=85); -moz-opacity: 0.85; opacity: 0.85;"></div>
<div style="position: absolute; width: 1024px; height: 760px; z-index:
1; top:0px; left:0px" id="layer1">
<canvas id="canvastest" width="1024" height="760"
style="filter:alpha(opacity=85); -moz-opacity: 0.85; opacity: 0.85;">
Works only in Firefox!
</canvas>
</div>
</body>
--
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.