[Chart IOS] Y-axis range issue with candleChart


#1

Hello shinobi,

i want to give the option to display my chart as candles also,

the problem is with the y axis, the minimum and maximum range is starting from zero always regarding the points,

here is the problem in the candle chart:

here is the line chart of the same data that is rendered good with ~80 - ~100 range:

is there any solution? thanks!


#2

well, although i still got some visual issue, this fixed the range thing in the candles chart,

after the chart loaded:

    [mainChart.yAxissetRangeWithMinimum:mainChart.yAxis.dataRange.minimumandMaximum:mainChart.yAxis.dataRange.maximum];


#3

raslin

well, although i still got some visual issue, this fixed the range thing in the candles chart,

after the chart loaded:

 

    [mainChart.yAxissetRangeWithMinimum:mainChart.yAxis.dataRange.minimumandMaximum:mainChart.yAxis.dataRange.maximum];

can’t help in candle chart


#4

Has anyone found a better solution to this?  It really seems like this defect is still present in the recent releases of ShinobiCharts.


#5

We are seeing this with the OHLC chart style also, it seems to affect any chart with a multi-y data point.

Edit…  nevermind, Band Series work just fine.


#6

I did some more digging into this and submitted a support ticket (TT5716).  It can be easily reproduced in the CandlestickChart example that ships with the framework.  Because the AAPL data in that chart has such a wide range, it isn’t easily noticable unless you do something like limit it to the first 20 data points.  Once you do that, it is clear.  

This issue affects both Candlestick and OHLC series types from what I can see.


#7

I’ve done some digging into this issue and it appears to be related to the baseline on the series in question. The baseline is taken into account when auto-calculating a range. Each series has a nil baseline by default.

The line series has a nil baseline interpreted to mean just that - there is no baseline to be included in the auto-calculated range. 

A candlestick series seems to be having its nil baseline interpreted as 0, resulting in the default auto-calculated range including the value 0. Explicitly setting the baseline to nil still has no effect, so the current workarounds are either:

  1.  Setting an explicit baseline on the candlestick series to match your minimum data point value. This will result in the baseline not extending the auto-calculated range.
  2. Manually setting the defaultRange property on your axis to be from your data’s min to max. This is used for the chart’s initial render and any range resets that occur, so the misinterpreted baseline will be ignored as no range will be auto-calculated.

This issue has been raised in our tracking system and we’ll be looking into a fix for an upcoming ShinobiChart release. Apologies for any inconvenience caused!