Hi guys,
I have a problem with showing double Axis's title.
Could you please give me some advice?
the source code as follows:
-----------------------------------------------------------------------------------------------------------------
<html>
<head>
<script type="text/javascript"
src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'date');
data.addColumn('number', 'rate1');
data.addColumn('number', 'rate2');
data.addColumn('number', 'rate3');
data.addColumn({type:'string', role:'annotation'});
data.addColumn('number', 'rate_avage1');
data.addColumn({type:'string', role:'annotation'});
data.addColumn({type:'boolean', role:'certainty'});
data.addColumn('number', 'rate_avage2');
data.addColumn({type:'boolean', role:'certainty'});
data.addColumn({type:'string', role:'annotation'});
data.addRows([
['12/11',0.0011,0.004,0.94,'94%',0.0019,
'0.19%',false,0.0042,false,'0.42%'],
['12/12',0.0013,0.003,0.93,'93%',0.0019, null
,false,0.0042,false, null],
['13/1' ,0.0018,0.002,0.91,'91%',0.0019, null
,false,0.0042,false, null],
['13/2' ,0.0015,0.005,0.95,'95%',0.0019, null
,false,0.0042,false, null],
['13/3' ,0.0021,0.006,0.96,'96%',0.0019,
'0.19%',false,0.0042,false,'0.42%']
]);
var options = {
title: 'rate show',
legend:{position:'top',maxLines:1},
seriesType : "bars",
vAxis:{format:'#,###.#%'},
format:'#,###.#%',
series:{0:{color:'blue',targetAxisIndex:1},
1:{color:'green',targetAxisIndex:1},
2:{type:"line",color:'red',pointSize:'5',targetAxisIndex:0},
3:{type:"line",visibleInLegend:
false,pointSize:'0',color:'blue',targetAxisIndex:1},
4:{type:"line",visibleInLegend:
false,pointSize:'0',color:'green',targetAxisIndex:1},
vAxes:{0:{title:'R1'},1:{title:'R2'}}}
};
var chart = new
google.visualization.ComboChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body><div>
<div id="chart_div" style="width: 800px; height: 400px;"></div>
<div>
</body>
</html>
-----------------------------------------------------------------------------------------------------------------
thanks,
Kelvin
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.