Skip to content

LineDataSet circle color inherits alpha from other LineDataSet #2620

@patrick-elmquist

Description

@patrick-elmquist

I just stepped from 3.0.0-beta1 to 3.0.1 and am experiencing a problem with the circle color of the LineDataSet. Currently I have two LineDataSets, one with a solid colored line + circles and one with a dashed line with 54% black. My issue is that the alpha of the dashed line is applied to the circles, causing them to appear in a different color than the line, even tho the same color is used in the setters.

int styleColor = 0xFFFF00FF;
dataSet1.setColor(styleColor);
dataSet1.setCircleColor(styleColor);

int dashedColor = 0x8A000000;
dataSet2.setColor(dashedColor);
dataSet2.enableDashedLine(DASHED_LINE_LENGTH, DASHED_SPACE_LENGTH, DASHED_PHASE);

If I change the dashed color to a solid color instead, the problem goes away:

int dashedColor = 0xFF000000;

mpandroidchartbug

EDIT: I just checked and the issue is also present in v3.0.0 (non-beta)

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