performance api structure
performance api structure
pieChartData = [
{
name: 'Total Courses: 2', //dynamic
type: 'doughnut',
showData: false,
arcborder: 0,
labels: ['Not Started', 'Inprogress', 'Course Completed'],
//dynamic
datasets: [ //dynamic
{
label: 'New',
data: [0, 100, 0],
backgroundColor: ['rgb(187, 214, 255)', 'rgb(51, 68, 99)',
'rgb(77, 100, 141)'],
hoverBackgroundColor: ['rgb(187, 214, 255)', 'rgb(51, 68,
99)', 'rgb(77, 100, 141)'],
hoverBorderColor: ['rgb(187, 214, 255)', 'rgb(51, 68, 99)',
'rgb(77, 100, 141)'],
},
],
},
{
name: 'Overall Completion', //dynamic
type: 'pie',
showData: false,
labels: ['Completed', 'Not Completed'], //dynamic
datasets: [ //dynamic
{
label: 'Total value',
data: [29.8, 70.2], // Data for each segment (percentages)
backgroundColor: ['rgb(187, 214, 255)', 'rgb(77, 100,
141)'],
hoverBackgroundColor: ['rgb(187, 214, 255)', 'rgb(77, 100,
141)'],
hoverBorderColor: ['rgb(187, 214, 255)', 'rgb(77, 100,
141)'],
borderColor: ['#ffffff', '#ffffff'], // White border
between segments
borderWidth: 6,
},
],
},
]
datas = [
{
name: 'Badges', //dynamic
type: 'bar',
showData: false,
labels: ['Testing Course', 'Demo_Physiology', 'fedai', 'Learn
Frontend Developement', 'Testing Course', 'New Cousrse', 'H5p'], //dynamic
datasets: [ //dynamic
{
label: 'Total Badges',
data: [0, 78, 0, 23, 12, 5, 13],
backgroundColor: 'rgb(187, 214, 255)'
},
{
label: 'Earn Badges',
data: [0, 3, 0, 0, 67, 9, 43],
backgroundColor: 'rgb(77, 100, 141)'
}
],
customlegend: {
display: true,
usePointStyle: true
},
xAxes: {
display: true,
labelString: 'Courses', ////dynamic
ticks: {
}
},
yAxes: {
type: 'linear',
display: true,
labelString: 'No of Badges', //dynamic
ticks: {
min: 0,
stepSize: 20,
}
}
},
{
name: 'Average Grade of Course', //dynamic
type: 'bar',
showData: false,
labels: ['Testing Course', 'Learn Frontend Developement',
'Demo_Physiology', 'fedai'], //dynamic
datasets: [ //dynamic
{
label: ['Average Grade'],
data: [54, 140, 0, 90],
backgroundColor: 'rgb(77, 100, 141)',
// hoverBorderColor: 'red',
// hoverBorderWidth: 2
},
],
customlegend: {
display: false,
usePointStyle: true
},
xAxes: {
display: true,
labelString: 'Courses', //dynamic
ticks: {
}
},
yAxes: {
type: 'linear',
display: true,
labelString: 'Grade Percentage %', //dynamic
ticks: {
min: 0,
stepSize: 50, //dynamic
}
}
},
]
payload dateformat='day'/'month'/'week'
platformGraphData = {
name: 'Access Platform', //dynamic
type: 'line',
showData: false,
labels: ['5-01-2025', '6-01-2025', '7-01-2025', '8-01-2025', '9-01-
2025', '10-01-2025', '11-01-2025'], //dynamic
datasets: [
{
label: 'No of Times', //dynamic
dateformat: 'week'
data: [6, 6, 3, 0, 0, 0, 0], //dynamic
fill: false,
backgroundColor: 'rgb(77, 100, 141)',
borderColor: "rgb(75, 192, 192)",
hoverBorderColor: 'rgb(77, 100, 141)',
borderWidth: 1, // Line thickness
hoverBorderWidth: 2,
lineTension: 0, // Make the line straight (not curved)
pointBorderWidth: 1, // Point border width
pointRadius: 1, // Point size
},
],
customlegend: {
display: true,
usePointStyle: true
},
xAxes: {
display: true,
labelString: 'Day', //dynamic
ticks: {
}
},
yAxes: {
type: 'linear',
display: true,
labelString: 'No of Times', //dynamic
ticks: {
min: 0,
stepSize: 0.5,
}
}