/ / parent
class BaseChart {
constructor(data){
this.chartData = data.chartData || []; //
this.title = data.title || ""; //
this.xTitle = data.xTitle || ""; //x
this.yTitle = data.yTitle || ""; //y
this.xUnit = data.xUnit || ""; //x
this.yUnit = data.yUnit || ""; //y
this.vUnit = data.vUnit || ""; //value
this.chartType = data.chartType || 0;
this.dataType = data.dataType || 0; //
}
}
/ / subclass
class PieChart extends BaseChart {
constructor(data){
super(data);
this.legenddata = [];
this.vdata = [];
}
}
how to break the attribute output undifined, of the parent class?