private static void addDataSeries ( final SimpleDateFormat simpleDateFormat , final SimpleDateFormat parseInputDateFormat , final DataSeries dataSeries , final Series series , final Entry < String , List < ViewRiksdagenDocumentTypeDailySummary > > entry ) { series . addSeries ( new XYseries ( ) . setLabel ( entry . getKey ( ) ) ) ; dataSeries . newSeries ( ) ; for ( final ViewRiksdagenDocumentTypeDailySummary item : entry . getValue ( ) ) { if ( item != null && item . getEmbeddedId ( ) . getPublicDate ( ) . length ( ) > 0 ) { try { dataSeries . add ( simpleDateFormat . format ( parseInputDateFormat . parse ( item . getEmbeddedId ( ) . getPublicDate ( ) ) ) , item . getTotal ( ) ) ; } catch ( final ParseException e ) { LOGGER . warn ( "Problem parsing date:{}" , item . getEmbeddedId ( ) . getPublicDate ( ) ) ; } } } }
Adds the data series .