public static boolean isChartInRuntime ( Chart cm ) { if ( cm instanceof ChartWithAxes ) { Axis bAxis = ( ( ChartWithAxes ) cm ) . getAxes ( ) . get ( 0 ) ; EList < Axis > oAxes = bAxis . getAssociatedAxes ( ) ; for ( int i = 0 ; i < oAxes . size ( ) ; i ++ ) { Axis oAxis = oAxes . get ( i ) ; EList < SeriesDefinition > oSeries = oAxis . getSeriesDefinitions ( ) ; for ( int j = 0 ; j < oSeries . size ( ) ; j ++ ) { SeriesDefinition sd = oSeries . get ( j ) ; if ( sd . getRunTimeSeries ( ) . size ( ) > 0 ) { return true ; } } } } else if ( cm instanceof ChartWithoutAxes ) { SeriesDefinition bsd = ( ( ChartWithoutAxes ) cm ) . getSeriesDefinitions ( ) . get ( 0 ) ; EList < SeriesDefinition > osds = bsd . getSeriesDefinitions ( ) ; for ( int i = 0 ; i < osds . size ( ) ; i ++ ) { SeriesDefinition osd = osds . get ( i ) ; if ( osd . getRunTimeSeries ( ) . size ( ) > 0 ) { return true ; } } } return false ; }
Checks if current chart has runtime data sets .