SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
I’ve been looking through ways to have to y-Axis scale for really small changes/values.
For example, I’m attempting to plot 10 values between 0.99300 to 0.99400, and the changes between points can vary between 0.001 to 0.0001 or so (basically, really small changes)
However, my y-Axis seems to always start at 0 and the y-Axis major ticks are always at most a 0.1 difference, making the graph look flat.
I’d like to achieve the following:
– Scale to the smallest value i can scale to.
– Have my y-Axis to not necessarily start at 0.
I’ve tried the following:
Setting up y-Axis:
self.yAxis = [SCINumericAxis new]; [self.yAxis setStyle:axisStyle]; self.yAxis.axisId = @"yAxis"; [self.yAxis setGrowBy:[[SCIDoubleRange alloc]initWithMin:SCIGeneric(0) Max:SCIGeneric(0.1)]]; [self.yAxis setAutoRange:SCIAutoRange_Always]; [self.chartSurface attachAxis:self.yAxis IsXAxis:NO];
If I get it right you need not axis scale but Y auto range for mountains the same as for line series. We changed mountain series so it is default behaviour now.
Please try downloading our latest build at the link
SciChart iOS Developer
It’s probably text formatting making the individual Gridlines/Labels appear as 0, 0, 0, 0, 0.
Take a look at the following: iOS Chart Axis Labels: Text Formatting
I believe text formatting obeys standard NSString Format Specifiers. If you try changing it to a value to display several decimal places you should see the labels subdivided as 0.00, 0.02, 0.04, 0.06, 0.08, 0.10 etc…
Let me know if this helps,
The points do show more decimal points using text formatting but it still remains the same interval (0.000, 0.100, 0.200, 0.300, 0.400, 0.500). It doesn’t drill down to smaller intervals.
I am using a SCIFastMountainRenderableSeries for the drawing of the chart. I was wondering if this affects anything? When drawing the mountain chart, is it always a must to display point 0?
I’ve attached two images for the comparison.
The scaling am trying to achieve is represented by the one with the line graph while the one which am having is the one with the mountain graph. I think it might be caused by the mountain graph always extending to 0? (I am not too sure about this)
If so, is there a way to have the line graph sort of y-axis scaling on the mountain graph?
I tried using cursorTextFormatting and it does not achieve what am trying to achieve. It formats the annotation that I have but what I am trying to achieve is to have the mountain chart tick labels scaled as how the line chart tick labels are scaled.
I think the images were a little misleading in expressing what I am trying to get, and I apologise for that.
I tried using number formatter and text formatting, and I have attached the image with this answer.
I used the following code to add the formatter and formatting:
NSNumberFormatter *numberFormatter = [NSNumberFormatter new]; [numberFormatter setNumberStyle:NSNumberFormatterDecimalStyle]; [numberFormatter setMinimumFractionDigits:3]; [numberFormatter setMaximumFractionDigits:5]; [((SCINumericAxis *)self.yAxis) setNumberFormatter:numberFormatter]; [((SCINumericAxis *)self.yAxis) setTextFormatting:@"%.5f"];
As you can see, the scaling on the y-axis still does not happen. Is this because the mountain chart must always show the constant zerolineY?
Is there a way for the mountain chart to completely ignore the concept of a zero line Y and draw as how a line chart would?
Or is there a way for me to add a coloured area below a line graph?
Please login first to submit.