本文整理匯總了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);
}
示例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);
}