[fix] initial width bug

This commit is contained in:
Prateeksha Singh 2018-04-12 16:39:45 +05:30
parent decc59c6fd
commit 6e14dd45ee
9 changed files with 12 additions and 18 deletions

View File

@ -1281,6 +1281,7 @@ class BaseChart {
setup() {
this.makeContainer();
this.updateWidth();
this.makeTooltip();
this.draw(false, true);
@ -1404,7 +1405,7 @@ class BaseChart {
);
this.svgDefs = makeSVGDefs(this.svg);
console.log(this.baseHeight, titleAreaHeight, legendAreaHeight);
// console.log(this.baseHeight, titleAreaHeight, legendAreaHeight);
if(this.title.length) {
this.titleEL = makeText(
@ -2068,6 +2069,7 @@ class PieChart extends AggregationChart {
super(parent, args);
this.type = 'pie';
this.initTimeout = 0;
this.init = 1;
this.setup();
}
@ -2083,11 +2085,6 @@ class PieChart extends AggregationChart {
this.clockWise = args.clockWise || false;
}
prepareFirstData(data=this.data) {
this.init = 1;
return data;
}
calc() {
super.calc();
let s = this.state;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -83,6 +83,7 @@ export default class BaseChart {
setup() {
this.makeContainer();
this.updateWidth();
this.makeTooltip();
this.draw(false, true);
@ -206,7 +207,7 @@ export default class BaseChart {
);
this.svgDefs = makeSVGDefs(this.svg);
console.log(this.baseHeight, titleAreaHeight, legendAreaHeight);
// console.log(this.baseHeight, titleAreaHeight, legendAreaHeight);
if(this.title.length) {
this.titleEL = makeText(

View File

@ -12,6 +12,7 @@ export default class PieChart extends AggregationChart {
super(parent, args);
this.type = 'pie';
this.initTimeout = 0;
this.init = 1;
this.setup();
}
@ -27,11 +28,6 @@ export default class PieChart extends AggregationChart {
this.clockWise = args.clockWise || false;
}
prepareFirstData(data=this.data) {
this.init = 1;
return data;
}
calc() {
super.calc();
let s = this.state;