Thanks for your help
This is my full code
<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 = google.visualization.arrayToDataTable([
['Années', 'Revenus', 'Charges','Disponibilités'],
[1, 138, 126.35,30],
[2, 138, 126.525,42],
[3, 138, 126.525,53],
[4, 138, 126.525,65],
[5, 138, 126.525,77],
[6, 135, 126.525,89],
[7, 135, 125.7875,99],
[8, 135, 125.7875,110],
[9, 135, 122.6071226191,121],
[10, 135, 122.6071226191,135],
[11, 135, 119.9930517759,149],
[12, 135, 119.48957766385,167],
[13, 134, 119.48957766385,186],
[14, 134, 119.73436649577,204],
[15, 134, 119.73436649577,222],
[16, 134, 119.73436649577,240],
[17, 134, 119.73436649577,259],
[18, 134, 119.73436649577,278],
[19, 134, 119.73436649577,297],
[20, 57, 99.394543791129,317],
[21, 56, 98.394543791129,281],
[22, 56, 98.394543791129,247],
[23, 56, 87.394543791129,212],
[24, 51, 85.394543791129,187],
[25, 51, 85.394543791129,158],
[26, 51, 85.394543791129,129],
[27, 52, 85.394543791129,99],
[28, 52, 85.394543791129,69],
[29, 51, 85.394543791129,39],
[30, 51, 85.394543791129,7],
[31, 51, 85.394543791129,-25],
[32, 51, 85.394543791129,-58],
[33, 51, 85.394543791129,-92],
[34, 51, 85.394543791129,-127],
]);
var view = new google.visualization.DataView(data);
view.setRows(view.getFilteredRows([{column: 0, minValue:0},{column:
1, minValue:0},{column: 2, minValue:0}]));
var options = {
legend : {position: 'top', textStyle: {fontName: 'Arial', fontSize:
'12', color: '666666'}},
hAxis: { gridlines: { count:'0'}},
vAxes:{
0: {minValue : 0, textStyle: {fontName: 'Arial', fontSize:
'12', color:'006699' },}, // Left axis
1: {minValue : 0, textStyle: {fontName: 'Arial', fontSize:
'12', color:'FF9900' },} // Right axis
},
series: {
0: {
targetAxisIndex: 0,
type: 'line'
},
1: {
targetAxisIndex:0,
type: 'line'
},
2: {
targetAxisIndex: 1,
type: 'area'
}},
colors: ['006699','33CCFF','FF9900'],
areaOpacity:0.1
};
var chart = new
google.visualization.ComboChart(document.getElementById('chart_div'));
chart.draw(view, options);
}
</script>
</div>
</div>
<div id="chart_div" style=" margin-left:160px;float:left;width: 900px;
height: 300px;"></div>
Corinne
On Friday, April 5, 2013 4:04:33 PM UTC+2, asgallant wrote:
>
> I need to see a working example in order to figure out what the problem
> is; can you provide your full code or a link to the page?
>
> On Friday, April 5, 2013 4:21:07 AM UTC-4, corinne zaoui wrote:
>>
>> Hi,
>>
>> I try to fix minValue at 0 like this
>>
>> var view = new google.visualization.DataView(data);
>> view.setRows(view.getFilteredRows([{column: 0,
>> minValue:0},{column: 1, minValue:0},{column: 2, minValue:0}]));
>> var options = {
>> legend : {position: 'top', textStyle: {fontName: 'Arial',
>> fontSize: '12', color: '666666'}},
>> hAxis: { gridlines: { count:'0'}},
>> vAxes:{
>> 0: {minValue : 0, textStyle: {fontName: 'Arial', fontSize:
>> '12', color:'006699' },}, // Left axis
>> 1: {minValue : 0, textStyle: {fontName: 'Arial', fontSize:
>> '12', color:'FF9900' },} // Right axis
>>
>> But I have always negative values?
>> What it's wrong?
>> Thanks
>>
>
--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.