Skip to main content

VictoryTheme

Allows you to create a consistent look across all of your chart elements, either by using one of the included themes or by creating your own. By default, Victory components use the grayscale theme.

Victory includes several prebuilt themes that can be used.

info

For more information about themes and styles, see the themes guide.

Types

This is roughly what the VictoryTheme object looks like, see the source code for the full definition.

note

The dependentAxis and independentAxis, polarDependentAxis, and polarIndependentAxis will be merged with any props and styles supplied in the axis namespace.

interface VictoryThemeDefinition {
palette: {...props};
area: {...props}
axis: {...props},
dependentAxis: {...props},
independentAxis: {...props},
polarDependentAxis: {...props},
polarIndependentAxis: {...props},
bar: {...props},
candlestick: {...props},
chart: {...props},
errorbar: {...props},
histogram: {...props},
group: {...props},
legend: {...props},
line: {...props},
pie: {...props},
scatter: {...props},
stack: {...props},
tooltip: {...props},
voronoi: {...props}
}

palette

The palette property defines a collection of colors that can be used across all chart elements. Each palette contains predefined color arrays that you can use directly or customize as needed.

Properties

PropertyTypeDescription
grayscalestring[]Shades of gray, ideal for minimalist or monochrome chart designs
qualitativestring[]Used for categorical data, containing distinct colors that are easy to differentiate visually
heatmapstring[]A gradient-based color scheme often used for heatmaps or data density visualizations
warmstring[]Warm colors like reds, oranges, and yellows
coolstring[]Cool colors such as blues, purples, and greens
redstring[]Various shades of red
bluestring[]Various shades of blue
greenstring[]Various shades of green

Example

Live View
Loading...
Live Editor

Like this project? You'll love working with us.

Contact us to learn more about our full range of services and offerings.

Learn More