|
@@ -42,7 +42,10 @@ Component({
|
|
forceUseOldCanvas: {
|
|
forceUseOldCanvas: {
|
|
type: Boolean,
|
|
type: Boolean,
|
|
value: false
|
|
value: false
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ tuData:{
|
|
|
|
+ type: Object
|
|
|
|
+ },
|
|
},
|
|
},
|
|
|
|
|
|
data: {
|
|
data: {
|
|
@@ -121,11 +124,13 @@ Component({
|
|
query.select('.ec-canvas').boundingClientRect(res => {
|
|
query.select('.ec-canvas').boundingClientRect(res => {
|
|
if (typeof callback === 'function') {
|
|
if (typeof callback === 'function') {
|
|
this.chart = callback(canvas, res.width, res.height, canvasDpr);
|
|
this.chart = callback(canvas, res.width, res.height, canvasDpr);
|
|
|
|
+
|
|
}
|
|
}
|
|
else if (this.data.ec && typeof this.data.ec.onInit === 'function') {
|
|
else if (this.data.ec && typeof this.data.ec.onInit === 'function') {
|
|
- this.chart = this.data.ec.onInit(canvas, res.width, res.height, canvasDpr);
|
|
|
|
|
|
+ this.chart = this.data.ec.onInit(canvas, res.width, res.height, canvasDpr,this.data.tuData);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
|
|
+
|
|
this.triggerEvent('init', {
|
|
this.triggerEvent('init', {
|
|
canvas: canvas,
|
|
canvas: canvas,
|
|
width: res.width,
|
|
width: res.width,
|
|
@@ -160,7 +165,7 @@ Component({
|
|
if (typeof callback === 'function') {
|
|
if (typeof callback === 'function') {
|
|
this.chart = callback(canvas, canvasWidth, canvasHeight, canvasDpr)
|
|
this.chart = callback(canvas, canvasWidth, canvasHeight, canvasDpr)
|
|
} else if (this.data.ec && typeof this.data.ec.onInit === 'function') {
|
|
} else if (this.data.ec && typeof this.data.ec.onInit === 'function') {
|
|
- this.chart = this.data.ec.onInit(canvas, canvasWidth, canvasHeight, canvasDpr)
|
|
|
|
|
|
+ this.chart = this.data.ec.onInit(canvas, canvasWidth, canvasHeight, canvasDpr,this.data.tuData)
|
|
} else {
|
|
} else {
|
|
this.triggerEvent('init', {
|
|
this.triggerEvent('init', {
|
|
canvas: canvas,
|
|
canvas: canvas,
|