-
-
Save Shestac92/26a0ad7e121db653aca924de02f90fcc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FunnelChartActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_chart_common); | |
AnyChartView anyChartView = findViewById(R.id.any_chart_view); | |
Funnel funnel = AnyChart.funnel(); | |
List<DataEntry> data = new ArrayList<>(); | |
data.add(new ValueDataEntry("Total Market", 232000)); | |
data.add(new ValueDataEntry("Prospects", 94480)); | |
data.add(new ValueDataEntry("Leads", 47390)); | |
data.add(new ValueDataEntry("Sales", 22181)); | |
funnel.setData(data); | |
funnel.setPalette(new String[]{ "#aaa", "#f55", "#5f5", "#55f" }); | |
funnel.getLabels() | |
.setPosition("outsideleft") | |
.setFormat("{%x} ---------------------- {%value}") | |
.setAnchor(EnumsAnchor.LEFT_CENTER) | |
.setFontColor("#000"); | |
anyChartView.setChart(funnel); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to setformat with percent of data ? In here; .setFormat("{%x} ---------------------- {%value}")