29 lines
706 B
TypeScript
29 lines
706 B
TypeScript
import { ResponseData } from "./parser";
|
|
|
|
export function getSampleData(): ResponseData[] {
|
|
const questions = [
|
|
"Service Quality",
|
|
"Value for Money",
|
|
"Ease of Use",
|
|
"Recommendation",
|
|
"Overall Satisfaction",
|
|
"Customer Support",
|
|
"Product Features",
|
|
];
|
|
const sampleData: ResponseData[] = [];
|
|
let id = 1;
|
|
questions.forEach((question) => {
|
|
const numResponses = Math.floor(Math.random() * 50) + 30;
|
|
for (let i = 0; i < numResponses; i++) {
|
|
const response = Math.floor(Math.random() * 5);
|
|
sampleData.push({
|
|
timestamp: id++,
|
|
position: "",
|
|
question: question,
|
|
response: response,
|
|
});
|
|
}
|
|
});
|
|
return sampleData;
|
|
}
|