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

Function transformData

web/pgadmin/dashboard/static/js/Graphs.jsx:25–39  ·  view source on GitHub ↗
(labels, refreshRate, theme='light')

Source from the content-addressed store, hash-verified

23
24/* Transform the labels data to suit ChartJS */
25export function transformData(labels, refreshRate, theme='light') {
26 let datasets = Object.keys(labels).map((label, i)=>{
27 return {
28 label: label,
29 data: labels[label] || [],
30 borderColor: getChartColor(i, theme),
31 pointHitRadius: DATA_POINT_SIZE,
32 };
33 }) || [];
34
35 return {
36 datasets: datasets,
37 refreshRate: refreshRate,
38 };
39}
40
41/* URL for fetching graphs data */
42export function getStatsUrl(sid=-1, did=-1, chart_names=[]) {

Callers 3

PGDReplicationFunction · 0.90
graphs_spec.jsFile · 0.90
GraphsFunction · 0.70

Calls 1

getChartColorFunction · 0.90

Tested by

no test coverage detected