PieChartConfig

constructor(startAngle: Float = DEFAULT_START_ANGLE, showSliceLabels: Boolean = true, sliceLabelTextSize: TextUnit = DEFAULT_SLICE_LABEL_TEXT_SIZE.sp, sliceLabelTextColor: Color = Color.White, sliceLabelTypeface: Typeface = Typeface.DEFAULT, isAnimationEnable: Boolean = false, @IntRange(from = 1) animationDuration: Int = 500, strokeWidth: Float = DEFAULT_STROKE_WIDTH, labelFontSize: TextUnit = 24.sp, labelTypeface: Typeface = Typeface.DEFAULT, labelVisible: Boolean = false, labelType: PieChartConfig.LabelType = LabelType.PERCENTAGE, labelColor: Color = Color.White, labelColorType: PieChartConfig.LabelColorType = LabelColorType.SPECIFIED_COLOR, backgroundColor: Color = Color.White, activeSliceAlpha: Float = 0.8f, inActiveSliceAlpha: Float = 1.0f, isEllipsizeEnabled: Boolean = false, sliceMinTextWidthToEllipsize: Dp = 80.dp, sliceLabelEllipsizeAt: TextUtils.TruncateAt = TextUtils.TruncateAt.END, chartPadding: Int = DEFAULT_PADDING, accessibilityConfig: AccessibilityConfig = AccessibilityConfig( chartDescription = PieChartConstants.DESCRIPTION ), isSumVisible: Boolean = false, sumUnit: String = "", isClickOnSliceEnabled: Boolean = true)

Parameters

startAngle

: Starting angle

showSliceLabels

: Control the labels visibility

sliceLabelTextSize

: Text size of the labels

sliceLabelTextColor

: Text color of the labels

sliceLabelTypeface

: Typeface of the labels

isAnimationEnable

: Boolean Flag for enabling animation

animationDuration

: Duration of animation

strokeWidth

: Stroke width of Donut Chart

labelFontSize

: Label text font size

labelTypeface

: Label text typeface

labelVisible

: Label text visibility

labelType

: Type of label (percentage or value of slice), value available only for Donut Chart

labelColor

: Label text color

labelColorType

: Label text color according to the specified in color in labelColor or the slice color, only for Donut Chart

activeSliceAlpha

: Opacity of the active slice

inActiveSliceAlpha

: Opacity of the inactive slice

isEllipsizeEnabled

: Boolean flag for enabling ellipsize

sliceMinTextWidthToEllipsize

: Minimum width of the label post which label will be ellipsized

sliceLabelEllipsizeAt

: Position at which the label will be truncated or ellipsized

chartPadding

: Padding for the Pie chart/Donut Chart

accessibilityConfig

: Configs related to accessibility service defined here in AccessibilityConfig

isSumVisible

: When no slice is selected show the sum of values, only used for Donut Chart

isClickOnSliceEnabled

: Enable/Disable the click on slice

sumUnit

: The unit of the sum of values, only used for Donut Chart