Skip to content

PieChart: Setting a single slice to have a gradient color #3084

@slickorange

Description

@slickorange

I can set the gradient of the PieChart's slices by doing:

Shader shader = new RadialGradient(80, 80, 80, new int[]{ContextCompat.getColor(this, R.color.colorBronze), Color.parseColor("#FFFFFF")}, null, Shader.TileMode.MIRROR); chart.getRenderer().getPaintRender().setShader(shader);

The problem is that ALL slices then have this gradient.
Is it possible to set only one slice to have the gradient?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions