I'm using the interactive chart and not image chart, where would I go
about adding the chm values?

I use it like so: (with gl_data being a json object containing my
data)

google.load("visualization", "1", {packages:["corechart"]});



var data = new google.visualization.DataTable();
        data.addColumn('string', 'Date');
        data.addColumn('number', 'Utveckling');
        data.addColumn('number', 'Indikativt');
        data.addColumn('number', 'Teoretiskt');

        data.addRows( gl_data.utveckling.length );

        var r = 0;
        for (var i in gl_data.utveckling) {
                        data.setValue( r , 1 ,  Math.round(gl_data.utveckling[i]
[1]*10000) / 100 )
                        r++;
                }
                r = 0;
                for (var i in gl_data.indikativt) {
                        data.setValue( r , 2 ,  Math.round(gl_data.indikativt[i]
[1]*10000) / 100 )
                        r++
                }
                r = 0;
                for (var i in gl_data.teoretiskt) {
                        data.setValue( r , 3 ,  Math.round(gl_data.teoretiskt[i]
[1]*10000) / 100 )
                        r++
                }
                r = 0;
                for( var i in gl_data.utveckling ){

var d;
                        //we only want to show label for first, middle and last 
value

                        if(i==0){
                                d = gl_data.utveckling[i][0];
                        }else if( i == gl_data.utveckling.length-1 ){
                                d = gl_data.utveckling[i][0];
                        }else if( i == Math.round(gl_data.utveckling.length/2) 
){
                                d = gl_data.utveckling[i][0];
                        }else{
                                d = "";
                        }
                        data.setValue(r, 0, d);
                        r++
                }

       var chart = new
google.visualization.LineChart(document.getElementById('plotcanvas_'+gl_isin));
        chart.draw(data, {width: 455, height: 320, min: 0, vAxis:
{title: '%'}, colors: ['#000000','#575757','#c5c5c5'],
backgroundColor:'#ffffff', legend:'right', tooltipFontSize:12,
fontSize: 8, pointSize:1, legendFontSize:10, lineWidth: 2,
curveType:'function'
        });

On Jun 11, 6:15 pm, KeithB <[email protected]> wrote:
> Hi Daniel,
>
> Check out the documentation section entitled "Text and Data Value
> Markers" 
> @http://code.google.com/apis/chart/docs/gallery/line_charts.html#gchar...
>
> It supports a lot of different formatting scenarios. Here's an example
> showing percentages.
>
> http://chart.apis.google.com/chart?cht=lc&chd=t:.5,.1,.2,.8,.4&chds=0...|t||F|&chm=N*p*,FF0000,-1,,12
>
> In addition, you could use a plain text marker 
> alahttp://chart.apis.google.com/chart?cht=lc&chd=t:.5,.1,.2,.8,.4&chds=0...|t||F|&chm=t10%,0000FF,0,1,10
>
> Cheers,
> Keith

-- 
You received this message because you are subscribed to the Google Groups 
"Google Chart 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-chart-api?hl=en.

Reply via email to