Android CandlestickSeries Class


#1

Dear All,

I would like to create CandlestickSeries Class in Android app. I find the reference link at

http://www.shinobicontrols.com/docs/ShinobiControls/ShinobiChartsAndroid/1.3.2/Premium/MonoTouch/Com.ShinobiControls.Charts/CandlestickSeries.html

Is there any example about how to use candlestick series in Android?

Thanks,

Victor


#2

hi,

i found a guide here

http://www.shinobicontrols.com/docs/ShinobiControls/ShinobiChartsAndroid/1.3.2/Standard/Normal/user-guide/how-to-candlestick-chart.html

when i am creating the candlestick series, i got an error

“Cannot add data point: You must supply all DataPoint parameter arguments, non-null”

Thanks,

Victor


#3

i have found the solutions, for candlestick series, we need to supply 4 values, such as below:

MultiValueDataPoint<Date, Double> dataPoint = new MultiValueDataPoint<Date, Double>(

resultdate1, 

Double.parseDouble(myDiastolicArray[i][0]),

Double.parseDouble(mySystolicArray[i][0]),

Double.parseDouble(myDiastolicArray[i][0]),

Double.parseDouble(mySystolicArray[i][0]));


#4

i found out a problem:

i set the candle stick to different color and different width, it always come out in green and same width. it cannot be changed.

is this a known issue in Shinobi?

here is my code, i cannot change the candlestick color nor the width

multiDataAdapter.addAll(dataPoints);

CandlestickSeries candle1 = new CandlestickSeries();

candle1.setDataAdapter(multiDataAdapter);

candle1.getStyle().setStickWidth((float) 1.0);

candle1.getStyle().setStickColor(Color.RED);

shinobiChart.addSeries(candle1);


#5

Dear All,

May i know if the candlestick series supports color and width setting? This is very important as i really need to use different color and width in the candlestick series.

Thanks,

Victor


#6

Hi Victor,

To set the colour of the Candlesticks you need to use setRisingColor and setFallingColor (and their gradient equivalents if you want a gradient effect).

setStickColor sets the colour of the high and low stick markers on the candlestick and setStickWidth sets the width of these stick markers so wont effect the width of the main candlestick. The width is determined in the same way as columns in a ColumnSeries. Therefore you can’t set a width directly but instead can set the inter series padding on the X axis’ AxisStyle object (and the inter series set padding if applicable).

The following API docs should point you in the right direction:

Kind regards,

Patrick


#7

Hi Patrick,

It is working, Thank you.

Regards,

Victor