HI Support,
Please see the code below,
The second data is does not display correctly, each value is 18 (as its a target)
But on the graph the values with 18 are showing higher for all 3.
also the scale on the left goes 0,10,20,30 but the scale on the right goes 0,5,10,15,20
?
Can you help please
Thanks
Andy
var chart = new CanvasJS.Chart(‘chartContainer2’,
{
theme: ‘theme3’,
animationEnabled: true,
title:{
text: ‘ASCOFA1 – Permanent Admissions of younger adults (aged 18 to 64) to residential and nursing care homes. per 100,000 population’,
fontSize: 15
},
toolTip: {
shared: true
},
axisY: {
title: ”
},
axisY2: {
title: ”
},
data: [{
type: ‘column’,
name: ‘Yr End 2015/15’,
legendText: ‘OutTurn’,
showInLegend: true,
dataPoints:[
{label: ‘Year End 2014/15’, y: 23},
{label: ‘Qtr 2 2015/16’, y: 12},
{label: ‘Year End 2015/16’, y: 0}]
},{
type: ‘column’,
name: ‘Target’,
legendText: ‘Target 15-16’,
axisYType: ‘secondary’ ,
showInLegend: true,
dataPoints:[
{label: ‘Year End 2014/15’, y: 18},
{label: ‘Qtr 2 2015/16’, y: 18},
{label: ‘Year End 2015/16′, y: 18}]
}],
legend:{
cursor:’pointer’,
itemclick: function(e){
if (typeof(e.dataSeries.visible) === ‘undefined’ || e.dataSeries.visible) {
e.dataSeries.visible = false;
}
else {
e.dataSeries.visible = true;
}
chart.render();
}
},
});
chart.render();