AnyChart-Android
AnyChart-Android copied to clipboard
AnyChartView with tagCloud not showing and refreshing any data.
AnyChartView anyChartView = findViewById(R.id.anyChartView); anyChartView.setProgressBar(findViewById(R.id.progressBar)); TagCloud tagCloud = AnyChart.tagCloud(); tagCloud.background("#000000"); anyChartView.setBackgroundColor("#000000"); OrdinalColor ordinalColor = OrdinalColor.instantiate(); ordinalColor.colors(new String[]{ "#000000", "#000000", "#000000", "#000000", "#000000" }); tagCloud.colorScale(ordinalColor); tagCloud.angles(new Double[]{0d});//-90d,90d tagCloud.colorRange().enabled(false); List<DataEntry> data = new ArrayList<>(); ArrayList<ClaimCount> claimCountList = new ArrayList<>(); switch (thisWMY) { case "week": { claimCountList.addAll(chartDetail.getWeekData().getClaimCount()); } break; case "month": { claimCountList.addAll(chartDetail.getMonthData().getClaimCount()); } break; case "year": { claimCountList.addAll(chartDetail.getYearData().getClaimCount()); } break; } for (int i = 0; i < claimCountList.size(); i++) { data.add(new CategoryValueDataEntry(claimCountList.get(i).getExpDesc(), claimCountList.get(i).getExpCode(), claimCountList.get(i).getCount())); } tagCloud.data(data); anyChartView.setChart(tagCloud);