Unfortunately, you cannot stack some series and not others.  Either all the 
bars are stacked or none of them are.

On Thursday, January 23, 2014 5:07:37 AM UTC-5, User wrote:
>
> I'm facing a problem with creating a Google Chart. I want to have 2 normal 
> bars and a stacked bar based on 2 variables besides it in one chart. Below 
> my code so far:
>
>>   google.load("visualization", "1", {packages:["corechart"]});
>>   google.setOnLoadCallback(drawChart);
>>
>>   function drawChart() {
>>
>>     var data = google.visualization.arrayToDataTable([
>>
>>       ['H axis',        'Name 1',                   'Name 2',                
>>        'Name 3',           'Name 4'],
>>
>>       ['Label',         <?php echo $var1; ?>,       <?php echo $var2; ?>,    
>>    <?php echo $var3; ?>,       <?php echo $var4; ?>]
>>
>>     ]);
>>
>>     var options = {
>>
>>       chartArea:{left:100,top:50,width:"70%",height:"70%"},
>>       title: 'Title',
>>       isStacked: false,
>>       series: { 0: {type: "bars", isStacked: false},
>>                 1: {type: "bars", isStacked: false},
>>                 2: {type: "steppedArea", isStacked: true},
>>                 3: {type: "steppedArea", isStacked: true}},
>>       hAxis: {title: 'Title', titleTextStyle: {color: 'red'}},
>>       vAxis: {title: 'Title', titleTextStyle: {color: 'red'}}
>>
>>     };
>>
>>     var chart = new 
>> google.visualization.ColumnChart(document.getElementById('chart1'));
>>
>>     chart.draw(data, options);
>>
>>   }
>>
>>
> I tried to create a combo chart with help of the Google pages. Searching 
> on Google gave me no relevant results so I was wondering if the expert here 
> could help me. Attached an example of my preferred output.
>
> This is my first post so I hope I am doing this correctly.
>
> Thanks in advance!
>
> P.S. I'm Dutch so please don't mind my English.
>

-- 
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.

Reply via email to