add 'parent not specified' error
This commit is contained in:
parent
7ea2357c66
commit
abd045ecdf
2
dist/frappe-charts.min.js
vendored
2
dist/frappe-charts.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/frappe-charts.min.js.map
vendored
2
dist/frappe-charts.min.js.map
vendored
File diff suppressed because one or more lines are too long
2
docs/assets/js/frappe-charts.min.js
vendored
2
docs/assets/js/frappe-charts.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -4,12 +4,10 @@ import Chart from '../charts';
|
|||||||
|
|
||||||
export default class BaseChart {
|
export default class BaseChart {
|
||||||
constructor({
|
constructor({
|
||||||
parent = "",
|
|
||||||
height = 240,
|
height = 240,
|
||||||
|
|
||||||
title = '', subtitle = '',
|
title = '', subtitle = '',
|
||||||
|
|
||||||
data = {},
|
|
||||||
format_lambdas = {},
|
format_lambdas = {},
|
||||||
|
|
||||||
summary = [],
|
summary = [],
|
||||||
@ -17,7 +15,10 @@ export default class BaseChart {
|
|||||||
is_navigable = 0,
|
is_navigable = 0,
|
||||||
has_legend = 0,
|
has_legend = 0,
|
||||||
|
|
||||||
type = '' // eslint-disable-line no-unused-vars
|
type = '', // eslint-disable-line no-unused-vars
|
||||||
|
|
||||||
|
parent,
|
||||||
|
data
|
||||||
}) {
|
}) {
|
||||||
this.raw_chart_args = arguments[0];
|
this.raw_chart_args = arguments[0];
|
||||||
|
|
||||||
@ -81,6 +82,10 @@ export default class BaseChart {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
|
if(!this.parent) {
|
||||||
|
console.error("No parent element to render on was provided.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.bind_window_events();
|
this.bind_window_events();
|
||||||
this.refresh(true);
|
this.refresh(true);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user