Instead of continuing the battle against spammers, we decided to close the forum for new users and topics. But don't worry, there are still plenty of ways to reach us. Most notably, we will move our attention to Stack Overflow, where we will monitor questions under the tags [highcharts], [highstock] and [highslide].
For other ways of getting in touch with us, see Highcharts Support or Highslide Support.
Torstein Hønsi, CTO, 2013-01-29function RenderChart()
{
for(var i=0;i<functionSpaceOccupied.length;i++)
{
functionSpaceOccupied[i]= parseFloat(functionSpaceOccupied[i]);
}
for(var i=0;i<totalInquiry.length;i++)
{
totalInquiry[i]= parseFloat(totalInquiry[i]);
}
for(var i=0;i<totalNonDeduct.length;i++)
{
totalNonDeduct[i]= parseFloat(totalNonDeduct[i]);
}
for(var i=0;i<totalDeduct.length;i++)
{
totalDeduct[i]= parseFloat(totalDeduct[i]);
}
for(var i=0;i<roomsForecast.length;i++)
{
roomsForecast[i]= parseFloat(roomsForecast[i]);
}
for(var i=0;i<inquiry.length;i++)
{
inquiry[i]= parseFloat(inquiry[i]);
}
for(var i=0;i<deducted.length;i++)
{
deducted[i]= parseFloat(deducted[i]);
}
for(var i=0;i<nonDeducted.length;i++)
{
nonDeducted[i]= parseFloat(nonDeducted[i]);
}
var options = new Highcharts.Chart({
chart: {
renderTo: 'container'//,
//zoomType: 'xy'
},
title: {
text: 'Combined All Chart'
},
subtitle: {
text: 'Source: www..com'
},
xAxis: [{
categories: arrAxisData }],
yAxis: [{ // Primary yAxis
labels:
{
formatter: function() {
return this.value;// + ' °C';
},
style: {
color: '#000000'
}
},
title: {
text: 'Function Space Occupied',
style: {
color: '#000000'
}
},
opposite: true
},
{ // Secondary yAxis
gridLineWidth: 0,
title: {
text: '',
style: {
color: '#7F62A9'
}
},
labels: {
formatter: function() {
return this.value;// + ' mm';
},
style: {
color: '#7F62A9'
}
}
},
{ // Tertiary yAxis
gridLineWidth: 0,
title: {
text: 'Rooms Forecast',
style: {
color: '#AA4643'
}
},
labels: {
formatter: function() {
return this.value + ' %';// + ' mb';
},
style: {
color: '#AA4643'
}
},
opposite: true}],
tooltip: {
formatter: function() {
var unit = {
'Inquiry': 'Inquiry',
'Non Deduct':'Non Deduct',
'Deduct':'Deduct',
'Function Space Occupied': 'Function Space',
'Rooms Forecast': 'Rooms Forecast %'
}[this.series.name];
return '' +'<b>'+ this.x +'</b><br/>'+ unit +': ' + this.y;// + ' ' + unit;
}
},
plotOptions: {
column: {
stacking: 'normal'
}
},
legend: {
layout: 'vertical',
align: 'left',
x: 120,
verticalAlign: 'top',
y: 80,
floating: true,
backgroundColor: '#FFFFFF'
},
series: [{
name: 'Function Space Occupied',
color: '#D1DCEE',
type: 'area',
data: functionSpaceOccupied},
{
name: 'Inquiry',
color: '#4AADC4',
type: 'column',
yAxis: 1,
data: inquiry
},{
name: 'Non Deduct',
color: '#7F62A9',
type: 'column',
yAxis: 1,
data: nonDeducted
},{
name: 'Deduct',
color: '#9BBB56',
type: 'column',
yAxis: 1,
data: deducted
},
{
name: 'Rooms Forecast',
type: 'spline',
color: '#AA4643',
yAxis: 2,
data: roomsForecast,
marker: {
enabled: false
},
dashStyle: 'shortdot'
}
]
});
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'dvGuest',
defaultSeriesType: 'column'
},
title: {
text: 'Guest Room chart'
},
xAxis: {
categories: arrAxisData
},
yAxis: {
min: 0,
title: {
text: ''
}//,
//stackLabels: {
// enabled: true,
// style: {
// fontWeight: 'bold',
// color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
// }
// }
},
legend: {
align: 'right',
x: -100,
verticalAlign: 'top',
y: 20,
floating: true,
backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColorSolid) || 'white',
borderColor: '#CCC',
borderWidth: 1,
shadow: false
},
tooltip: {
formatter: function() {
return '<b>'+ this.x +'</b><br/>'+
this.series.name +': '+ this.y +'<br/>'+
'Total: '+ this.point.stackTotal;
}
},
plotOptions: {
column: {
stacking: 'normal'
}
},
series: [{
name: 'Total Inquiry',
color: '#CDFFFF',
data: totalInquiry
}, {
name: 'Total Non Deduct',
color: '#802B57',
data: totalNonDeduct
}, {
name: 'Total Deduct',
color: '#8F8EEB',
data: totalDeduct
}]
});
});
}
Users browsing this forum: No registered users and 10 guests