You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
브라우저가 응답없는 현상은 화면에서 데이터 테이블 차트를 그리기 위해 서버로 부터 받아온 데이터를 오랜 시간 가공하면서 발생함.
원인
데이터 테이블 차트는 기본적으로 피벗 모드이기 때문에 OrderDate, Category, City를 X축에 설정하는 경우 컬럼의 수가 매우 많아짐(OrderDate 별 Category와 각 Category별 City를 표현하기 때문에.)
화면 차트를 만드는 아래 BaseChart 클래스 setUIData에서 데이터를 반복하여 cloneDeep 하면서 발생
// base-chart.tsexportabstractclassBaseChartextendsAbstractComponentimplementsOnInit,OnDestroy{/** * uiData에 설정될 columns데이터 설정 */protectedsetUIData(): any{// ..._.each(this.data.columns,(data,index)=>{data.categoryName=_.cloneDeep(this.data.rows);// 해당 dataIndex걸로 넣어주면됨data.categoryValue=[];data.categoryPercent=[];// 해당 dataIndex걸로 넣어주면됨// 단일 series인 경우if(!this.data.categories||(this.data.categories&&this.data.categories.length==0)){data.categoryValue=addAllValues(_.cloneDeep(this.originalData.columns),'value');data.categoryPercent=addAllValues(_.cloneDeep(this.data.columns),'percentage');data.seriesName=_.cloneDeep(this.data.rows);// 멀티 series인 경우}else{if(this.data.categories){for(constcategoryofthis.data.categories){data.categoryValue=_.cloneDeep(category.value);data.categoryPercent=_.cloneDeep(category.percentage);}}data.seriesName=_.split(data.name,CHART_STRING_DELIMITER)[0];}// 해당 dataIndex로 설정data.seriesValue=_.cloneDeep(this.originalData.columns[index].value);data.seriesPercent=_.cloneDeep(data.percentage);});returnthis.data.columns;}}
Describe the bug
To Reproduce
--> 먹통됨
Expected behavior
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: