|
|
@@ -109,9 +109,6 @@ const BaseChartInner: React.FC<BaseChartProps> = (props) => {
|
|
|
|
|
|
// 获取设备像素比,用于高清屏适配
|
|
|
const pixelRatio = sysInfo.pixelRatio || 1;
|
|
|
- console.debug('[BaseChart] pixelRatio', pixelRatio);
|
|
|
- console.debug('[BaseChart] CSS 宽度 cw (逻辑像素)', cw);
|
|
|
- console.debug('[BaseChart] CSS 高度 ch (逻辑像素)', ch);
|
|
|
|
|
|
// 方案 A:设置 Canvas 物理像素 = 逻辑像素 × pixelRatio
|
|
|
// 这样在高分屏上有足够的物理像素,图表更清晰
|
|
|
@@ -119,8 +116,6 @@ const BaseChartInner: React.FC<BaseChartProps> = (props) => {
|
|
|
const physicalHeight = ch * pixelRatio;
|
|
|
canvas.width = physicalWidth;
|
|
|
canvas.height = physicalHeight;
|
|
|
- console.debug('[BaseChart] 设置后 canvas.width (物理像素)', canvas.width);
|
|
|
- console.debug('[BaseChart] 设置后 canvas.height (物理像素)', canvas.height);
|
|
|
|
|
|
// u-charts 接收物理像素尺寸,pixelRatio 设为 1 避免双重缩放
|
|
|
const chartConfig: ChartsConfig = {
|