开发者

How do I draw horizontal bars in a chart using Core Plot?

I'm beginner with the Core Plot framework. Right now, I am able to render bar charts on the screen.

However, I need to draw a开发者_运维知识库 horizontal bar chart that has the bars extending from the Y axis, like so:

 ^
y|
 |****
 |*******
 |**********
 |******
 |---------------> x

How would I implement such a horizontal bar chart in Core Plot?


you said you are using core-plot, there are sample codes with the framework, in which barChart has been implemented. You can have a look at it.

EDIT:

Sorry I saw you update now, and I got you need horizontal bars. Use following code.

CPBarPlot * barPlot = [CPBarPlot ...];
[barPlot setBarsAreHorizontal:YES];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜