I created a chart using the Highcharts API. The graph is drawn correctly and shows the correct colors in the browser. However, when I publish my website using Front Face software on a TV, it shows the wrong color, as shown in the following images.
Link to the forum for images
The code for generating this graph is as follows:
var seriesData = addSeriesData(response);
console.log("XAxiz " +JSON.stringify(seriesData));
var maxY;
if(response)
var jobsLength = response.length;
var chart = new Highcharts.Chart({
global: {
useUTC: false,
},
chart: {
renderTo: 'testJobTrends',
type: 'spline',
height : 400,
events : {
load: function () {
var i = 0;
var chart = this;
var timeIntervalJobTrends = 2000;
var timeIntervalJobTrends = 15000 / (chart.series.length );
console.log("Time Interval --> "+timeIntervalJobTrends + " length "+chart.series.length)
if(isYMaxRequired(response)) {
chart.yAxis[0].update({max:Date.UTC(1970,01,03)});
if(response[0].jobName=="C_PP_DW_PROMPT_MAIN"){
console.log(" Product Legacy ate my head");
chart.yAxis[0].update({max:Date.UTC(1970,01,03,07,0,0)});
}
}
function highlightDataPeriodically(){
var data2 = bindPointDataColorXLabelAlgo3(response[i].endTimeUTC, response[i].pointColor,response[i].xAxisUTC);
console.log("After color Change "+ JSON.stringify(data2));
chart.series[i].update({color: '#ecb631',
lineWidth:5,
data: data2,
showInLegend :true,
marker: {
radius: 5,
},
showInLegend : true
}, true, false);
console.log(" y Axis Length "+ chart.yAxis.length+" year "+response[i].slaTimeArray[0] + " Time "+ response[i].slaTimeArray[3]);
chart.yAxis[0].removePlotLine('sla-plot-line');
chart.yAxis[0].addPlotLine({
value:Date.UTC(response[i].slaTimeArray[0],response[i].slaTimeArray[1],response[i].slaTimeArray[2],response[i].slaTimeArray[3],response[i].slaTimeArray[4],response[i].slaTimeArray[5]),
color : '#614126',
width : 3,
dashStyle: 'ShortDashDot',
id : 'sla-plot-line',
label: {
text : 'SLA TIME' ,
style: {
color: '#614126',
fontWeight: 'bold'
}
}
}) ;
var data1 = bindPointDataColorXLabelAlgo2(response[i].endTimeUTC, response[i].pointColor,response[i].xAxisUTC);
if(chart.series.length > 1 ) {
chart.series[((i + chart.series.length -1) % chart.series.length)].update({color: '#99999a',
lineWidth:1,
marker: {
symbol: 'circle',
radius: 2,
},
showInLegend :false
}, true, false);
}
i++;
if(i == chart.series.length ){
i = 0;
console.log(" CLeared");
}
}
if(setIntervalJobTrendID){
console.log("Set Interval of Job Trends --> "+i);
clearInterval(setIntervalJobTrendID);
}
setIntervalJobTrendID = setInterval(highlightDataPeriodically,timeIntervalJobTrends);
highlightDataPeriodically();
},
}
},
title: {
text: "SLA Adherence : Daily",
style: {
fontFamily: 'Verdana',
color: '#003087',
fontSize: '20px',
fontWeight: 'bold'
},
},
subtitle: {
text: null,
},
xAxis: {
type: 'datetime',
tickInterval: 24 * 60 * 60 * 1000,
title: {
text: null,
},
labels: {
format: '{value:%m/%e}' ,
style: {
fontFamily: 'Verdana',
color: '#000',
fontWeight: 'bold',
fontSize: '13px',
},
rotation: -45
},
},
credits: {
enabled: false,
},
yAxis: {
type: 'datetime',
plotLines: [{
width: 3,
color: '#805e36',
dashStyle: 'dash',
zIndex: 1,
label: {
text: 'SLA 09:00AM',
align: 'right',
style: {
fontFamily: 'Verdana',
color: '#000',
fontSize: '16px',
fontWeight: 'bold'
}
}
}, {
width: 3,
color: '#b4854e',
dashStyle: 'dash',
zIndex: 1,
label: {
text: 'Soft SLA 08:00AM',
align: 'right',
y: 16,
style: {
fontFamily: 'Verdana',
color: '#000',
fontSize: '16px',
fontWeight: 'bold'
}
}
}],
title: {
text: '',
},
labels: {
formatter: function() {
return Highcharts.dateFormat('%H:%M', this.value);
},
style: {
fontFamily: 'Verdana',
color: '#000',
fontWeight: 'bold',
fontSize: '13px'
}
},
},
plotOptions: {
spline: {
dataLabels: {
enabled: false,
y: -10,
backgroundColor: '#FFF',
formatter: function() {
return Highcharts.dateFormat('%H:%M', this.y);
},
style: {
fontFamily: 'Verdana',
color: '#000',
fontSize: '20px',
fontWeight: 'bold'
}
},
},
},
tooltip: {
style:{
padding : 0,
fontWeight: 'bold',
},
crosshairs: true,
backgroundColor: null,
borderWidth: 0,
shadow: false,
formatter: function() {
return '<span style="background-color:'+ this.point.pointColor+';color:#eee">'+ this.series.name+'<br/>'+Highcharts.dateFormat('%b/%e', this.x) + ' @ ' + Highcharts.dateFormat('%H:%M', this.y) + '</span>';
},
useHTML: true,
},
legend: {
symbolWidth: 50,
itemStyle: {
fontSize:'17px',
font: '17pt Verdana, sans-serif',
fontWeight: 'bold'
},
},
series : seriesData
});
Please help me with this.