I followed the Quick Start tutorial about Shinobicharts, and I'm wondering how to get a centered graph like this one
cos graph
I succeded to center the x axis using this :
chart.xAxis.axisPositionValue = #0;
How can I center the y axis as well? Thanks in advance!
DISCLAIMER: I am a developer at Shinobi Controls.
The "axisPositionValue" is in data terms on the other axis.
For example, if you had a X-axis with the data range 0 - 10 and a Y-axis with the data range 0 - 100. To get both axes to be in the centre of the chart set the X-axis' "axisPositionValue" & the Y-axis' "axisPositionValue" to 5 like so:
chart.xAxis.axisPositionValue = #50;
chart.yAxis.axisPositionValue = #5;
Let me know if you have any questions.
Related
According example image I want to create my chart like that. My data entries have both positive and negative values, I want to set 0 in the middle of y-axis everytime.
Is impossible to do that?
Ps. I use Charts library with swift version 5.
Calculate the biggest number on the Y-axis in the chart's dataSet.
let maxValue = max(dataSet)
chart.setChartMinMaxYValues(chartYMin: -(maxValue), chartYMax: maxValue)
For the iOS Charts library, does anybody know how to make the y axis values equidistant from one another? So in the following picture the "1" line would be halfway up the graph?
Set axisMinimum to zero will result in your desired output.
//chartView is the object of BarChartView class.
let yAxisLeft : YAxis = self.chartView.leftAxis
yAxisLeft.axisMinimum = 0
It will remain consistent for other values too.
I am using highcharts for the first time, and I am trying to figure out how to set the Y axis points static.I would like to know how to set y-axis values as -0.0000000001,0.00000000,0.0000000001 and so on in Highcharts.
I have used min=-0.0000000005 and max=0.0000000005 , and the points on y axis come up as 0,0.0000,0.0000... Wherein I want it as -0.0000000001,0.00000000,0.0000000001
You can use label formatter and Highcharts numberFormat then return correct values.
I am developing an Area chart like the following and facing the following issue.
curve shape is not looking proper, i need a smooth curve.
X-axis values are Dynamic, it May start with 40 or May be 60 or
any other value.how to calculate that ?
Any Help will be greatly Appreciated.
To make the line smoother, either give it more data points or make a curved plot.
plot.interpolation = CPTScatterPlotInterpolationCurved;
If you know the range of data values, just set the xRange directly. Remember to set the location to the min value and the length to (max - min). You can also have the graph scale the plot space for you.
[plotSpace scaleToFitPlots:[graph allPlots]];
I'm using CorePlot for my current project and its amazing.
The only problem I came across is the length of the axis and grids.
I'm only using a positiv coordinate system with labels on the left and bottom side.
And my problem is the length of the axis and grids in direction to my labels.
I tried to use:
axisSet.xAxis.orthogonalCoordinateDecimal = CPTDecimalFromString(#"-value");
axisSet.yAxis.orthogonalCoordinateDecimal = CPTDecimalFromString(#"-value");
or
x.labelOffset = value;
y.labelOffset = value;
but this is only setting the distance of my labels different and not affecting the grids length.
In my example the y-axis and there grid overlaps my label:#{1,2,3,4,5,6,7,8}
Did somebody dealed with the same problem? THX for all answer to the right way!
Use the visibleRange and gridLinesRange to limit the axes and grid lines, respectively. See the "Control Chart" in the Plot Gallery example app for sample code.