Skip to content

Commit

Permalink
Set data label color to changeable in Android version
Browse files Browse the repository at this point in the history
  • Loading branch information
ghu999 committed Jan 15, 2025
1 parent 810581c commit a2bc8c9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import java.util.ArrayList;
import java.util.List;

import com.github.mikephil.charting.data.ChartData;

/**
* Base class for Chart Data components. Contains functionality common
* to any Chart Data component. The component corresponds to a single
Expand Down Expand Up @@ -185,7 +187,7 @@ public int DataLabelColor() {
@SimpleProperty
public void DataLabelColor(int argb) {
dataLabelColor = argb;
//dataModel.setColor(color);
dataModel.setDataLabelColor(argb);
onDataChange();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,15 @@ public void setColors(List<Integer> colors) {
}
}

/**
* Changes the color of the labels of the data set.
*
* @param argb new color
*/
public void setDataLabelColor(int argb) {
data.setValueTextColor(argb);
}

/**
* Changes the label of the data set.
*
Expand Down

0 comments on commit a2bc8c9

Please sign in to comment.