MCPcopy
hub / github.com/reactchartjs/react-chartjs-2 / setLabels

Function setLabels

src/utils.ts:35–44  ·  view source on GitHub ↗
(
  currentData: ChartData<TType, TData, TLabel>,
  nextLabels: TLabel[] | undefined
)

Source from the content-addressed store, hash-verified

33}
34
35export function setLabels<
36 TType extends ChartType = ChartType,
37 TData = DefaultDataPoint<TType>,
38 TLabel = unknown,
39>(
40 currentData: ChartData<TType, TData, TLabel>,
41 nextLabels: TLabel[] | undefined
42) {
43 currentData.labels = nextLabels;
44}
45
46export function setDatasets<
47 TType extends ChartType = ChartType,

Callers 2

cloneDataFunction · 0.85
ChartComponentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…