@@ -29,6 +29,7 @@ import ChartDataSetDTO, { IChartDataSet } from 'app/types/ChartDataSet';
2929import {
3030 getColumnRenderName ,
3131 getDataColumnMaxAndMin2 ,
32+ getDrillableRows ,
3233 getExtraSeriesRowData ,
3334 getGridStyle ,
3435 getReference2 ,
@@ -39,6 +40,7 @@ import {
3940} from 'app/utils/chartHelper' ;
4041import { init } from 'echarts' ;
4142import Chart from '../../../models/Chart' ;
43+ import { ChartDrillOption } from '../../../models/ChartDrillOption' ;
4244import Config from './config' ;
4345import { ScatterMetricAndSizeSerie } from './types' ;
4446
@@ -80,7 +82,11 @@ class BasicScatterChart extends Chart {
8082 this . chart ?. clear ( ) ;
8183 return ;
8284 }
83- const newOptions = this . getOptions ( props . dataset , props . config ) ;
85+ const newOptions = this . getOptions (
86+ props . dataset ,
87+ props . config ,
88+ props . drillOption ,
89+ ) ;
8490 this . chart ?. setOption ( Object . assign ( { } , newOptions ) , true ) ;
8591 }
8692
@@ -92,13 +98,18 @@ class BasicScatterChart extends Chart {
9298 this . chart ?. resize ( opt , context ) ;
9399 }
94100
95- private getOptions ( dataset : ChartDataSetDTO , config : ChartConfig ) {
101+ private getOptions (
102+ dataset : ChartDataSetDTO ,
103+ config : ChartConfig ,
104+ drillOption : ChartDrillOption ,
105+ ) {
96106 const styleConfigs = config . styles || [ ] ;
97107 const dataConfigs = config . datas || [ ] ;
98108 const settingConfigs = config . settings || [ ] ;
99- const groupConfigs = dataConfigs
100- . filter ( c => c . type === ChartDataSectionType . GROUP )
101- . flatMap ( config => config . rows || [ ] ) ;
109+ const groupConfigs : ChartDataSectionField [ ] = getDrillableRows (
110+ dataConfigs ,
111+ drillOption ,
112+ ) ;
102113 const aggregateConfigs = dataConfigs
103114 . filter ( c => c . type === ChartDataSectionType . AGGREGATE )
104115 . flatMap ( config => config . rows || [ ] ) ;
0 commit comments