diff --git a/yuthon_ai_agent/static/src/html/report_template.html b/yuthon_ai_agent/static/src/html/report_template.html
index b8c82b1e7..5f29b6f7a 100644
--- a/yuthon_ai_agent/static/src/html/report_template.html
+++ b/yuthon_ai_agent/static/src/html/report_template.html
@@ -213,11 +213,12 @@ tr.ch.h{display:none}
-
@@ -297,6 +298,16 @@ let grpExp={};
let fzCount=0;
let dark=true;
let qcState={dim:'',val:'',type:'bar'};
+let chartVisible=true;
+
+function toggleChartView(){
+ chartVisible=!chartVisible;
+ const area=$('chartsArea');
+ const btn=$('btnList');
+ if(area)area.style.display=chartVisible?'':'none';
+ if(btn)btn.classList.toggle('act',!chartVisible);
+ if(chartVisible)renderCharts();
+}
function init(){
$('rptTitle').textContent = REPORT_CONFIG.title || '报表';
@@ -345,25 +356,27 @@ function initChartCtrls(){
const dimSel=$('qcDimSel');
const valSel=$('qcValSel');
if(dimSel){
- dimSel.innerHTML='
'+COLS.map(c=>`
`).join('');
+ dimSel.innerHTML='
'+COLS.map(c=>`
`).join('');
dimSel.value=qcState.dim;
}
if(valSel){
- valSel.innerHTML='
'+numCols.map(c=>`
`).join('');
+ valSel.innerHTML='
'+numCols.map(c=>`
`).join('');
valSel.value=qcState.val;
}
updateChartTypeBtns();
}
function updateChartTypeBtns(){
- ['bar','pie','doughnut','line','polarArea'].forEach(t=>{
- const btn=$(`btn${t==='bar'?'Bar':t==='pie'?'Pie':t==='doughnut'?'Doughnut':t==='line'?'Line':'Polar'}`);
+ ['bar','pie','doughnut','line'].forEach(t=>{
+ const btn=$(`btn${t==='bar'?'Bar':t==='pie'?'Pie':t==='doughnut'?'Doughnut':'Line'}`);
if(btn)btn.classList.toggle('act',qcState.type===t);
});
+ ['btnList'].forEach(id=>{const b=$(id);if(b)b.classList.remove('act')});
}
function setChartType(type){
qcState.type=type;
+ if(!chartVisible){chartVisible=true;$('chartsArea').style.display='';$('btnList').classList.remove('act')}
updateChartTypeBtns();
renderCharts();
}