While developing my sorting visualizer app in React, I have encountered a slight issue with the rendering. The graph structure of my visualization appears to be a bit "jiggly" at the moment.
To provide some context, here is the current setup of my graph within the application (Bootstrap4 is being utilized):
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<!-- -->
<div class="graph" style="height: 500px; width: 500px;">
<div class="bar" title="56" style="height: 224px; width: 4px; background-color: rgb(0, 107, 160); display: inline-block;"></div>
<div class="bar" title="104" style="height: 416px; width: 4px; background-color: rgb(42, 184, 255); display: inline-block;"></div>
<div class="bar" title="65" style="height: 260px; width: 4px; background-color: rgb(0, 124, 186); display: inline-block;"></div>
<div class="bar" title="6" style="height: 24px; width: 4px; background-color: rgb(0, 11, 17); display: inline-block;"></div>
<div class="bar" title="51" style="height: 204px; width: 4px; background-color: rgb(0, 97, 146); display: inline-block;"></div>
<div class="bar" title="31" style="height: 124px; width: 4px; background-color: rgb(0, 59, 89); display: inline-block;"></div>
...
</div>
<!-- -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c2b2adb2b2a7b0eca8b182f3ecf3f4ecf2">[email protected]</a>/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
The appearance of these bars dynamically changes based on updates to the list. The heights and colors are determined by calculations relative to the numeric values and container height.
An interesting observation is that all the bars seem to shift when there isn't one bar that spans the entire height of the container. Is there a way to address this issue effectively?
Your advice and suggestions would be greatly appreciated.