首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >AnyChart不显示进度条

AnyChart不显示进度条
EN

Stack Overflow用户
提问于 2018-05-21 12:39:20
回答 1查看 1.1K关注 0票数 0

工具栏不会在图表之前加载!

在提到这个answer之后

代码语言:javascript
复制
AnyChartView anyChartView = x.findViewById(R.id.any_chart_view);
    pbar = x.findViewById(R.id.progressBar);
    anyChartView.setProgressBar(pbar);
    FirebaseFirestore db = FirebaseFirestore.getInstance();

    final TagCloud tagCloud = AnyChart.tagCloud();

    tagCloud.setTitle("Programming statisctics");

    OrdinalColor ordinalColor = new OrdinalColor();
    ordinalColor.setColors(new String[] {
            "#26959f", "#f18126", "#3b8ad8", "#60727b", "#e24b26"
    });
    tagCloud.setColorScale(ordinalColor);
    tagCloud.setAngles(new Double[] {-90d, 0d, 90d});

    tagCloud.getColorRange().setEnabled(true);
    tagCloud.getColorRange().setColorLineSize(15d);
   final List<Integer> list = new ArrayList<>();
    list.add(1383220000);
    list.add(1383220000);
    list.add(1316000000);
    list.add(324982000);
    list.add(263510000);
    db.collection("jobs")...
    anyChartView.setChart(tagCloud);

从我已经尝试过的情况来看:进度条类型并不重要,如果设置View.Visible,也不重要。

我正在使用TagCloud tagCloud = AnyChart.tagCloud();更新:布局

代码语言:javascript
复制
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.dell.ora.ChartFragment">

    <ProgressBar
        android:id="@+id/progressBar"
        style="?android:attr/progressBarStyleHorizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />


    <com.anychart.anychart.AnyChartView
    android:id="@+id/any_chart_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent">


    </com.anychart.anychart.AnyChartView>

</RelativeLayout>

如果有人遇到过这个问题,请告诉我你是如何解决的!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-05-28 04:42:03

根据您的代码,progressBar在anyChartView下呈现。你所需要的就是改变元素的顺序。请尝试以下代码:

代码语言:javascript
复制
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.dell.ora.ChartFragment">

    <com.anychart.anychart.AnyChartView
        android:id="@+id/any_chart_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

  <ProgressBar
        android:id="@+id/progressBar"
        style="?android:attr/progressBarStyleHorizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

</RelativeLayout>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50449130

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档