Hi Guys, I’m having some issues when trying to render a bar chart with grouped bars that represent Blood Pressure values (systolic and diastolic). I’ve tried altair and plost and even though I get some data rendered in the charts. It looks quite bad and for some reason I’m unable to get them rendering as full bars, and Instead they just show up as small squares in the chart. I’m posting here the plost snippet I’ve used, the Altair one is different but produced the same results.
Hello and thanks for the reply! Not sure who posted it since for some reason I see my name on the reply! and my original question is no longer visible. But I’ve tried your suggestion:
The ‘date’ key is actually correct in my real dataset, I made a mistake of putting it with capital D on my question here in the forums. I’ve tried your snippet but still the chart is getting rendered differently compared to your screen capture:
Really I have no idea why it is getting rendered like that and not like all the examples I’ve seen around the blogs and even on the streamlit and Plost documentation. Could actually be some other issue with the rest of the code, but I’m not sure. I appreciate any extra help on this.
One other thing is that I noticed you passed “True” to the “group” param – pretty sure “group” is supposed to be the name of a column rather than a boolean
Thank you both!! I found the issue, it had to do with the dataframe data types itself. The sys and dias values were not converted to numeric. Once I did the following the chart is showing up as expected now in both Plost and Altair:
Thank you a lot again! Checking your samples pointed me in the right direction to start checking the actual dataframe types, since running your examples directly was working correctly. So the issue must have been somewhere else, and indeed it was. Thanks again for spending time helping this streamlit/pandas newbie!