布局代码:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.rlzz.mpandroidchart.Test2Activity">
<com.github.mikephil.charting.charts.CombinedChart
android:id="@+id/chart"
android:layout_width="match_parent"
android:layout_height="500dp"/>
</LinearLayout>
Activity代码
private CombinedChart combinedChart;
protected String[] suppliers = new String[]{
"鸿兴", "利科", "大阪", "沃佳尔", "大唐", "聚科", "其他", "联博", "聚源升", "尹信达"
};
@Override
protected

本文介绍了如何在Android应用中使用MPAndroidChart库创建CombinedChart,结合了饼状图、柱形图和折线图的展示,提供了一种丰富的数据可视化方案。通过布局代码和Activity代码的详细步骤,展示了如何配置和绘制这些图表。

2万+

被折叠的 条评论
为什么被折叠?



