當前位置: 首頁>>代碼示例>>Java>>正文


Java PieChartDataProvider類代碼示例

本文整理匯總了Java中lecho.lib.hellocharts.provider.PieChartDataProvider的典型用法代碼示例。如果您正苦於以下問題:Java PieChartDataProvider類的具體用法?Java PieChartDataProvider怎麽用?Java PieChartDataProvider使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PieChartDataProvider類屬於lecho.lib.hellocharts.provider包,在下文中一共展示了PieChartDataProvider類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: PieChartRenderer

import lecho.lib.hellocharts.provider.PieChartDataProvider; //導入依賴的package包/類
public PieChartRenderer(Context context, Chart chart, PieChartDataProvider dataProvider) {
    super(context, chart);
    this.dataProvider = dataProvider;
    this.touchAdditional = ChartUtils.dp2px(this.density, 8);
    this.slicePaint.setAntiAlias(true);
    this.slicePaint.setStyle(Style.FILL);
    this.centerCirclePaint.setAntiAlias(true);
    this.centerCirclePaint.setStyle(Style.FILL);
    this.centerCirclePaint.setXfermode(new PorterDuffXfermode(Mode.SRC));
    this.centerCircleText1Paint.setAntiAlias(true);
    this.centerCircleText1Paint.setTextAlign(Align.CENTER);
    this.centerCircleText2Paint.setAntiAlias(true);
    this.centerCircleText2Paint.setTextAlign(Align.CENTER);
    this.separationLinesPaint.setAntiAlias(true);
    this.separationLinesPaint.setStyle(Style.STROKE);
    this.separationLinesPaint.setStrokeCap(Cap.ROUND);
    this.separationLinesPaint.setXfermode(new PorterDuffXfermode(Mode.CLEAR));
    this.separationLinesPaint.setColor(0);
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:20,代碼來源:PieChartRenderer.java

示例2: PieChartRenderer

import lecho.lib.hellocharts.provider.PieChartDataProvider; //導入依賴的package包/類
public PieChartRenderer(Context context, Chart chart, PieChartDataProvider dataProvider) {
    super(context, chart);
    this.dataProvider = dataProvider;
    touchAdditional = ChartUtils.dp2px(density, DEFAULT_TOUCH_ADDITIONAL_DP);

    slicePaint.setAntiAlias(true);
    slicePaint.setStyle(Paint.Style.FILL);

    centerCirclePaint.setAntiAlias(true);
    centerCirclePaint.setStyle(Paint.Style.FILL);
    centerCirclePaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC));

    centerCircleText1Paint.setAntiAlias(true);
    centerCircleText1Paint.setTextAlign(Align.CENTER);

    centerCircleText2Paint.setAntiAlias(true);
    centerCircleText2Paint.setTextAlign(Align.CENTER);

    separationLinesPaint.setAntiAlias(true);
    separationLinesPaint.setStyle(Paint.Style.STROKE);
    separationLinesPaint.setStrokeCap(Paint.Cap.ROUND);
    separationLinesPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
    separationLinesPaint.setColor(Color.TRANSPARENT);
}
 
開發者ID:lecho,項目名稱:hellocharts-android,代碼行數:25,代碼來源:PieChartRenderer.java


注:本文中的lecho.lib.hellocharts.provider.PieChartDataProvider類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。