|
|
@@ -282,10 +282,6 @@ class SvgTip { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Returns the value of a number upto 2 decimal places. |
|
|
|
* @param {Number} d Any number |
|
|
|
*/ |
|
|
|
function floatTwo(d) { |
|
|
|
return parseFloat(d.toFixed(2)); |
|
|
|
} |
|
|
@@ -2687,7 +2683,7 @@ class Heatmap extends BaseChart { |
|
|
|
s.start = clone(this.data.start); |
|
|
|
s.end = clone(this.data.end); |
|
|
|
|
|
|
|
s.firstWeekStart = setDayToSunday(s.start); |
|
|
|
s.firstWeekStart = clone(s.start); |
|
|
|
s.noOfWeeks = getWeeksBetween(s.start, s.end); |
|
|
|
s.distribution = calcDistribution( |
|
|
|
Object.values(this.data.dataPoints), HEATMAP_DISTRIBUTION_SIZE); |
|
|
@@ -2866,13 +2862,19 @@ class Heatmap extends BaseChart { |
|
|
|
} |
|
|
|
|
|
|
|
getCol(startDate, month, empty = false) { |
|
|
|
let s = this.state; |
|
|
|
|
|
|
|
// startDate is the start of week |
|
|
|
let currentDate = clone(startDate); |
|
|
|
let col = []; |
|
|
|
|
|
|
|
for(var i = 0; i < NO_OF_DAYS_IN_WEEK; i++, addDays(currentDate, 1)) { |
|
|
|
let config = {}; |
|
|
|
if(empty || currentDate.getMonth() !== month) { |
|
|
|
|
|
|
|
// Non-generic adjustment for entire heatmap, needs state |
|
|
|
let currentDateWithinData = currentDate >= s.start && currentDate <= s.end; |
|
|
|
|
|
|
|
if(empty || currentDate.getMonth() !== month || !currentDateWithinData) { |
|
|
|
config.yyyyMmDd = getYyyyMmDd(currentDate); |
|
|
|
} else { |
|
|
|
config = this.getSubDomainConfig(currentDate); |
|
|
@@ -3577,7 +3579,6 @@ class AxisChart extends BaseChart { |
|
|
|
// removeDataPoint(index = 0) {} |
|
|
|
} |
|
|
|
|
|
|
|
// import MultiAxisChart from './charts/MultiAxisChart'; |
|
|
|
const chartTypes = { |
|
|
|
// multiaxis: MultiAxisChart, |
|
|
|
percentage: PercentageChart, |
|
|
|