|
@@ -117,23 +117,23 @@ export class HeatmapRenderer {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
getYAxisWidth(elem) {
|
|
getYAxisWidth(elem) {
|
|
|
- const axis_text = elem.selectAll('.axis-y text').nodes();
|
|
|
|
|
- const max_text_width = _.max(
|
|
|
|
|
- _.map(axis_text, text => {
|
|
|
|
|
|
|
+ const axisText = elem.selectAll('.axis-y text').nodes();
|
|
|
|
|
+ const maxTextWidth = _.max(
|
|
|
|
|
+ _.map(axisText, text => {
|
|
|
// Use SVG getBBox method
|
|
// Use SVG getBBox method
|
|
|
return text.getBBox().width;
|
|
return text.getBBox().width;
|
|
|
})
|
|
})
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
- return max_text_width;
|
|
|
|
|
|
|
+ return maxTextWidth;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
getXAxisHeight(elem) {
|
|
getXAxisHeight(elem) {
|
|
|
- const axis_line = elem.select('.axis-x line');
|
|
|
|
|
- if (!axis_line.empty()) {
|
|
|
|
|
- const axis_line_position = parseFloat(elem.select('.axis-x line').attr('y2'));
|
|
|
|
|
- const canvas_width = parseFloat(elem.attr('height'));
|
|
|
|
|
- return canvas_width - axis_line_position;
|
|
|
|
|
|
|
+ const axisLine = elem.select('.axis-x line');
|
|
|
|
|
+ if (!axisLine.empty()) {
|
|
|
|
|
+ const axisLinePosition = parseFloat(elem.select('.axis-x line').attr('y2'));
|
|
|
|
|
+ const canvasWidth = parseFloat(elem.attr('height'));
|
|
|
|
|
+ return canvasWidth - axisLinePosition;
|
|
|
} else {
|
|
} else {
|
|
|
// Default height
|
|
// Default height
|
|
|
return 30;
|
|
return 30;
|
|
@@ -180,42 +180,42 @@ export class HeatmapRenderer {
|
|
|
|
|
|
|
|
addYAxis() {
|
|
addYAxis() {
|
|
|
let ticks = Math.ceil(this.chartHeight / DEFAULT_Y_TICK_SIZE_PX);
|
|
let ticks = Math.ceil(this.chartHeight / DEFAULT_Y_TICK_SIZE_PX);
|
|
|
- let tick_interval = ticksUtils.tickStep(this.data.heatmapStats.min, this.data.heatmapStats.max, ticks);
|
|
|
|
|
- let { y_min, y_max } = this.wideYAxisRange(this.data.heatmapStats.min, this.data.heatmapStats.max, tick_interval);
|
|
|
|
|
|
|
+ let tickInterval = ticksUtils.tickStep(this.data.heatmapStats.min, this.data.heatmapStats.max, ticks);
|
|
|
|
|
+ let { yMin, yMax } = this.wideYAxisRange(this.data.heatmapStats.min, this.data.heatmapStats.max, tickInterval);
|
|
|
|
|
|
|
|
// Rewrite min and max if it have been set explicitly
|
|
// Rewrite min and max if it have been set explicitly
|
|
|
- y_min = this.panel.yAxis.min !== null ? this.panel.yAxis.min : y_min;
|
|
|
|
|
- y_max = this.panel.yAxis.max !== null ? this.panel.yAxis.max : y_max;
|
|
|
|
|
|
|
+ yMin = this.panel.yAxis.min !== null ? this.panel.yAxis.min : yMin;
|
|
|
|
|
+ yMax = this.panel.yAxis.max !== null ? this.panel.yAxis.max : yMax;
|
|
|
|
|
|
|
|
// Adjust ticks after Y range widening
|
|
// Adjust ticks after Y range widening
|
|
|
- tick_interval = ticksUtils.tickStep(y_min, y_max, ticks);
|
|
|
|
|
- ticks = Math.ceil((y_max - y_min) / tick_interval);
|
|
|
|
|
|
|
+ tickInterval = ticksUtils.tickStep(yMin, yMax, ticks);
|
|
|
|
|
+ ticks = Math.ceil((yMax - yMin) / tickInterval);
|
|
|
|
|
|
|
|
- const decimalsAuto = ticksUtils.getPrecision(tick_interval);
|
|
|
|
|
|
|
+ const decimalsAuto = ticksUtils.getPrecision(tickInterval);
|
|
|
let decimals = this.panel.yAxis.decimals === null ? decimalsAuto : this.panel.yAxis.decimals;
|
|
let decimals = this.panel.yAxis.decimals === null ? decimalsAuto : this.panel.yAxis.decimals;
|
|
|
// Calculate scaledDecimals for log scales using tick size (as in jquery.flot.js)
|
|
// Calculate scaledDecimals for log scales using tick size (as in jquery.flot.js)
|
|
|
- const flot_tick_size = ticksUtils.getFlotTickSize(y_min, y_max, ticks, decimalsAuto);
|
|
|
|
|
- const scaledDecimals = ticksUtils.getScaledDecimals(decimals, flot_tick_size);
|
|
|
|
|
|
|
+ const flotTickSize = ticksUtils.getFlotTickSize(yMin, yMax, ticks, decimalsAuto);
|
|
|
|
|
+ const scaledDecimals = ticksUtils.getScaledDecimals(decimals, flotTickSize);
|
|
|
this.ctrl.decimals = decimals;
|
|
this.ctrl.decimals = decimals;
|
|
|
this.ctrl.scaledDecimals = scaledDecimals;
|
|
this.ctrl.scaledDecimals = scaledDecimals;
|
|
|
|
|
|
|
|
// Set default Y min and max if no data
|
|
// Set default Y min and max if no data
|
|
|
if (_.isEmpty(this.data.buckets)) {
|
|
if (_.isEmpty(this.data.buckets)) {
|
|
|
- y_max = 1;
|
|
|
|
|
- y_min = -1;
|
|
|
|
|
|
|
+ yMax = 1;
|
|
|
|
|
+ yMin = -1;
|
|
|
ticks = 3;
|
|
ticks = 3;
|
|
|
decimals = 1;
|
|
decimals = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this.data.yAxis = {
|
|
this.data.yAxis = {
|
|
|
- min: y_min,
|
|
|
|
|
- max: y_max,
|
|
|
|
|
|
|
+ min: yMin,
|
|
|
|
|
+ max: yMax,
|
|
|
ticks: ticks,
|
|
ticks: ticks,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
this.scope.yScale = this.yScale = d3
|
|
this.scope.yScale = this.yScale = d3
|
|
|
.scaleLinear()
|
|
.scaleLinear()
|
|
|
- .domain([y_min, y_max])
|
|
|
|
|
|
|
+ .domain([yMin, yMax])
|
|
|
.range([this.chartHeight, 0]);
|
|
.range([this.chartHeight, 0]);
|
|
|
|
|
|
|
|
const yAxis = d3
|
|
const yAxis = d3
|
|
@@ -245,67 +245,67 @@ export class HeatmapRenderer {
|
|
|
|
|
|
|
|
// Wide Y values range and anjust to bucket size
|
|
// Wide Y values range and anjust to bucket size
|
|
|
wideYAxisRange(min, max, tickInterval) {
|
|
wideYAxisRange(min, max, tickInterval) {
|
|
|
- const y_widing = (max * (this.dataRangeWidingFactor - 1) - min * (this.dataRangeWidingFactor - 1)) / 2;
|
|
|
|
|
- let y_min, y_max;
|
|
|
|
|
|
|
+ const yWiding = (max * (this.dataRangeWidingFactor - 1) - min * (this.dataRangeWidingFactor - 1)) / 2;
|
|
|
|
|
+ let yMin, yMax;
|
|
|
|
|
|
|
|
if (tickInterval === 0) {
|
|
if (tickInterval === 0) {
|
|
|
- y_max = max * this.dataRangeWidingFactor;
|
|
|
|
|
- y_min = min - min * (this.dataRangeWidingFactor - 1);
|
|
|
|
|
- tickInterval = (y_max - y_min) / 2;
|
|
|
|
|
|
|
+ yMax = max * this.dataRangeWidingFactor;
|
|
|
|
|
+ yMin = min - min * (this.dataRangeWidingFactor - 1);
|
|
|
|
|
+ tickInterval = (yMax - yMin) / 2;
|
|
|
} else {
|
|
} else {
|
|
|
- y_max = Math.ceil((max + y_widing) / tickInterval) * tickInterval;
|
|
|
|
|
- y_min = Math.floor((min - y_widing) / tickInterval) * tickInterval;
|
|
|
|
|
|
|
+ yMax = Math.ceil((max + yWiding) / tickInterval) * tickInterval;
|
|
|
|
|
+ yMin = Math.floor((min - yWiding) / tickInterval) * tickInterval;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Don't wide axis below 0 if all values are positive
|
|
// Don't wide axis below 0 if all values are positive
|
|
|
- if (min >= 0 && y_min < 0) {
|
|
|
|
|
- y_min = 0;
|
|
|
|
|
|
|
+ if (min >= 0 && yMin < 0) {
|
|
|
|
|
+ yMin = 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- return { y_min, y_max };
|
|
|
|
|
|
|
+ return { yMin, yMax };
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
addLogYAxis() {
|
|
addLogYAxis() {
|
|
|
- const log_base = this.panel.yAxis.logBase;
|
|
|
|
|
- let { y_min, y_max } = this.adjustLogRange(this.data.heatmapStats.minLog, this.data.heatmapStats.max, log_base);
|
|
|
|
|
|
|
+ const logBase = this.panel.yAxis.logBase;
|
|
|
|
|
+ let { yMin, yMax } = this.adjustLogRange(this.data.heatmapStats.minLog, this.data.heatmapStats.max, logBase);
|
|
|
|
|
|
|
|
- y_min =
|
|
|
|
|
- this.panel.yAxis.min && this.panel.yAxis.min !== '0' ? this.adjustLogMin(this.panel.yAxis.min, log_base) : y_min;
|
|
|
|
|
- y_max = this.panel.yAxis.max !== null ? this.adjustLogMax(this.panel.yAxis.max, log_base) : y_max;
|
|
|
|
|
|
|
+ yMin =
|
|
|
|
|
+ this.panel.yAxis.min && this.panel.yAxis.min !== '0' ? this.adjustLogMin(this.panel.yAxis.min, logBase) : yMin;
|
|
|
|
|
+ yMax = this.panel.yAxis.max !== null ? this.adjustLogMax(this.panel.yAxis.max, logBase) : yMax;
|
|
|
|
|
|
|
|
// Set default Y min and max if no data
|
|
// Set default Y min and max if no data
|
|
|
if (_.isEmpty(this.data.buckets)) {
|
|
if (_.isEmpty(this.data.buckets)) {
|
|
|
- y_max = Math.pow(log_base, 2);
|
|
|
|
|
- y_min = 1;
|
|
|
|
|
|
|
+ yMax = Math.pow(logBase, 2);
|
|
|
|
|
+ yMin = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this.scope.yScale = this.yScale = d3
|
|
this.scope.yScale = this.yScale = d3
|
|
|
.scaleLog()
|
|
.scaleLog()
|
|
|
.base(this.panel.yAxis.logBase)
|
|
.base(this.panel.yAxis.logBase)
|
|
|
- .domain([y_min, y_max])
|
|
|
|
|
|
|
+ .domain([yMin, yMax])
|
|
|
.range([this.chartHeight, 0]);
|
|
.range([this.chartHeight, 0]);
|
|
|
|
|
|
|
|
const domain = this.yScale.domain();
|
|
const domain = this.yScale.domain();
|
|
|
- const tick_values = this.logScaleTickValues(domain, log_base);
|
|
|
|
|
|
|
+ const tickValues = this.logScaleTickValues(domain, logBase);
|
|
|
|
|
|
|
|
- const decimalsAuto = ticksUtils.getPrecision(y_min);
|
|
|
|
|
|
|
+ const decimalsAuto = ticksUtils.getPrecision(yMin);
|
|
|
const decimals = this.panel.yAxis.decimals || decimalsAuto;
|
|
const decimals = this.panel.yAxis.decimals || decimalsAuto;
|
|
|
|
|
|
|
|
// Calculate scaledDecimals for log scales using tick size (as in jquery.flot.js)
|
|
// Calculate scaledDecimals for log scales using tick size (as in jquery.flot.js)
|
|
|
- const flot_tick_size = ticksUtils.getFlotTickSize(y_min, y_max, tick_values.length, decimalsAuto);
|
|
|
|
|
- const scaledDecimals = ticksUtils.getScaledDecimals(decimals, flot_tick_size);
|
|
|
|
|
|
|
+ const flotTickSize = ticksUtils.getFlotTickSize(yMin, yMax, tickValues.length, decimalsAuto);
|
|
|
|
|
+ const scaledDecimals = ticksUtils.getScaledDecimals(decimals, flotTickSize);
|
|
|
this.ctrl.decimals = decimals;
|
|
this.ctrl.decimals = decimals;
|
|
|
this.ctrl.scaledDecimals = scaledDecimals;
|
|
this.ctrl.scaledDecimals = scaledDecimals;
|
|
|
|
|
|
|
|
this.data.yAxis = {
|
|
this.data.yAxis = {
|
|
|
- min: y_min,
|
|
|
|
|
- max: y_max,
|
|
|
|
|
- ticks: tick_values.length,
|
|
|
|
|
|
|
+ min: yMin,
|
|
|
|
|
+ max: yMax,
|
|
|
|
|
+ ticks: tickValues.length,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const yAxis = d3
|
|
const yAxis = d3
|
|
|
.axisLeft(this.yScale)
|
|
.axisLeft(this.yScale)
|
|
|
- .tickValues(tick_values)
|
|
|
|
|
|
|
+ .tickValues(tickValues)
|
|
|
.tickFormat(this.tickValueFormatter(decimals, scaledDecimals))
|
|
.tickFormat(this.tickValueFormatter(decimals, scaledDecimals))
|
|
|
.tickSizeInner(0 - this.width)
|
|
.tickSizeInner(0 - this.width)
|
|
|
.tickSizeOuter(0)
|
|
.tickSizeOuter(0)
|
|
@@ -322,7 +322,7 @@ export class HeatmapRenderer {
|
|
|
this.heatmap.select('.axis-y').attr('transform', 'translate(' + posX + ',' + posY + ')');
|
|
this.heatmap.select('.axis-y').attr('transform', 'translate(' + posX + ',' + posY + ')');
|
|
|
|
|
|
|
|
// Set first tick as pseudo 0
|
|
// Set first tick as pseudo 0
|
|
|
- if (y_min < 1) {
|
|
|
|
|
|
|
+ if (yMin < 1) {
|
|
|
this.heatmap
|
|
this.heatmap
|
|
|
.select('.axis-y')
|
|
.select('.axis-y')
|
|
|
.select('.tick text')
|
|
.select('.tick text')
|
|
@@ -344,7 +344,7 @@ export class HeatmapRenderer {
|
|
|
.domain([0, tsBuckets.length - 1])
|
|
.domain([0, tsBuckets.length - 1])
|
|
|
.range([this.chartHeight, 0]);
|
|
.range([this.chartHeight, 0]);
|
|
|
|
|
|
|
|
- const tick_values = _.map(tsBuckets, (b, i) => i);
|
|
|
|
|
|
|
+ const tickValues = _.map(tsBuckets, (b, i) => i);
|
|
|
const decimalsAuto = _.max(_.map(tsBuckets, ticksUtils.getStringPrecision));
|
|
const decimalsAuto = _.max(_.map(tsBuckets, ticksUtils.getStringPrecision));
|
|
|
const decimals = this.panel.yAxis.decimals === null ? decimalsAuto : this.panel.yAxis.decimals;
|
|
const decimals = this.panel.yAxis.decimals === null ? decimalsAuto : this.panel.yAxis.decimals;
|
|
|
this.ctrl.decimals = decimals;
|
|
this.ctrl.decimals = decimals;
|
|
@@ -364,7 +364,7 @@ export class HeatmapRenderer {
|
|
|
|
|
|
|
|
const yAxis = d3
|
|
const yAxis = d3
|
|
|
.axisLeft(this.yScale)
|
|
.axisLeft(this.yScale)
|
|
|
- .tickValues(tick_values)
|
|
|
|
|
|
|
+ .tickValues(tickValues)
|
|
|
.tickFormat(tickFormatter)
|
|
.tickFormat(tickFormatter)
|
|
|
.tickSizeInner(0 - this.width)
|
|
.tickSizeInner(0 - this.width)
|
|
|
.tickSizeOuter(0)
|
|
.tickSizeOuter(0)
|
|
@@ -389,19 +389,19 @@ export class HeatmapRenderer {
|
|
|
|
|
|
|
|
// Adjust data range to log base
|
|
// Adjust data range to log base
|
|
|
adjustLogRange(min, max, logBase) {
|
|
adjustLogRange(min, max, logBase) {
|
|
|
- let y_min, y_max;
|
|
|
|
|
|
|
+ let yMin, yMax;
|
|
|
|
|
|
|
|
- y_min = this.data.heatmapStats.minLog;
|
|
|
|
|
|
|
+ yMin = this.data.heatmapStats.minLog;
|
|
|
if (this.data.heatmapStats.minLog > 1 || !this.data.heatmapStats.minLog) {
|
|
if (this.data.heatmapStats.minLog > 1 || !this.data.heatmapStats.minLog) {
|
|
|
- y_min = 1;
|
|
|
|
|
|
|
+ yMin = 1;
|
|
|
} else {
|
|
} else {
|
|
|
- y_min = this.adjustLogMin(this.data.heatmapStats.minLog, logBase);
|
|
|
|
|
|
|
+ yMin = this.adjustLogMin(this.data.heatmapStats.minLog, logBase);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Adjust max Y value to log base
|
|
// Adjust max Y value to log base
|
|
|
- y_max = this.adjustLogMax(this.data.heatmapStats.max, logBase);
|
|
|
|
|
|
|
+ yMax = this.adjustLogMax(this.data.heatmapStats.max, logBase);
|
|
|
|
|
|
|
|
- return { y_min, y_max };
|
|
|
|
|
|
|
+ return { yMin, yMax };
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
adjustLogMax(max, base) {
|
|
adjustLogMax(max, base) {
|
|
@@ -418,17 +418,17 @@ export class HeatmapRenderer {
|
|
|
const tickValues = [];
|
|
const tickValues = [];
|
|
|
|
|
|
|
|
if (domainMin < 1) {
|
|
if (domainMin < 1) {
|
|
|
- const under_one_ticks = Math.floor(ticksUtils.logp(domainMin, base));
|
|
|
|
|
- for (let i = under_one_ticks; i < 0; i++) {
|
|
|
|
|
- const tick_value = Math.pow(base, i);
|
|
|
|
|
- tickValues.push(tick_value);
|
|
|
|
|
|
|
+ const underOneTicks = Math.floor(ticksUtils.logp(domainMin, base));
|
|
|
|
|
+ for (let i = underOneTicks; i < 0; i++) {
|
|
|
|
|
+ const tickValue = Math.pow(base, i);
|
|
|
|
|
+ tickValues.push(tickValue);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const ticks = Math.ceil(ticksUtils.logp(domainMax, base));
|
|
const ticks = Math.ceil(ticksUtils.logp(domainMax, base));
|
|
|
for (let i = 0; i <= ticks; i++) {
|
|
for (let i = 0; i <= ticks; i++) {
|
|
|
- const tick_value = Math.pow(base, i);
|
|
|
|
|
- tickValues.push(tick_value);
|
|
|
|
|
|
|
+ const tickValue = Math.pow(base, i);
|
|
|
|
|
+ tickValues.push(tickValue);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return tickValues;
|
|
return tickValues;
|
|
@@ -490,7 +490,7 @@ export class HeatmapRenderer {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
addHeatmapCanvas() {
|
|
addHeatmapCanvas() {
|
|
|
- const heatmap_elem = this.$heatmap[0];
|
|
|
|
|
|
|
+ const heatmapElem = this.$heatmap[0];
|
|
|
|
|
|
|
|
this.width = Math.floor(this.$heatmap.width()) - this.padding.right;
|
|
this.width = Math.floor(this.$heatmap.width()) - this.padding.right;
|
|
|
this.height = Math.floor(this.$heatmap.height()) - this.padding.bottom;
|
|
this.height = Math.floor(this.$heatmap.height()) - this.padding.bottom;
|
|
@@ -503,7 +503,7 @@ export class HeatmapRenderer {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this.heatmap = d3
|
|
this.heatmap = d3
|
|
|
- .select(heatmap_elem)
|
|
|
|
|
|
|
+ .select(heatmapElem)
|
|
|
.append('svg')
|
|
.append('svg')
|
|
|
.attr('width', this.width)
|
|
.attr('width', this.width)
|
|
|
.attr('height', this.height);
|
|
.attr('height', this.height);
|
|
@@ -514,10 +514,10 @@ export class HeatmapRenderer {
|
|
|
this.addAxes();
|
|
this.addAxes();
|
|
|
|
|
|
|
|
if (this.panel.yAxis.logBase !== 1 && this.panel.dataFormat !== 'tsbuckets') {
|
|
if (this.panel.yAxis.logBase !== 1 && this.panel.dataFormat !== 'tsbuckets') {
|
|
|
- const log_base = this.panel.yAxis.logBase;
|
|
|
|
|
|
|
+ const logBase = this.panel.yAxis.logBase;
|
|
|
const domain = this.yScale.domain();
|
|
const domain = this.yScale.domain();
|
|
|
- const tick_values = this.logScaleTickValues(domain, log_base);
|
|
|
|
|
- this.data.buckets = mergeZeroBuckets(this.data.buckets, _.min(tick_values));
|
|
|
|
|
|
|
+ const tickValues = this.logScaleTickValues(domain, logBase);
|
|
|
|
|
+ this.data.buckets = mergeZeroBuckets(this.data.buckets, _.min(tickValues));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const cardsData = this.data.cards;
|
|
const cardsData = this.data.cards;
|
|
@@ -565,9 +565,9 @@ export class HeatmapRenderer {
|
|
|
const color = d3.select(event.target).style('fill');
|
|
const color = d3.select(event.target).style('fill');
|
|
|
const highlightColor = d3.color(color).darker(2);
|
|
const highlightColor = d3.color(color).darker(2);
|
|
|
const strokeColor = d3.color(color).brighter(4);
|
|
const strokeColor = d3.color(color).brighter(4);
|
|
|
- const current_card = d3.select(event.target);
|
|
|
|
|
|
|
+ const currentCard = d3.select(event.target);
|
|
|
this.tooltip.originalFillColor = color;
|
|
this.tooltip.originalFillColor = color;
|
|
|
- current_card
|
|
|
|
|
|
|
+ currentCard
|
|
|
.style('fill', highlightColor.toString())
|
|
.style('fill', highlightColor.toString())
|
|
|
.style('stroke', strokeColor.toString())
|
|
.style('stroke', strokeColor.toString())
|
|
|
.style('stroke-width', 1);
|
|
.style('stroke-width', 1);
|
|
@@ -611,8 +611,8 @@ export class HeatmapRenderer {
|
|
|
let w;
|
|
let w;
|
|
|
if (this.xScale(d.x) < 0) {
|
|
if (this.xScale(d.x) < 0) {
|
|
|
// Cut card left to prevent overlay
|
|
// Cut card left to prevent overlay
|
|
|
- const cutted_width = this.xScale(d.x) + this.cardWidth;
|
|
|
|
|
- w = cutted_width > 0 ? cutted_width : 0;
|
|
|
|
|
|
|
+ const cuttedWidth = this.xScale(d.x) + this.cardWidth;
|
|
|
|
|
+ w = cuttedWidth > 0 ? cuttedWidth : 0;
|
|
|
} else if (this.xScale(d.x) + this.cardWidth > this.chartWidth) {
|
|
} else if (this.xScale(d.x) + this.cardWidth > this.chartWidth) {
|
|
|
// Cut card right to prevent overlay
|
|
// Cut card right to prevent overlay
|
|
|
w = this.chartWidth - this.xScale(d.x) - this.cardPadding;
|
|
w = this.chartWidth - this.xScale(d.x) - this.cardPadding;
|