I try to put Morris js donut chart in the flex container with 2 flex items, I expect that chart in flex: 1 container will resize, but it does not. Does anyone know how to make the chart to be responsive in flex item?
Here is my example example try to resize it
JS:
$(function () {
Morris.Donut({
element: 'container',
resize: true,
data: [
{label: "Download Sales", value: 12},
{label: "In-Store Sales", value: 30},
{label: "Mail-Order Sales", value: 20}
]
});
CSS:
html, body {
height: 100%;
margin: 0;
}
body {
display: -webkit-flex;
}
#container {
flex: 1;
}
.flex1 {
flex: 1;
border: 1px solid red;
}