【问题标题】:is there any android library for pie chart which will support custom font in the slice of the pie chart?是否有任何用于饼图的 android 库将支持饼图切片中的自定义字体?
【发布时间】:2018-06-28 04:37:25
【问题描述】:

带有孟加拉字体的安卓饼图

我在 gradle 中使用过这个。我不知道如何使用自定义字体 请任何人都可以帮助我

实现com.github.PhilJay:MPAndroidChart:v3.0.3

【问题讨论】:

    标签: android pie-chart custom-font


    【解决方案1】:

    你可以这样设置字体:

    PieData data = new PieData(yourDataSet);
    data.setValueTypeface(typeFaceObj);
    

    【讨论】:

      【解决方案2】:

      查看MPAndroidChart

      试试 setValueTypeface(Typeface tf);方法

      【讨论】:

        【解决方案3】:

        试试这个,使用你的字体而不是这个“fonts/opensans_regular.ttf”

        Typeface font= Typeface.createFromAsset(ctx.getAssets(), "fonts/opensans_regular.ttf");
        dataSet.setValueTypeface( font );
            PieData data = new PieData( dataSet );
            data.setValueTypeface( font );
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2017-11-15
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多