MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / getChartColor

Function getChartColor

web/pgadmin/static/js/utils.js:597–601  ·  view source on GitHub ↗
(index, theme='light', colorPalette=CHART_THEME_COLORS)

Source from the content-addressed store, hash-verified

595};
596
597export function getChartColor(index, theme='light', colorPalette=CHART_THEME_COLORS) {
598 const palette = colorPalette[theme];
599 // loop back if out of index;
600 return palette[index % palette.length];
601}
602
603export function getRandomColor() {
604 return '#' + ((1 << 24) * Math.random() | 0).toString(16).padStart(6, '0');

Callers 3

getPieChartDataFunction · 0.90
getGraphDataSetFunction · 0.90
transformDataFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected