Hi,
I am trying to put a line chart and a column chart atop each other. Their x-axis is same and they are related as well.
Problem is, they are not "exactly" aligned with each other. While the line chart doesn't have any leading and trailing lines outside chart area , the Column chart has those little ones. That's the reason , even though their chart area is exactly the same , they don't align.
Here is the code for Column Chart :
---------------------------------------------------
var options = {
title: '# SPRs Resolved Each Week',
chartArea:{
top:'10%',
left:40,
width:'100%',
height:'80%'
},
colors:['#696969'
,'#00B0F0'
,'#FF8585'],
explorer: {
actions: ['dragToZoom', 'rightClickToReset']
},
legend : {position: 'in', textStyle: {color: 'black', fontSize: 12}},
hAxis: {
ticks: ticksArray,
slantedText: true
},
isStacked: true
};
var chart = new google.visualization.ColumnChart(document.getElementById("div1"));
chart.draw(data, options);
And the code for Line Chart :
--------------------------------------------
var options = {
title: 'Open SPR Trends',
titleTextStyle: {
bold: true,
color: 'black',
fontSize: 13
},
explorer: {
actions: ['dragToZoom', 'rightClickToReset']
},
chartArea:{top:'10%',left:40,width:'100%',height:'80%'},
hAxis: {
ticks: ticksArray,
slantedText: true
},
legend: {
position: 'in',
textStyle: {
fontSize: 12
}
},
series: [
{color: '#00B0F0'},
{color: '#FF8585'},
{color: '#92D050'},
{color: '#FF8585', lineWidth : 4},
{color: '#92D050', lineWidth : 4}
]
};
var chart = new google.visualization.LineChart(document.getElementById('div2'));
chart.draw(data, options);
PFA the charts as in my web page.
Any suggestions / help is much appreciated !!!
Regards,
Arghya