Skip to content

Commit

Permalink
2020年8月31日 10:53:00
Browse files Browse the repository at this point in the history
  • Loading branch information
GuangNian10000 committed Aug 31, 2020
1 parent 94f049d commit 6da457f
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import android.graphics.Color;
import android.graphics.drawable.Drawable;

import androidx.core.content.ContextCompat;

import com.github.mikephil.charting.charts.LineChart;
import com.github.mikephil.charting.components.AxisBase;
import com.github.mikephil.charting.components.Legend;
Expand Down Expand Up @@ -35,8 +33,8 @@ public class ChartUpdateData {
public void updateLinehart(Activity activity, final List<String> yoyList, final List<String> realList, List<List<Entry>> entries , LineChart lineChart,
final String unit, final List<String>timeList, final String[] labels,int chartType ) {
Drawable[] drawables = {
ContextCompat.getDrawable(activity, R.drawable.chart_thisyear_blue),
ContextCompat.getDrawable(activity, R.drawable.chart_callserice_call_casecount)
activity.getResources().getDrawable(R.drawable.chart_thisyear_blue),
activity.getResources().getDrawable(R.drawable.chart_callserice_call_casecount)
};
int[] colors = {Color.parseColor("#45A2FF"), Color.parseColor("#5fd1cc")};
LineChartEntity lineChartEntity = new LineChartEntity(lineChart, entries, labels, colors, Color.parseColor("#999999"), 12f,timeList);
Expand Down

0 comments on commit 6da457f

Please sign in to comment.