I am currently working on a project where I need to display some values in a graph. I have been looking at Chart.js and created two simple charts displaying temperature and humidity. My problem is that I can not get the two charts next to each other. As now it only displays above one another.
I have tried using flexbox with flexGrow set to 1 and other values, but I would like them to scale up next to each other with the same size.
<div style={{display: "flex"}}>
<Temperature chartDataTemperature={this.state.chartDataTemperature} legendPosition="bottom" />
</div>
<div style={{display: "flex"}}>
<Humidity chartDataHumidity={this.state.chartDataHumidity} legendPosition="bottom"/>
</div>
With this code the charts are displayed on top of each other.
I have also tried putting both charts inside the same div but it does not look right.
I have added my project to GitHub if anyone would take a look. https://github.com/henrik3/logg