import { DataSeries } from './series' ; internal export function defaultXYSeriesSort ( a , b ) { if ( a . groupId !== b . groupId ) { return a . insertIndex - b . insertIndex ; } if ( a . isStacked && ! b . isStacked ) { return - 1 ; } if ( ! a . isStacked && b . isStacked ) { return 1 ; } return a . insertIndex - b . insertIndex ; } internal export function defaultXYLegendSeriesSort ( a , b ) { if ( a . groupId !== b . groupId ) { return a . insertIndex - b . insertIndex ; } if ( a . isStacked && ! b . isStacked ) { return - 1 ; } if ( ! a . isStacked && b . isStacked ) { return 1 ; } if ( a . isStacked && b . isStacked ) { return b . insertIndex - a . insertIndex ; } return a . insertIndex - b . insertIndex ; }