Adds warnings
This commit is contained in:
parent
8d875cc00d
commit
a997ce8aad
|
@ -124,7 +124,6 @@ export class CdfChartD3 {
|
||||||
*/
|
*/
|
||||||
getCommonThings() {
|
getCommonThings() {
|
||||||
// Boundaries.
|
// Boundaries.
|
||||||
// @todo: To fix code construction.
|
|
||||||
const xMin = this.attrs.scale === 'linear' ?
|
const xMin = this.attrs.scale === 'linear' ?
|
||||||
(this.attrs.minX
|
(this.attrs.minX
|
||||||
|| d3.min(this.attrs.data.continuous.xs)
|
|| d3.min(this.attrs.data.continuous.xs)
|
||||||
|
@ -139,6 +138,11 @@ export class CdfChartD3 {
|
||||||
const yMin = d3.min(this.attrs.data.continuous.ys);
|
const yMin = d3.min(this.attrs.data.continuous.ys);
|
||||||
const yMax = d3.max(this.attrs.data.continuous.ys);
|
const yMax = d3.max(this.attrs.data.continuous.ys);
|
||||||
|
|
||||||
|
if (!_.isFinite(xMin)) console.error('xMin is undefined');
|
||||||
|
if (!_.isFinite(xMax)) console.error('xMax is undefined');
|
||||||
|
if (!_.isFinite(yMin)) console.error('yMin is undefined');
|
||||||
|
if (!_.isFinite(yMax)) console.error('yMax is undefined');
|
||||||
|
|
||||||
// X-domains.
|
// X-domains.
|
||||||
const yMaxDomainFactor = _.get(this.attrs, 'yMaxContinuousDomainFactor', 1);
|
const yMaxDomainFactor = _.get(this.attrs, 'yMaxContinuousDomainFactor', 1);
|
||||||
const xMinDomain = xMin;
|
const xMinDomain = xMin;
|
||||||
|
@ -215,8 +219,6 @@ export class CdfChartD3 {
|
||||||
// Y-axis.
|
// Y-axis.
|
||||||
const yAxis = d3.axisRight(yScale);
|
const yAxis = d3.axisRight(yScale);
|
||||||
|
|
||||||
// Objects.
|
|
||||||
|
|
||||||
// Add axis.
|
// Add axis.
|
||||||
this.chart
|
this.chart
|
||||||
.createObject({ tag: 'g', selector: 'x-axis' })
|
.createObject({ tag: 'g', selector: 'x-axis' })
|
||||||
|
|
Loading…
Reference in New Issue
Block a user