Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualize Rating scale with string values using the choice-based question visualizer (SelectBasePlotly) #458

Open
JaneSjs opened this issue Aug 14, 2024 · 1 comment
Assignees
Labels
enhancement user issue An issue or bug reported by users

Comments

@JaneSjs
Copy link
Contributor

JaneSjs commented Aug 14, 2024

T19387 - Dashboard not displaying rating-type question string values
https://surveyjs.answerdesk.io/internal/ticket/details/T19387


Usage scenario: A rating scale has a string/textual rate item values.

{
          "type": "rating",
          "name": "question2",
          "title": "String values",
          "autoGenerate": false,
          "rateCount": 3,
          "rateValues": [
            {
              "value": "val1",
              "text": "Value 1"
            },
            {
              "value": "val2",
              "text": "Value 2"
            },
            {
              "value": "vale",
              "text": "Value 3"
            }
          ]
}

Issue: When strings are used as rate item values, SurveyJS Dashboard cannot visualize textual rating scale values using the default Histogram visualizer.
View Demo
image

A histogram is designed for numerical data and represents the distribution of continuous or discrete numerical variables. Since histograms require dividing data into bins (ranges of numerical values), they aren't directly applicable to categorical data (such as strings), where there is no natural numerical ordering or range.

Suggestion: When a Rating scale uses string values, visualize a rating scale using the SelectBasePlotly visualizer, which is used for single- and multi-select questions (Checkboxes, Tagbox, Dropdown, Radiogroup).

@JaneSjs JaneSjs added enhancement user issue An issue or bug reported by users labels Aug 14, 2024
@tsv2013
Copy link
Member

tsv2013 commented Aug 19, 2024

At this moment visualizers are bound to question type:
e.g. rating -> gauge, rating -> histogram
and we don't chack whether this visualizer fit certain question: in this case rating question choice has string value instead of expected numeric type.

We need to implement another, more intelligent visualizers registration and creation flow, may be like a fit function for vizualizers. Most likely we'll implement it a bit later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement user issue An issue or bug reported by users
Projects
None yet
Development

No branches or pull requests

2 participants