How to draw horizontal stripes in a chart using Core Plot?

I am starting to work with the Core Plot base. Right now, I can display the histograms on the screen.

However, I need to draw a horizontal histogram that has stripes extending from the Y axis, for example:

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

How to implement such a horizontal bar chart in Core Plot?

+4
source share
1 answer

You said that you are using the main plot, there are examples of code with a framework that implements barChart. You can take a look at it.

EDIT:

It’s a pity that I saw that you are now updating, and I need horizontal stripes. Use the following code.

 CPBarPlot * barPlot = [CPBarPlot ...]; [barPlot setBarsAreHorizontal:YES]; 
+9
source

Source: https://habr.com/ru/post/1345201/


All Articles