Skip to content
This repository was archived by the owner on Jan 25, 2020. It is now read-only.
This repository was archived by the owner on Jan 25, 2020. It is now read-only.

Color should not be rendered randomly #1

@rosenfeld

Description

@rosenfeld

The current implementation allows duplicate colors in the series data, making it impossible to figure out what bar is related to which legend, for instance.

Additionally, it would be good if the colors were consistent among the charts, so the user could be more comfortable reading the graphs.

I would suggest replacing rand_color for something like:

 def initialize
    # ...
    @current_color = -1
 end
 def next_color
    @current_color = (@current_color + 1) % Graphic::COLORS.size
    COLORS[@current_color]
  end

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