|
|
@@ -46,12 +46,6 @@ var HEATMAP_COLORS_YELLOW = ['#ebedf0', '#fdf436', '#ffc700', '#ff9100', '#06001 |
|
|
|
|
|
|
|
// Universal constants |
|
|
|
|
|
|
|
/** |
|
|
|
* Returns the value of a number upto 2 decimal places. |
|
|
|
* @param {Number} d Any number |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* Returns whether or not two given arrays are equal. |
|
|
|
* @param {Array} arr1 First array |
|
|
@@ -120,6 +114,7 @@ var MONTH_NAMES_SHORT = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// https://stackoverflow.com/a/11252167/6495043 |
|
|
|
|
|
|
|
|
|
|
|
function clone(date) { |
|
|
@@ -160,8 +155,6 @@ function addDays(date, numberOfDays) { |
|
|
|
date.setDate(date.getDate() + numberOfDays); |
|
|
|
} |
|
|
|
|
|
|
|
// Composite Chart |
|
|
|
// ================================================================================ |
|
|
|
var reportCountList = [152, 222, 199, 287, 534, 709, 1179, 1256, 1632, 1856, 1850]; |
|
|
|
|
|
|
|
var lineCompositeData = { |
|
|
@@ -352,7 +345,7 @@ var typeChartArgs = { |
|
|
|
height: 300, |
|
|
|
colors: customColors, |
|
|
|
|
|
|
|
maxLegendPoints: 6, |
|
|
|
// maxLegendPoints: 6, |
|
|
|
maxSlices: 10, |
|
|
|
|
|
|
|
tooltipOptions: { |
|
|
@@ -378,6 +371,12 @@ Array.prototype.slice.call(document.querySelectorAll('.aggr-type-buttons button' |
|
|
|
typeChartArgs.colors = customColors; |
|
|
|
} |
|
|
|
|
|
|
|
if (type !== 'percentage') { |
|
|
|
typeChartArgs.height = 300; |
|
|
|
} else { |
|
|
|
typeChartArgs.height = undefined; |
|
|
|
} |
|
|
|
|
|
|
|
var newChart = new Chart("#chart-aggr", typeChartArgs); |
|
|
|
if (newChart) { |
|
|
|
aggrChart = newChart; |
|
|
|