question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Customize the Matrix?

See original GitHub issue

Image Reference:

image

Questions below:

  1. How to number the questions inside the matrix?
  2. How to change the color of the checked radio button (blue) to green?
  3. Is there a way to override the “inAllRowRequired” functionality? I want to open my own snackbar. I tried to implement it this way:

surveyValidateQuestion = (s, options) => { if (options.name === ‘Quality’) { const question = s.getQuestionByName(‘Quality’); if (!question.rows.every((row) => (options.value || {})[row.itemValue] !== undefined)) { options.error = ‘Answer all questions’; document.getElementById(‘sq_100_errors’).style.display = ‘none’; this.openSnackBar(‘error’, ‘All rows must be answered’); } } }

but the options.error would still show up

Are you requesting a feature, reporting a bug or asking a question?

What is the current behavior?

What is the expected behavior?

How would you reproduce the current behavior (if this is a bug)?

Provide the test code and the tested page URL (if applicable)

Tested page URL:

Test code

your_code_here

Specify your

  • browser:
  • browser version:
  • surveyjs platform (angular or react or jquery or knockout or vue): Angular
  • surveyjs version:

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dmitrykurmanovcommented, Sep 12, 2020
  1. As I know we don’t have such a functionality but it could be done via onAfterRender event:
survey.onAfterRenderQuestion.add((sender, options) => {
        if (options.question.getType() !== 'matrix') return
        options.htmlElement
            .querySelector('tbody')
            .querySelectorAll('td:first-child')
            .forEach((firstTdNode, index) => {
                firstTdNode.innerHTML = ++index + '.' + firstTdNode.innerHTML
            })
    });

here the example: https://plnkr.co/edit/zzit5Wtc28Xe9v9m

  1. Please check our “Appearance customization” examples : https://surveyjs.io/Examples/Library?id=custom-theme&platform=jQuery&theme=modern#content-result

  2. I didn’t fully understand you sorry. Could you please describe your scenario in greater details?

0reactions
chelsumz007commented, Sep 15, 2020

@dmitrykurmanov thank you so much man! works perfectly! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a matrix visual in Power BI - Microsoft Learn
You can create matrix visuals in Power BI reports and cross-highlight elements within the matrix with other visuals on that report page.
Read more >
Customize which columns display in the matrix - Resource Hero
This post explains how to customize which columns display in the matrix. ... Click Manage next to the RHA Matrix Fields custom setting....
Read more >
Customize matrix topology - algosec
Customize matrix topology · Locate the desired zone in the table's Zone column. · In the zone's row, in the Type column, select...
Read more >
Customizing Matrix Settings
Customizing Matrix Settings. Determine the type of setting to customize and select the appropriate customize topic. Matrix Symbol Settings.
Read more >
Creating a “custom” or “hybrid” matrix in PowerBI
Step 1: Creating the custom layout for the columns of the matrix. The key to this solution is to create a “custom” column...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found