Question T13375
Visible to All Users
Duplicate

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

Input with specific type visualizer

Input with specific type visualizer in dashboar - email

created 2 years ago

Hello,

I am facing a problem when using specific input type e.g… e-mail, the same occurs with other types like week or phone numbers.

I found a similar issue here:
https://surveyjs.answerdesk.io/ticket/details/t7264

Ok, I have used
SurveyAnalytics.VisualizationManager.registerVisualizer - and now I can see the result in dashboard, but it is only printed in the word cloud mode and there is no option to change to text in table, I mean the combo box control is also misssing

How can I proceed in order of having this data as simple list?

See attached picture where I was checking for e-mail results.

Answers approved by surveyjs Support

created 2 years ago

Hello Cleber,
If you wish to visualize email addresses with a 'Texts in table' visualizer, please run the following code to register this type of a visualizer for the email question type:

JavaScript
// Register a Wordcloud visualizer for the `email` question type SurveyAnalytics.VisualizationManager.registerVisualizer("email", SurveyAnalytics.WordCloud); // Register a 'Texts in Table' visualizer for the `email` question type SurveyAnalytics.VisualizationManager.registerVisualizer("email", SurveyAnalytics.Text);

View Demo

Please let me know if you have any questions or require further assistance.

Thanks

    Show previous comments (1)

      Hello Cleber,
      For now, it is necessary to register a visualizer for required input types.

      Please let me clarify your task. Do you wish to preserve an option to define an input type for survey creators? I may discuss this issue with the team and suggest using the Single-Text Input visualizer types by default for all supported input types.

      I look forward to your reply.

        Hi Jane,

        Once again thanks for the fast support, I used the previous solution in our product. It worked as expected for almost all the types for example: e-mail, URL, week, time, color and so on.

        But it still did not work exactly how I would expect to fields like date and number, because this kind of fields are basically a number and the dashboard print it in a chart by default. Ok, I can change it to text in table, but can I change this sort order by default? I mean, in this case can I register another kind of visualizer for number data type? Or should I unregister from some type.

        And answer you question yes, I believe that having a Single-Text Input visualizer types by default for all supported input types would help, because it would avoid unexpected surprise when updating the NPM package and getting new features.

          Hello Cleber,
          Thank you for the update.

          I would like to clarify the situation regarding default visualizers for Text question answers. The SurveyJS Dashboard is designed to assist customers in analyzing survey data. However, when it comes to specific answers, such as textual responses, it becomes important to consider the most suitable option for visualizing such data. Unlike numeric values, textual data is unique in that it cannot be easily organized.

          One option is to use a word cloud or display text answers in a table. However, when dealing with specific input types like emails, it becomes unclear why displaying user emails in a word cloud or table would serve a purpose. As a result, Text question visualizers are not available by default for certain input types.

          Depending on your requirements, you should consider whether visualizing emails in a dashboard is necessary. If so, you can explore the best approach for visualizing this type of data.

          For example, you can register default Text visualizers such as Wordcloud or Text in tables. Alternatively, you can implement a different type of visualizer specifically designed for textual data. You can refer to the following demo for an example: Show text question answers as chart.

          Please note that the default Text in table visualizer does not support sorting. As a workaround, you can programmatically sort the answers before passing them to the visualizer. Alternatively, you can consider using a different type of visualization, such as displaying survey results in a table format: Display Results in a Table Form.

          I hope this clarifies the situation. Please let me know if you have any additional questions.