How to create Stacked Bar Chart when the data is as columns

Suppose the data is as follows

  Date      Type1  Type2  Type3  Type4  Type5 
2017-10-31   NaN    NaN    1.0    NaN    NaN 
2017-11-30   NaN    NaN    NaN    NaN    NaN
2017-12-31   NaN    NaN    NaN    1.0    NaN
2018-01-31   NaN    NaN    NaN    NaN    NaN
2018-02-28   NaN    NaN    NaN    NaN    1.0
2018-03-31   1.0    NaN    NaN    NaN    NaN
2018-04-30   NaN    NaN    NaN    NaN    NaN
2018-05-31   NaN    1.0    NaN    NaN    NaN
2018-06-30   NaN    NaN    NaN    NaN    NaN
2018-07-31   NaN    NaN    NaN    NaN    NaN
2018-08-31   NaN    NaN    NaN    NaN    NaN
2018-09-30   NaN    NaN    NaN    NaN    NaN

Please suggest some way to display

Date column as X axis and count of 1’s as Y axis and Type1,Type2,Type3,Type4,Type5 as Legend

and count in Y axis should show the different colors for different type based on Type