i can see 2 y axes but how can i scale the second? Where i have to put code? I get data from database using json.php which i don't include because i am sure i get results...as i said i can see lines........
function InitHighChart()
{
$("#chart").html("Wait, Loading graph...");
var options = {
chart: {
renderTo: 'chart',
borderColor: '#a1a1a1',
borderWidth: 2,
borderRadius: 13,
alignTicks: false,
height: 550
},
credits: {
enabled: false
},
title: {
text: 'Ενεργός Ισχύς / Τάση',
x: -20
},
xAxis: {
categories: [{}],
labels: {
step: 15,
rotation: -75
}
},
yAxis: [{ // Primary yAxis
labels: {
format: '{value} MWatt',
},
title: {
text: 'Ενεργός Ισχύς',
}
}, { // Secondary yAxis
title: {
text: 'Τάση',
},
labels: {
format: '{value} V',
},
opposite: true
}],
tooltip: {
formatter: function() {
var s = '<b>'+ this.x +'</b>';
$.each(this.points, function(i, point) {
s += '<br/>'+point.series.name+': '+point.y;
});
return s;
},
shared: true
},
series: [{},{}]
};
$.ajax({
url: "json.php",
data: 'show=impression',
type:'post',
dataType: "json",
success: function(data){
options.xAxis.categories = data.datetime;
options.series[0].name = '...';
options.series[0].data = data.ActiveData;
options.series[1].name = '...';
options.series[1].data = data.VoltageData;
var chart = new Highcharts.Chart(options);
},
});
}