首页 > 解决方案 > Android Studio 应用程序开发中 Anychart 代码中的“私人访问”错误

问题描述

我正在将最新的 Anychart 代码尝试到我的 Android Studio 应用程序中,所有 riskMap.* 函数都有错误,提示提示说这些函数具有私有访问权限,因此无法使用,如何处理?谢谢。

import com.anychart.anychart.AnyChart;
import com.anychart.anychart.AnyChartView;
import com.anychart.anychart.HeatMap;
import com.anychart.anychart.SelectionMode;
import com.anychart.anychart.SolidFill;
import com.example.anygraphtest.R;

import java.util.ArrayList;

public class HeatMapChartActivity 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);
        //anyChartView.setProgressBar(findViewById(R.id.progress_bar));

        HeatMap riskMap = AnyChart.heatMap();

        riskMap.stroke("1 #fff");
        riskMap.hovered()
                .stroke("6 #fff")
                .fill(new SolidFill("#545f69", 1d))
                .labels("{ fontColor: '#fff' }");

        riskMap.interactivity().selectionMode(SelectionMode.NONE);

        riskMap.title().enabled(true);
        riskMap.title()
                .text("Risk Matrix in Project Server")
                .padding(0d, 0d, 20d, 0d);

        riskMap.labels().enabled(true);
......
}
}

标签: androidheatmapanychart

解决方案


推荐阅读