Hello SurveyJS Team,
How To Hide All Html Q-type from Dashboard
Kind Regards,
Amro
Hello SurveyJS Team,
How To Hide All Html Q-type from Dashboard
Kind Regards,
Amro
Hi Amro,
SurveyJS Dashboard displays charts corresponding to each survey question. If you wish to hide certain questions from a dashboard, filter out these questions from a list of questions which you pass to a visualization panel. Consider this example:
JavaScriptlet questions = survey.getAllQuestions().filter((question) => question.getType() != "html");
const vizPanel = new VisualizationPanel(
questions,
surveyResults,
vizPanelOptions
);
Please let me know if you have further questions.
Updated
Hi Amro,
If you don't want to visualize questions of HTML and Expression types, filter out a list of survey questions using the following lambda function:
JavaScriptlet questions = survey.getAllQuestions().filter((question) => question.getType() != "expression" && question.getType() != "html");
Thanks
I changed it to && here :
JavaScriptlet questions = survey.getAllQuestions().filter((question) => question.getType() != "expression" && question.getType() != "html");
and it works.
Many thanks Jane.
Yes, correct. Thank you for the correction.
Please feel free to contact us if you have any questions or require further assistance.