//父类
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; //是否需要过滤数据
}
}
//子类
class PieChart extends BaseChart {
constructor(data){
super(data);
this.legenddata = [];
this.vdata = [];
}
}
父类的属性输出undifined,怎么破?