<commit_before>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Util;
using Android.Views;
using Android.Widget;
using Java.Lang;
using MikePhil.Charting.Charts;
using MikePhil.Charting.Components;
using TFG.Droid.Custom_Views;
using TFG.Droid.Interfaces;
using TFG.Droid.Utils; 
using Fragment = Android.Support.V4.App.Fragment;

namespace TFG.Droid.Fragments.StepCounter {
    public class StepCounterChartFragment : Fragment{  
        private DateTime _date = DateTime.Now;
        private ChartUtils.VisualizationMetric _metric;

        public StepCounterChartFragment(ChartUtils.VisualizationMetric metric) {
            _metric = metric;
            

        } 
        public StepCounterChartFragment(ChartUtils.VisualizationMetric metric, DateTime date) : this(metric) {
            _date = date;
        }

        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {  
            var view =  inflater.Inflate(Resource.Layout.fragment_stepcounter_body_chart_results, container, false);

            var itemsForMetric = ChartUtils.GetStepCounterItemsFromMetric(_metric, DateTime.Now);

            var stepsChart = view.FindViewById<CardViewBarChart>(Resource.Id.steps_chart);
            stepsChart.Title.Text = Activity.GetString(Activity.Resources.GetIdentifier("steps", "string", Activity.PackageName));
            stepsChart.PopulateChart(ChartUtils.StepCounter_StepsToBarEntries(itemsForMetric));

            var caloriesChart = view.FindViewById<CardViewBarChart>(Resource.Id.calories_chart);
            caloriesChart.Title.Text = Activity.GetString(Activity.Resources.GetIdentifier("calories", "string", Activity.PackageName));
            caloriesChart.PopulateChart(ChartUtils.StepCounter_CaloriesToBarEntries(itemsForMetric));

            var distanceChart = view.FindViewById<CardViewBarChart>(Resource.Id.distance_chart);
            distanceChart.Title.Text = Activity.GetString(Activity.Resources.GetIdentifier("kilometers", "string", Activity.PackageName));
            distanceChart.PopulateChart(ChartUtils.StepCounter_DistanceToBarEntries(itemsForMetric));

            return view;
        }
    }
} <commit_msg>Set Color for StepCounter charts<commit_after>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Support.V4.Content;
using Android.Util;
using Android.Views;
using Android.Widget;
using Java.Lang;
using MikePhil.Charting.Charts;
using MikePhil.Charting.Components;
using TFG.Droid.Activities;
using TFG.Droid.Custom_Views;
using TFG.Droid.Interfaces;
using TFG.Droid.Utils;
using TFG.Model;
using Fragment = Android.Support.V4.App.Fragment;

namespace TFG.Droid.Fragments.StepCounter {
    public class StepCounterChartFragment : Fragment{  
        private DateTime _date = DateTime.Now;
        private ChartUtils.VisualizationMetric _metric;

        public StepCounterChartFragment(ChartUtils.VisualizationMetric metric) {
            _metric = metric;
            

        } 
        public StepCounterChartFragment(ChartUtils.VisualizationMetric metric, DateTime date) : this(metric) {
            _date = date;
        }

        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {  
            var view =  inflater.Inflate(Resource.Layout.fragment_stepcounter_body_chart_results, container, false);

            var itemsForMetric = ChartUtils.GetStepCounterItemsFromMetric(_metric, DateTime.Now);
            var colorName =
                HealthModulesInfo.GetHealthModuleColorFromHealthModuleName(
                    ((ModuleDetailActivity) Activity).CurrentHealthModule);
            var colorRes = ContextCompat.GetColor(Activity, Activity.Resources.GetIdentifier(colorName, "color", Activity.PackageName));


            var stepsChart = view.FindViewById<CardViewBarChart>(Resource.Id.steps_chart);
            stepsChart.Title.Text = Activity.GetString(Activity.Resources.GetIdentifier("steps", "string", Activity.PackageName));
            stepsChart.Color = colorRes;
            stepsChart.PopulateChart(ChartUtils.StepCounter_StepsToBarEntries(itemsForMetric));

            var caloriesChart = view.FindViewById<CardViewBarChart>(Resource.Id.calories_chart);
            caloriesChart.Title.Text = Activity.GetString(Activity.Resources.GetIdentifier("calories", "string", Activity.PackageName));
            caloriesChart.Color = colorRes;
            caloriesChart.PopulateChart(ChartUtils.StepCounter_CaloriesToBarEntries(itemsForMetric));

            var distanceChart = view.FindViewById<CardViewBarChart>(Resource.Id.distance_chart);
            distanceChart.Title.Text = Activity.GetString(Activity.Resources.GetIdentifier("kilometers", "string", Activity.PackageName));
            distanceChart.Color = colorRes;
            distanceChart.PopulateChart(ChartUtils.StepCounter_DistanceToBarEntries(itemsForMetric));

            return view;
        }
    }
} 
{'fraction_non_alphanumeric': 0.0863323124042879, 'fraction_numerical': 0.0005742725880551302, 'mean_word_length': 3.8112338858195214, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4227848', 'n_tokens_mistral': 1349, 'n_tokens_neox': 1334, 'n_words': 241}