3
votes

I have worked with Bar graphs with Core Plot, but i couldn't find a way to get a horizontal bar chart containing bars with multiple values. Is there a way to do it in Core Plot?

Here is an image of what i want to do.

enter image description here

2

2 Answers

1
votes

You can do this with stacked bar plots. Make one bar plot for each section and set barBasesVary to YES for each one. This causes the plot to query the datasource for an additional field called CPTBarPlotFieldBarBase for each bar. Use this to set the lower edge of the bar.

The "Vertical Bar Chart" in the Plot Gallery example app demonstrates this technique.

1
votes

I know it is a really old post. But I have recently created a library which is creating horizontal bars from given values. It's written in Swift and maybe someone can use this in future projects.

https://github.com/prine/ROStorageBar