colors

Configuration Structure

colors: any[]

colors

Colors for the chart's series. When all colors are used, it starts from the beginning. Accepts either a string of color hex codes or a function which receives the following parameters: value, seriesIndex, w (chart config).

colors: ['#2E93fA', '#66DA26', '#546E7A', '#E91E63', '#FF9800']

// or with a function
colors: [function({ value, seriesIndex, w }) {
  if (value < 55) {
    return '#7E36AF'
  } else if (value < 80) {
    return '#164666'
  } else {
    return '#D9534F'
  }
}]