How to set hollow for SChartColumnSeries?


#1

I have three questions about SChartColumnSeries:

  1. How to custom and set hollow for the SChartColumnSeries?

>>> https://monosnap.com/file/OidigdD2mvuH036eMnIwlCj3t3oABm

  1. How to custom and set color for the SChartColumnSeries same with MACD chart of https://cryptowat.ch.

http://imgur.com/clCmtYu
3. How to style for the point at index depency with prior index.

Ex: 

x: value at index i

y: value at prior index of i (i - 1).
So  i want custom color of schartcolumn as:

x > y: set red color the schartcolumnseries

x <= y: set blue color the schartcolumnseries.
How to implement it with your framework?

I tried insert images but this site render not successful.
Thank you very much!
Best regards,

tasumi.


#2

Hello Tasumi,

  1. To set the style of a bar/column to hollow you will have to set the areaColor & areaColorWithGradient properties to UIColor.clearColor(). Finally set the lineColor property to whatever colour you want the outline to be. To specify this for individual bars/columns you will have to override SChartBarColumnSeries and make use of the styleForPoint delegate method.
  2. As for styling your current bar/column based on the value of the previous one, you would have to store the values in an array and compare them that way. You can use the SChartDataPointIndex to get the index of the current point.

Kind regards,

Matt