|
|
|
|
@ -24,10 +24,14 @@ class DataSetFactory { |
|
|
|
|
return lineDataSet |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fun barDataSetInstance(entries: List<BarEntry>, label: String, context: Context) : BarDataSet { |
|
|
|
|
fun barDataSetInstance(entries: List<BarEntry>, label: String, context: Context, colors: MutableList<Int>? = null) : BarDataSet { |
|
|
|
|
|
|
|
|
|
val barDataSet = BarDataSet(entries, label) |
|
|
|
|
barDataSet.color = context.getColor(R.color.chart_bar) |
|
|
|
|
if (colors != null) { |
|
|
|
|
barDataSet.colors = colors |
|
|
|
|
} else { |
|
|
|
|
barDataSet.color = context.getColor(R.color.chart_bar) |
|
|
|
|
} |
|
|
|
|
barDataSet.highLightColor = context.getColor(R.color.chart_selected_bar) |
|
|
|
|
barDataSet.setDrawValues(false) |
|
|
|
|
return barDataSet |
|
|
|
|
|