Skip to content

Grid color issue with palette #3

@PhoenixFnX

Description

@PhoenixFnX

Hi,

Bug Description
If I do this :

        $palette->majorGridColor = '#000000FF';
        $palette->majorGridColor = '#000000aa';
        $graph->palette = $palette;

then my graph has a major grey grid on xAxis (vertical lines) and yAxis (horizontal lines).
image

But if I do this :

        $palette->majorGridColor = '#000000FF';
        $graph->palette = $palette;
        $palette->majorGridColor = '#000000aa';

then my graph only has a major grey grid on yAxis (horizontal lines) only.
image

Questions
To sumarize, is the palette still writable after setting it to the graph ?
If I want to apply a slight palette modification on a specific Axe, do I have to clone it ?

Usecase
Actually my objective was to get only the vertical grid. This is what I did :

            $palette2 = clone $graph->palette;
            $palette2->majorGridColor = '#000000aa';
            $graph->xAxis->setFromPalette($palette2);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions