JavaScriptSurveyAnalytics.MatrixPlotly.types = ['pie'];
SurveyAnalytics.SelectBasePlotly.types = ['pie'];
const survey = new Survey.Model(json);
setTimeout(() => {
const vizPanel = new SurveyAnalytics.VisualizationPanel(
survey.getAllQuestions(),
dataFromServer // Use the correct survey data obtained from the server
);
document.getElementById("loadingIndicator").style.display = "none";
vizPanel.render("surveyDashboardContainer");
}, 1000);
I an getting error index.js:74 Uncaught ReferenceError: SurveyAnalytics is not defined at index.js:74:1
Show previous comments
(0)
Comments
(0)
Sign in to comment on this post
Answers approved by surveyjs Support
Hello Muaath,
To resolve the error, you need to import the SurveyAnalytics module. Please add the following line of code to the imports section of your component:
JavaScriptimport * as SurveyAnalytics from "survey-analytics";
SurveyAnalytics.MatrixPlotly.types = ['pie'];
SurveyAnalytics.SelectBasePlotly.types = ['pie'];
...
}
Let me know if this code helps.
Show previous comments
(1)
MA
a year ago
Hi,
I have solve the above issue and how we can remove the alert banner in js file and where i get the license key
Thanks
Hello Muaath,
Thank you for the update. I'm happy to hear that you solved the issue.
Regarding the trial banner: as Andrew mentioned in your other thread, you need to follow instructions from the Remove Alert Banner page to remove the alert banner. There is a section specifically targeting the SurveyJS Dashboard. Please review this page. Let me know if you have additional questions.