title: How to Set the Color of a Bar in a QBarSet?
body: <p>I have an horizontal bar chart with a single QBarSet that looks like this:
  <a href="https://i.stack.imgur.com/AMTr8.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AMTr8.jpg" alt="enter image description here"></a></p>
  
  <p>I want to individually set the color of each bar of the QBarSet. Is there any way this could be done?</p>
  
  <p>I know I could use 3 separate QBarSet instead of one and set the color of each QBarSet individually to achieve what I want. However, I don't want to use this strategy because the label of the bars would appear in a legend at the top of the chart (I want the label of each bar to appear at the left of the bar, like in the snapshot that I provided).</p>
  
  <p>I saw a solution <a href="https://stackoverflow.com/questions/50584771/how-to-change-one-qbarset-bar-element-color-in-qt?rq=1">here</a> that explains how to do it on hover events, but I can find a way to modify that solution so that the bars are always colored.</p>
  
  <p>Thanks!</p>