{"action":"closed","issue":{"url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/328","labels_url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/328/labels{/name}","comments_url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/328/comments","events_url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/328/events","html_url":"https://github.com/PhilJay/MPAndroidChart/issues/328","id":55750776,"number":328,"title":"Not able to reproduce PieChart demo chart.","user":{"login":"axierjhtjz","id":952289,"avatar_url":"https://avatars.githubusercontent.com/u/952289?v=3","gravatar_id":"","url":"https://api.github.com/users/axierjhtjz","html_url":"https://github.com/axierjhtjz","followers_url":"https://api.github.com/users/axierjhtjz/followers","following_url":"https://api.github.com/users/axierjhtjz/following{/other_user}","gists_url":"https://api.github.com/users/axierjhtjz/gists{/gist_id}","starred_url":"https://api.github.com/users/axierjhtjz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axierjhtjz/subscriptions","organizations_url":"https://api.github.com/users/axierjhtjz/orgs","repos_url":"https://api.github.com/users/axierjhtjz/repos","events_url":"https://api.github.com/users/axierjhtjz/events{/privacy}","received_events_url":"https://api.github.com/users/axierjhtjz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-28T12:33:19Z","updated_at":"2015-02-20T22:00:22Z","closed_at":"2015-02-20T22:00:22Z","body":"i've tried to reproduce the same chart from the demos but I think I'm missing something on the config side.\r\n\r\nThis is my .xml file\r\n\r\n```xml\r\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    xmlns:tools=\"http://schemas.android.com/tools\" android:layout_width=\"match_parent\"\r\n    android:layout_height=\"match_parent\" android:paddingLeft=\"@dimen/activity_horizontal_margin\"\r\n    android:paddingRight=\"@dimen/activity_horizontal_margin\"\r\n    android:paddingTop=\"@dimen/activity_vertical_margin\"\r\n    android:paddingBottom=\"@dimen/activity_vertical_margin\"\r\n    tools:context=\"com.irontec.ikasega.FinishedExamActivity\">\r\n\r\n    <LinearLayout\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:gravity=\"center\"\r\n        android:background=\"@color/progressbar_background\">\r\n\r\n        <com.github.mikephil.charting.charts.PieChart\r\n            android:id=\"@+id/chart1\"\r\n            android:layout_width=\"200dp\"\r\n            android:layout_height=\"200dp\" />\r\n\r\n        </LinearLayout>\r\n\r\n</ScrollView>\r\n```\r\n\r\nAnd this is my .java class that configures everything\r\n\r\n```java\r\n@Override\r\n    protected void onCreate(Bundle savedInstanceState) {\r\n        super.onCreate(savedInstanceState);\r\n        setContentView(R.layout.activity_finished_exam);\r\n\r\n        PieChart chart = (PieChart) findViewById(R.id.chart1);\r\n        chart = configureChart(chart);\r\n        chart = setData(chart);\r\n        chart.animateXY(1500, 1500);\r\n    }\r\n\r\n    public PieChart configureChart(PieChart chart) {\r\n        chart.setHoleColor(getResources().getColor(android.R.color.background_dark));\r\n        chart.setHoleRadius(60f);\r\n        chart.setDescription(\"\");\r\n        chart.setTransparentCircleRadius(5f);\r\n        chart.setDrawYValues(true);\r\n        chart.setDrawCenterText(true);\r\n        chart.setDrawHoleEnabled(false);\r\n        chart.setRotationAngle(0);\r\n        chart.setDrawXValues(false);\r\n        chart.setRotationEnabled(true);\r\n        chart.setUsePercentValues(true);\r\n        chart.setCenterText(\"MPAndroidChart\\nLibrary\");\r\n        return chart;\r\n    }\r\n\r\n    private PieChart setData(PieChart chart) {\r\n        ArrayList<Entry> yVals1 = new ArrayList<Entry>();\r\n        yVals1.add(new Entry(25, 0));\r\n        yVals1.add(new Entry(75, 1));\r\n        ArrayList<String> xVals = new ArrayList<String>();\r\n        xVals.add(\"Good\");\r\n        xVals.add(\"Bad\");\r\n        PieDataSet set1 = new PieDataSet(yVals1, \"\");\r\n        set1.setSliceSpace(0f);\r\n        ArrayList<Integer> colors = new ArrayList<Integer>();\r\n        colors.add(getResources().getColor(android.R.color.holo_green_light));\r\n        colors.add(getResources().getColor(android.R.color.holo_red_light));\r\n        set1.setColors(colors);\r\n        PieData data = new PieData(xVals, set1);\r\n        chart.setData(data);\r\n        chart.highlightValues(null);\r\n        chart.invalidate();\r\n        return chart;\r\n    }\r\n```\r\n\r\nCan someone point me what config parameter am I missing? This is the output chart.\r\n\r\n![Output Chart](http://s23.postimg.org/oxep59vnv/Screenshot_2015_01_28_13_31_14.png)\r\n\r\n\r\nThanks in advance"}}