How can I add horizontal lines to a BarPlot - iphone

I want to know how could I add Horizontal lines to each bar of a barPlot with different values.
I want to let the customer know what is the expected value with an horizontal line and what is his real value with a bar.
Any idea ?
Thanks

You can use a second bar plot. Set barBasesVary = YES on the second plot. It will ask the datasource for an additional field called CPTBarPlotFieldBarBase. Return a base value and tip value that will make a short bar.

Related

How to create a stacked bar chart grouped by 2 category

I have a data table, group in 2 category A and B as below
data table
How can I create a stacked bar chart like that
chart
There's not a single built in way to make a chart with bars or columns that are able to split like that.
I think the closest you could do would be to make to bar charts back to back. One would filter for Cat A and the other for Cat B.
The legend for each table could be used or a separate legend could be made from a rectangle and some text boxes. The bars' colors would need to be set otherwise it would Automatically use the same initial color for both.
To make the left chart go in the reverse direction, click on the bottom x-Axis and set the Reverse property to True.
Then Hide the Y-Axis of the Chart B.

Use iOS-Charts How to set the label position of the X axis and the position of the bar, line

I want need to be done like this,
but I made this after I do not know how to do it.
I want understand the attributes of the IOS chart, the first picture on both sides of the column does not show completely, I would like to two columns and X axis of the label indentation, how to set up?
Can who help me?
Thank you!
If I understand your question, you want to see the whole width of the yellow bar for April. This should force the bar to be shown:
chartView.xAxis.axisMinimum = 0.0
chartView.setVisibleXRange(minXRange: 3.0, maxXRange: 3.0)
If you change the 0.0 to a bigger number it should move the yellow bar more to the right.
You can also try changing the number 3.0 to a bigger number and see what effect it gives you.

Displaying total at the top of stacked bar with indicator

I am trying to show the total at the top of the stacked bar graph. But it is showing very far from the top of bar graph. sorry this might be duplicate question. . Could anyone help me with adding indicator like one in the picture and showing the value at the top of the triangle? TIA
I am able to solve my problem. I added second series that is total of other 2 series and change the chart series type line with markers,gave the color 'No color',hide the legend property and set the label position as top.But I do not know why the value shows below for the first column. this same technique I tried before I am posting my question.But it did not work at that time.Now it works except one value shows below the marker.
Reference:http://sqljason.com/2010/06/display-total-on-top-of-stacked-chart_8589.html

How to set series expression when you do not have any series when creating bar chart in iReport?

I have created a bar chart in iReport Designer 5.1.0. I want to show some ips at x axis and the occurrence of each of these ips at y axis. The bar chart must have a single color but when I run it bars have different colors with each other. I think series expression has to be empty, and I have to put $F{ip} in category expression and $F{occurrence} in value expression, but series expression has to be filled because it is not optional.
It would be great if someone can help me.
In your series expression, using quotes you can just specify something like a name or anything relative to the chart. For e.g,"Ip v/s Occurrence". Basically have a string value in there. This will be displayed as a legend. You would get the chart in single color.
change the orientation again back to vertical. Click the barchart and choose the properties to be orientation:vertical.
Hope thats what you meant

How to add horizontal bar in table row whose width depends on the value passed

I am implementing vote application in which i need to show horizontal bar in table row whose width is depended on particular value. This horizontal bar will act as a indicator to show percentage of vote.
One solution could be like this.....
Use two UILabels..... with different color..... combined length of this label would be 100px and we will vary individual's length based on the percentage......
Thanks,
You can use progress bar in the 'cell. backgroundView'.
or you can have imageView and overriding its draw rect method to draw the percentage of votes