Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.exec((res) => {
// // 获取分辨率
const pixelRatio = my.getSystemInfoSync().pixelRatio;
// // 获取画布实际宽高
const canvasWidth = res[0].width;
const canvasHeight = res[0].height;
this.setData({
width: canvasWidth * pixelRatio,
height: canvasHeight * pixelRatio
});
const myCtx = my.createCanvasContext('intervalSelect');
myCtx.scale(pixelRatio, pixelRatio); // 必要!按照设置的分辨率进行放大
const canvas = new F2.Renderer(myCtx);
this.canvas = canvas;
//console.log(res[0].width, res[0].height);
drawChart(canvas, res[0].width, res[0].height);
});
},
.exec((res) => {
// // 获取分辨率
const pixelRatio = my.getSystemInfoSync().pixelRatio;
// // 获取画布实际宽高
const canvasWidth = res[0].width;
const canvasHeight = res[0].height;
this.setData({
width: canvasWidth * pixelRatio,
height: canvasHeight * pixelRatio
});
const myCtx = my.createCanvasContext('panBar');
myCtx.scale(pixelRatio, pixelRatio); // 必要!按照设置的分辨率进行放大
const canvas = new F2.Renderer(myCtx);
this.canvas = canvas;
//console.log(res[0].width, res[0].height);
drawChart(canvas, res[0].width, res[0].height);
});
},
.exec((res) => {
// // 获取分辨率
const pixelRatio = my.getSystemInfoSync().pixelRatio;
// // 获取画布实际宽高
const canvasWidth = res[0].width;
const canvasHeight = res[0].height;
this.setData({
width: canvasWidth * pixelRatio,
height: canvasHeight * pixelRatio
});
const myCtx = my.createCanvasContext('pieSelect');
myCtx.scale(pixelRatio, pixelRatio); // 必要!按照设置的分辨率进行放大
const canvas = new F2.Renderer(myCtx);
this.canvas = canvas;
//console.log(res[0].width, res[0].height);
drawChart(canvas, res[0].width, res[0].height);
});
},
.exec((res) => {
// 获取分辨率
const pixelRatio = my.getSystemInfoSync().pixelRatio;
// 获取画布实际宽高
const canvasWidth = res[0].width;
const canvasHeight = res[0].height;
this.setData({
width: canvasWidth * pixelRatio,
height: canvasHeight * pixelRatio
});
const myCtx = my.createCanvasContext('rose');
myCtx.scale(pixelRatio, pixelRatio); // 必要!按照设置的分辨率进行放大
const canvas = new F2.Renderer(myCtx);
this.canvas = canvas;
drawChart(canvas, res[0].width, res[0].height);
});
},
.exec((res) => {
// 获取分辨率
const pixelRatio = my.getSystemInfoSync().pixelRatio;
// 获取画布实际宽高
const canvasWidth = res[0].width;
const canvasHeight = res[0].height;
this.setData({
width: canvasWidth * pixelRatio,
height: canvasHeight * pixelRatio
});
const myCtx = my.createCanvasContext('bar');
myCtx.scale(pixelRatio, pixelRatio); // 必要!按照设置的分辨率进行放大
const canvas = new F2.Renderer(myCtx);
this.canvas = canvas;
drawChart(canvas, res[0].width, res[0].height);
});
},
.exec((res) => {
// 获取分辨率
const pixelRatio = my.getSystemInfoSync().pixelRatio;
// 获取画布实际宽高
const canvasWidth = res[0].width;
const canvasHeight = res[0].height;
this.setData({
width: canvasWidth * pixelRatio,
height: canvasHeight * pixelRatio
});
const myCtx = my.createCanvasContext('dodgeBar');
myCtx.scale(pixelRatio, pixelRatio); // 必要!按照设置的分辨率进行放大
const canvas = new F2.Renderer(myCtx);
this.canvas = canvas;
drawChart(canvas, res[0].width, res[0].height);
});
},
.exec((res) => {
// 获取分辨率
const pixelRatio = my.getSystemInfoSync().pixelRatio;
// 获取画布实际宽高
const canvasWidth = res[0].width;
const canvasHeight = res[0].height;
this.setData({
width: canvasWidth * pixelRatio,
height: canvasHeight * pixelRatio
});
const myCtx = my.createCanvasContext('column');
myCtx.scale(pixelRatio, pixelRatio); // 必要!按照设置的分辨率进行放大
const canvas = new F2.Renderer(myCtx);
this.canvas = canvas;
drawChart(canvas, res[0].width, res[0].height);
});
},
.exec((res) => {
// 获取分辨率
const pixelRatio = my.getSystemInfoSync().pixelRatio;
// 获取画布实际宽高
const canvasWidth = res[0].width;
const canvasHeight = res[0].height;
this.setData({
width: canvasWidth * pixelRatio,
height: canvasHeight * pixelRatio
});
const myCtx = my.createCanvasContext('dbl');
myCtx.scale(pixelRatio, pixelRatio); // 必要!按照设置的分辨率进行放大
const canvas = new F2.Renderer(myCtx);
this.canvas = canvas;
drawChart(canvas, res[0].width, res[0].height);
});
},
.exec((res) => {
// 获取分辨率
const pixelRatio = my.getSystemInfoSync().pixelRatio;
// 获取画布实际宽高
const canvasWidth = res[0].width;
const canvasHeight = res[0].height;
this.setData({
width: canvasWidth * pixelRatio,
height: canvasHeight * pixelRatio
});
const myCtx = my.createCanvasContext('radar');
myCtx.scale(pixelRatio, pixelRatio); // 必要!按照设置的分辨率进行放大
const canvas = new F2.Renderer(myCtx);
this.canvas = canvas;
drawChart(canvas, res[0].width, res[0].height);
});
},
.exec((res) => {
// 获取分辨率
const pixelRatio = my.getSystemInfoSync().pixelRatio;
// 获取画布实际宽高
const canvasWidth = res[0].width;
const canvasHeight = res[0].height;
this.setData({
width: canvasWidth * pixelRatio,
height: canvasHeight * pixelRatio
});
const myCtx = my.createCanvasContext('pie');
myCtx.scale(pixelRatio, pixelRatio); // 必要!按照设置的分辨率进行放大
const canvas = new F2.Renderer(myCtx);
this.canvas = canvas;
drawChart(canvas, res[0].width, res[0].height);
});
},