Commit c3b8d363 authored by prumde's avatar prumde

Changes for SUN CHC KPI Dashboard

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@217000 ce508802-f39f-4f6c-b175-0d175dae99d5
parent cf769e20
......@@ -74,7 +74,7 @@
},
{
id: "GREEN",
expression: " 81 < data[0] ",
expression: " 81 <= data[0] ",
colors: [[0, 199, 153], [248, 248, 248]]
}
]
......@@ -155,9 +155,11 @@
tooltips: {
callbacks: {
label: function(tooltipItem, data) {
console.log('tooltipItem', tooltipItem, data.datasets[0].dataSource) ;
var label = tooltipItem.yLabel + ' Calls on ' + tooltipItem.xLabel + ' 2020 ' + data.datasets[0].dataSource;
//console.log('tooltipItem', tooltipItem, data) ;
var currentYear = (data.datasets[0].dataSource == 'YTD') ? ' ' : ' ' + new Date().getFullYear();
var labelTxt = (data.datasets[0].dataSource == 'YTD') ? ' Calls in ' : ' Calls on ';
//var label = tooltipItem.yLabel + ' Calls on ' + tooltipItem.xLabel + ' 2020 ';
var label = tooltipItem.yLabel + labelTxt + tooltipItem.xLabel + currentYear;
return label;
},
title: function(tooltipItem, data) {
......@@ -182,21 +184,21 @@
return label;
}
},
fontSize: 8
fontSize: 7
}
}
],
yAxes: [
{
ticks: {
callback: function( label, index, labels ) {
if ( /\s/.test( label ) ) {
return label.split( " " );
} else {
return label;
fontSize: 10,
beginAtZero: true,
min: 0,
callback: function(value, index, values) {
if (Math.floor(value) === value) {
return value;
}
}
},
fontSize: 10
}
}
]
......@@ -257,7 +259,7 @@
x_column: 'X_VALUE',
x_column_label: 'Duration',
y_column: 'ACTUAL_VALUE',
y_column_label: 'Orders',
y_column_label: 'Orders ( in \u20B9 )',
datasets: [
{
fill: true,
......@@ -278,8 +280,11 @@
tooltips: {
callbacks: {
label: function(tooltipItem, data) {
console.log('tooltipItem', tooltipItem, data) ;
var label = tooltipItem.yLabel + ' Orders on ' + tooltipItem.xLabel + ' 2020 ';
//console.log('tooltipItem', tooltipItem, data) ;
var currentYear = (data.datasets[0].dataSource == 'YTD') ? ' ' : ' ' + new Date().getFullYear();
var labelTxt = (data.datasets[0].dataSource == 'YTD') ? ' Orders in ' : ' Orders on ';
//var label = tooltipItem.yLabel + ' Orders on ' + tooltipItem.xLabel + ' 2020 ';
var label = '\u20B9 ' + tooltipItem.yLabel + labelTxt + tooltipItem.xLabel + currentYear;
return label;
},
title: function(tooltipItem, data) {
......@@ -304,21 +309,21 @@
return label;
}
},
fontSize: 8
fontSize: 7
}
}
],
yAxes: [
{
ticks: {
callback: function( label, index, labels ) {
if ( /\s/.test( label ) ) {
return label.split( " " );
} else {
return label;
fontSize: 10,
beginAtZero: true,
min: 0,
callback: function(value, index, values) {
if (Math.floor(value) === value) {
return value;
}
}
},
fontSize: 10
}
}
]
......@@ -398,8 +403,11 @@
tooltips: {
callbacks: {
label: function(tooltipItem, data) {
console.log('tooltipItem', tooltipItem, data) ;
var label = tooltipItem.yLabel + ' Items on ' + tooltipItem.xLabel + ' 2020 ';
//console.log('tooltipItem', tooltipItem, data) ;
var currentYear = (data.datasets[0].dataSource == 'YTD') ? ' ' : ' ' + new Date().getFullYear();
var labelTxt = (data.datasets[0].dataSource == 'YTD') ? ' Items in ' : ' Items on ';
//var label = tooltipItem.yLabel + ' Items on ' + tooltipItem.xLabel + ' 2020 ';
var label = tooltipItem.yLabel + labelTxt + tooltipItem.xLabel + currentYear;
return label;
},
title: function(tooltipItem, data) {
......@@ -424,21 +432,21 @@
return label;
}
},
fontSize: 8
fontSize: 7
}
}
],
yAxes: [
{
ticks: {
callback: function( label, index, labels ) {
if ( /\s/.test( label ) ) {
return label.split( " " );
} else {
return label;
fontSize: 10,
beginAtZero: true,
min: 0,
callback: function(value, index, values) {
if (Math.floor(value) === value) {
return value;
}
}
},
fontSize: 10
}
}
]
......@@ -476,12 +484,9 @@
charts_config: {
image: 'total_calls.svg',
title_column: 'Total Calls',
theme : 'violet'
},
chart_properties: {
chartType: 'percentage',
labels: [''],
theme : 'violet',
options: {
percentFactorColumn: 'TARGET_VALUE',
animateScale: true,
animateRotate: true,
width: 114,
......@@ -505,7 +510,7 @@
},
{
id: "GREEN",
expression: " 81 < data[0] ",
expression: " 81 <= data[0] ",
colors: [[0, 199, 153], [248, 248, 248]]
}
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment