Core Plot horizontal bar chart on negative y-axis - core-plot

I have a requirement to draw Core Plot horizontal bar chart with everything on the negative y-axis. I.e. the first index should appear at -1, like below:
I have figured out how to draw horizontal Bar Chart. But figuring out how to draw them in an "inverted" manner (to let user scroll downward with the tallest bar on top). My thought:
1) Convert the Y-index to negative
2) offset the Y-axis to the top of the graph instead of bottom
Is there any better way to do it?

I have found a historical article that's similar to my request (core-plot iOS reversed Y axis).
I have got what I needed after using this:
CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(-yMax-1) length:CPTDecimalFromFloat(yMax)
P.S. you need to add the -1 to the Location parameter (-yMax-1) otherwise the horizontal bar at index 0 will not be shown clearly.

Related

How to align multiple charts with different data

I have three pie charts displayed in a row. Two have two segments, one has five. All three have vertical legends.
Given that, the chart with five segments displays the pie slightly smaller, due to the extra height of the legend. It also has a slight negative vertical offset.
Is there any way I can set all three charts to render the chart in the same position? I've tried setting the center to 50%,50% in plotOptions, didn't help.
You have to set the marginBottom-Value of the chart to a value that is equal an all charts. Highcharts is trying to display the pie as big as possible, therefore it will use more space if the legend is not as big.
By setting the marginBottom you force the chart to ignore the actual legend size.
The center: ['50%','50%'] setting will only take into account the actual plot area. So if this area is decreased because of a taller legend it has no effect.
I made a jsfiddle where you can explore this settings:
http://jsfiddle.net/doc_snyder/dsmgy6ts/

How to prevent values of x axis points from overlapping each other when Graph has more than one series.?

Couldn't show the value of point on the red line which is covered black circle.
Probably, near points are squishing each other. Is there a solution for fixing this ? Showing it in tooltip not a solution for my task.

Highcharts bubble graph bubble getting cut off on top

I have a Highcharts bubble graph on my page and the top of one of the bubbles is getting chopped off because it is right at the top of the y axis. I've set the maxSize to 50% and would like to keep it that way. Is there a way to allow the bubbles to not have this overflow hidden sort of effect?
Without seeing an example I can only say to try adjusting the yAxis max value. That way there would be space to render your items. Or you can calculate your highest yValue bubble's radius and increase your yAxis by that pixel ammount in yAxis values.

Core Plot: How do you centre the axis labels beneath bars / horizontally offset them?

I am making a column chart in Core Plot, and I want the x-labels to appear beneath the columns, rather than on the left and right. Having trouble finding solutions through searches; either outdated or not related. Feel like plenty of people have had this problem before, I'm just using the wrong keywords.
Screenshot of how it looks right now:
Thanks
The bars are centered at the bar location returned from the datasource, plus or minus any barOffset. For a stacked plot like this, use the default barOffset of zero (0) and make sure the bar locations match the tick locations on the axis.

Coreplot: Axis Labels Fixed Location

I'm trying to customize a Coreplot graph in many ways I can and the next thing I would like to do is place the X Axis Labels (one that is custom as well) at the bottom of the graph, independent of the X axis' position (whether it's scrolled up or down).
To make it clear, it is similar to giving the labels an offset value of something like 50.0. But offset is not the property I'm looking for since it fixes the labels location relative to the X axis.
Any way this can be done? Or do I have to skip the axisLabels property and place and layer or something manually at the bottom of the graph?
EDIT: Alright, I managed to place an axis on the bottom with CPTConstraints. But it's not on the bottommost. If a plot point is on those levels, the plot line overlaps the labels. I tired padding of the graph but of course, it moves the whole graph, hence the issue persists.
Thanks in advance
Make a second x-axis. Have the first one draw the axis line, tick marks, etc., as normal but no labels. Label the second one and set all of the line style properties to nil so it doesn't draw any of the lines.
Turns out that aside from the graph, the plotAreaFrame property of the CPTGrpah also has paddings. If you give more paddings to plotAreaFrame than that of the graph, the plot will be drawn in a smaller frame and the rest of the graph area will be for you to add what you want (i.e., a second Axis).
Big thanks to #Eric, for trying to answer Every single CorePlot question as soon as possible.
CorePlot does have a lot of customisation than I thought.

Resources