0% found this document useful (0 votes)
2 views

performance api structure

The document outlines three API structures for visualizing educational data through various chart types. The first structure presents pie charts for course completion and overall completion rates, the second structure details bar charts for badges earned and average grades, and the third structure features a line chart for platform access over time. Each structure includes dynamic data elements and customizable display options.

Uploaded by

abhishek.kumar
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

performance api structure

The document outlines three API structures for visualizing educational data through various chart types. The first structure presents pie charts for course completion and overall completion rates, the second structure details bar charts for badges earned and average grades, and the third structure features a line chart for platform access over time. Each structure includes dynamic data elements and customizable display options.

Uploaded by

abhishek.kumar
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

//1st 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,

},
],

},
]

//2nd api structure

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
}
}

},
]

//3rd api structure

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,
}
}

You might also like