Howdy, Iām trying to execute a bar chart where the category label is anchored to the left of the bar area, and the value of that category is anchored to the right of the bar areaā¦ not the bar itself, but the bar if it were at the max value.
My efforts have left me with labels scaling INSIDE the bar based on itās amplitude.
fig.add_trace(
go.Bar(x=[x.get(ācountā) for x in all_time], y=[x.get(ānameā) for x in all_time], textposition=āinsideā,
text=[x.get(ālabel_countā) for x in all_time], orientation=āhā, hovertext=entity_all_time_text,
name=āAll Timeā),
1, 1)
@mikenyc
As the percentage values on the right are from the bottom bar trace they are placed under the second bar trace.
One solution could be to place the percentage values outside the bar by setting textposition="outside" and slightly increasing the range on x axis to have room for the values.
Thanks. I think the best solution is to make the max range 1.2x so thereās a little room on the right side for the valuesā¦ itās slightly inaccurate. but the relative size of the bars is whatās important. Thanks again!