Skip to content

Charts - palette extension modes #3211

@dxbykov

Description

@dxbykov

The Problem

A palette is a predefined set of colors that are used to draw series. When a chart contains many series, the number of colors in a palette is insufficient to draw each series in a different color.

The Solution

We have allowed extending the base palette color set by introducing the new paletteExtensionMode option for the Chart component. This option specifies an algorithm that calculates the extra colors for a chart and can be set to the alternate, extrapolate or blend values.

Alternate Mode

This was the previous default mode that is retained for backward compatibility. It replicates the original set of palette colors, alternating their brightness. The resulting palette includes lightened, darkened and standard colors. It has a limited set of colors (3x more than the original set).

chart-palette-alternate

Note: The default palette colors are shown on the right of the chart.

Extrapolate Mode

Replicates the original set of palette colors, changing their shade gradually from dark to light. Can have an unlimited set of colors.

chart-palette-extrapolate

Blend Mode

Creates a new color is by combining two neighboring palette colors. An unlimited number of colors can be created.

chart-palette-blend

Try It And Give Us Feedback

Live Sandbox

jQuery
Angular

Installation

Follow the installation guide from the release page and leave us feedback on this topic.

Feel free to leave comments or use GitHub reactions.

Metadata

Metadata

Assignees

No one assigned

    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