Question T6400
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

Bar chart for ratings

Multiple other items and comments when registering visualizer for rating question

created 4 years ago

Hi,

I have registered SelectBasePlotly visualizer for questions of rating type, this works as expected however one thing I have noticed is that the other comments and items are rendered twice for any questions that have the comments property enabled.

Is there a way I can make this only appear the once?

I have attached my JS and a screenshot of the issue for reference.

Thanks,

Greg

JavaScript
class RatingPlotly extends SurveyAnalytics.SelectBasePlotly { valuesSource() { return this.question.visibleRateValues; } } SurveyAnalytics.VisualizationManager.registerVisualizer("rating", RatingPlotly); SurveyAnalytics.localization.locales["en"]["visualizer_selectBase"] = "Plotly"; SurveyAnalytics.localization.locales["en"]["visualizer_number"] = "Average"; var survey = new Survey.Model(@Html.Raw(Model.CadetModule.Survey.SurveyJson)); var allQuestions = survey.getAllQuestions(); var summary = document.getElementById("summary"); summary.innerHTML = ""; var table = document.getElementById("table"); table.innerHTML = "" var data = @Html.Raw(Model.Results); console.log(data); var visPanel = new SurveyAnalytics.VisualizationPanel( allQuestions.filter(q => q.getType() !== "html"), data, ); //used to filter out html question types from table view var columns = allQuestions.filter(function(question) { return question.getType() !== "html"; }).map(function (question) { return { name: question.name, displayName: (question.title || "").trim() || question.name, dataType: question.getType() !== "file" ? 0 : 1, isVisible: true, isPublic: true, location: 0, // column }; }); var surveyAnalyticsTabulator = new SurveyAnalyticsTabulator.Tabulator(survey, data, undefined, columns); visPanel.showHeader = true; surveyAnalyticsTabulator.render(table) $("#graphLoadingIndicator").hide(); visPanel.render(summary); $("#tableLoadingIndicator").hide();

Answers approved by surveyjs Support

created 4 years ago

Hello,

It look like you already asked your question in this thread - https://surveyjs.answerdesk.io/ticket/details/t6390
We're working on it and update that thread as soon as we'll have any results.

Thanks, Serge
SurveyJS Team