[fix] initial width bug
This commit is contained in:
parent
decc59c6fd
commit
6e14dd45ee
9
dist/frappe-charts.esm.js
vendored
9
dist/frappe-charts.esm.js
vendored
@ -1281,6 +1281,7 @@ class BaseChart {
|
|||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
this.makeContainer();
|
this.makeContainer();
|
||||||
|
this.updateWidth();
|
||||||
this.makeTooltip();
|
this.makeTooltip();
|
||||||
|
|
||||||
this.draw(false, true);
|
this.draw(false, true);
|
||||||
@ -1404,7 +1405,7 @@ class BaseChart {
|
|||||||
);
|
);
|
||||||
this.svgDefs = makeSVGDefs(this.svg);
|
this.svgDefs = makeSVGDefs(this.svg);
|
||||||
|
|
||||||
console.log(this.baseHeight, titleAreaHeight, legendAreaHeight);
|
// console.log(this.baseHeight, titleAreaHeight, legendAreaHeight);
|
||||||
|
|
||||||
if(this.title.length) {
|
if(this.title.length) {
|
||||||
this.titleEL = makeText(
|
this.titleEL = makeText(
|
||||||
@ -2068,6 +2069,7 @@ class PieChart extends AggregationChart {
|
|||||||
super(parent, args);
|
super(parent, args);
|
||||||
this.type = 'pie';
|
this.type = 'pie';
|
||||||
this.initTimeout = 0;
|
this.initTimeout = 0;
|
||||||
|
this.init = 1;
|
||||||
|
|
||||||
this.setup();
|
this.setup();
|
||||||
}
|
}
|
||||||
@ -2083,11 +2085,6 @@ class PieChart extends AggregationChart {
|
|||||||
this.clockWise = args.clockWise || false;
|
this.clockWise = args.clockWise || false;
|
||||||
}
|
}
|
||||||
|
|
||||||
prepareFirstData(data=this.data) {
|
|
||||||
this.init = 1;
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
calc() {
|
calc() {
|
||||||
super.calc();
|
super.calc();
|
||||||
let s = this.state;
|
let s = this.state;
|
||||||
|
|||||||
2
dist/frappe-charts.min.cjs.js
vendored
2
dist/frappe-charts.min.cjs.js
vendored
File diff suppressed because one or more lines are too long
2
dist/frappe-charts.min.esm.js
vendored
2
dist/frappe-charts.min.esm.js
vendored
File diff suppressed because one or more lines are too long
2
dist/frappe-charts.min.iife.js
vendored
2
dist/frappe-charts.min.iife.js
vendored
File diff suppressed because one or more lines are too long
2
dist/frappe-charts.min.iife.js.map
vendored
2
dist/frappe-charts.min.iife.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
@ -83,6 +83,7 @@ export default class BaseChart {
|
|||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
this.makeContainer();
|
this.makeContainer();
|
||||||
|
this.updateWidth();
|
||||||
this.makeTooltip();
|
this.makeTooltip();
|
||||||
|
|
||||||
this.draw(false, true);
|
this.draw(false, true);
|
||||||
@ -206,7 +207,7 @@ export default class BaseChart {
|
|||||||
);
|
);
|
||||||
this.svgDefs = makeSVGDefs(this.svg);
|
this.svgDefs = makeSVGDefs(this.svg);
|
||||||
|
|
||||||
console.log(this.baseHeight, titleAreaHeight, legendAreaHeight);
|
// console.log(this.baseHeight, titleAreaHeight, legendAreaHeight);
|
||||||
|
|
||||||
if(this.title.length) {
|
if(this.title.length) {
|
||||||
this.titleEL = makeText(
|
this.titleEL = makeText(
|
||||||
|
|||||||
@ -12,6 +12,7 @@ export default class PieChart extends AggregationChart {
|
|||||||
super(parent, args);
|
super(parent, args);
|
||||||
this.type = 'pie';
|
this.type = 'pie';
|
||||||
this.initTimeout = 0;
|
this.initTimeout = 0;
|
||||||
|
this.init = 1;
|
||||||
|
|
||||||
this.setup();
|
this.setup();
|
||||||
}
|
}
|
||||||
@ -27,11 +28,6 @@ export default class PieChart extends AggregationChart {
|
|||||||
this.clockWise = args.clockWise || false;
|
this.clockWise = args.clockWise || false;
|
||||||
}
|
}
|
||||||
|
|
||||||
prepareFirstData(data=this.data) {
|
|
||||||
this.init = 1;
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
calc() {
|
calc() {
|
||||||
super.calc();
|
super.calc();
|
||||||
let s = this.state;
|
let s = this.state;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user