Default filled/not-filled in candle chart were wrong

This commit is contained in:
Daniel Cohen Gindi 2016-02-11 09:55:02 +02:00
parent fad31d0e88
commit 5809f713c5
4 changed files with 12 additions and 8 deletions

View file

@ -201,9 +201,9 @@ public class CandleStickChartActivity extends DemoBase implements OnSeekBarChang
set1.setShadowColor(Color.DKGRAY);
set1.setShadowWidth(0.7f);
set1.setDecreasingColor(Color.RED);
set1.setDecreasingPaintStyle(Paint.Style.STROKE);
set1.setDecreasingPaintStyle(Paint.Style.FILL);
set1.setIncreasingColor(Color.rgb(122, 242, 84));
set1.setIncreasingPaintStyle(Paint.Style.FILL);
set1.setIncreasingPaintStyle(Paint.Style.STROKE);
//set1.setHighlightLineWidth(1f);
CandleData data = new CandleData(xVals, set1);

View file

@ -58,9 +58,9 @@ public class RealmDatabaseActivityCandle extends RealmBaseActivity {
set.setShadowColor(Color.DKGRAY);
set.setShadowWidth(0.7f);
set.setDecreasingColor(Color.RED);
set.setDecreasingPaintStyle(Paint.Style.STROKE);
set.setDecreasingPaintStyle(Paint.Style.FILL);
set.setIncreasingColor(Color.rgb(122, 242, 84));
set.setIncreasingPaintStyle(Paint.Style.FILL);
set.setIncreasingPaintStyle(Paint.Style.STROKE);
ArrayList<ICandleDataSet> dataSets = new ArrayList<ICandleDataSet>();
dataSets.add(set); // add the dataset

View file

@ -34,13 +34,15 @@ public class CandleDataSet extends LineScatterCandleRadarDataSet<CandleEntry> im
/**
* paint style when open <= close
* increasing candlesticks are traditionally hollow
*/
protected Paint.Style mIncreasingPaintStyle = Paint.Style.FILL;
protected Paint.Style mIncreasingPaintStyle = Paint.Style.STROKE;
/**
* paint style when open > close
* descreasing candlesticks are traditionally filled
*/
protected Paint.Style mDecreasingPaintStyle = Paint.Style.STROKE;
protected Paint.Style mDecreasingPaintStyle = Paint.Style.FILL;
/**
* color for open <= close

View file

@ -39,13 +39,15 @@ public class RealmCandleDataSet<T extends RealmObject> extends RealmLineScatterC
/**
* paint style when open <= close
* increasing candlesticks are traditionally hollow
*/
protected Paint.Style mIncreasingPaintStyle = Paint.Style.FILL;
protected Paint.Style mIncreasingPaintStyle = Paint.Style.STROKE;
/**
* paint style when open > close
* descreasing candlesticks are traditionally filled
*/
protected Paint.Style mDecreasingPaintStyle = Paint.Style.STROKE;
protected Paint.Style mDecreasingPaintStyle = Paint.Style.FILL;
/**
* color for open <= close