Results & exports · Administrator
Minimum valid responses for stakeholder charts
Set a minimum valid-response count for each embedded stakeholder chart in your survey Style Sheet. The default is 0 (off); a positive whole number hides groups below that count for each item.
How the embedded chart threshold works
The updated Surveylet CSS template includes an optional JavaScript display rule for embedded stakeholder distribution charts. It checks the valid response count separately for each group and item. In a matrix, each row-and-column rating is assessed separately.
0 is the default and turns this extra filtering off. Set a positive whole number to hide a group's chart until its valid count is at least that number. For example, a threshold of 5 hides counts of 0–4 and permits counts of 5 or more.
The rule retains the original distribution charts and scale. It does not combine choices into three bands, change consensus calculations, or change saved answers.
Set the threshold: minimumValidResponses
- Open Survey Settings → Display Settings → Style Sheet.
- Find
SURVEYLET STAKEHOLDER CHART SETTINGS - EDIT HERE, near the top of the updated default template. - Change only the number after
minimumValidResponses:. Leave the comma in place. - Save, then refresh the participant survey page and test the embedded charts.
window.SurveyletStakeholderCharts = {
minimumValidResponses: 5,
emptyMessage: "Group charts will appear once a group has at least {minimum} valid responses for this item."
};Use a nonnegative whole number such as 0, 5, 10, or 20. Do not enter quotation marks around the number, a percentage sign, a negative number, or a fraction. Set it back to 0 and refresh to disable the rule. This is a template setting, not an additional control in the native question settings.
If the setting is absent from an existing survey, follow the installation instructions below. Adding the setting alone without the supporting script will not filter charts.
Threshold examples
| Setting | Effect |
|---|---|
minimumValidResponses: 0 | No additional stakeholder-chart filtering. Normal Surveylet feedback settings still apply. |
minimumValidResponses: 5 | Each group needs at least 5 valid responses for that item. |
minimumValidResponses: 10 | Each group needs at least 10 valid responses for that item. |
minimumValidResponses: 20 | Each group needs at least 20 valid responses for that item. |
With a threshold of 5 and three groups containing 4, 5, and 12 valid responses, the first chart is hidden and the other two are eligible to display. The count is for the whole group's rating distribution, not for each individual bar.
The same threshold applies to all supported embedded stakeholder charts in that survey. It does not set different thresholds for individual groups.
What counts as a valid response?
The rule uses the scored responses already supplied by Surveylet for that group and item. It sums the exact per-choice response counts and checks them against the chart's valid N. It does not estimate counts from rounded percentages, count comments, or use the total number of people assigned to a group.
Unanswered items and Surveylet's virtual I don't know option (including a custom label such as Unable to assess) do not contribute to this valid-response count. An ordinary scored choice named “Unable to assess” is different; use the virtual option when it should be excluded.
The reusable rule supports numeric rating distributions, including 1–5, 1–7, 1–9, and scales that start at zero, using the score range and counts supplied for each chart. It does not assume every survey uses five choices. If the count cannot be verified, the chart stays hidden while the rule is enabled.
Add the rule to an existing survey
Updating the default template does not automatically change a Style Sheet already saved in an existing survey.
- Keep a backup of the survey's current Style Sheet.
- Download the stakeholder chart threshold add-on and open it as plain text.
- If the survey does not already contain this feature, append the entire add-on to the end of its Style Sheet. Preserve the included
</style>,<script>,</script>, and<style>tags. - Set
minimumValidResponses, save, and refresh the participant page.
Add the feature only once. If a survey already has a custom stakeholder-chart filtering script, replace that feature block instead of running two filters together. Preserve unrelated CSS and scripts. See adding JavaScript in the Style Sheet for the embedding format.
How it works with other feedback settings
First enable Display Demographics Report, choose the demographic KPI, and select Embedded Charts in the applicable question or matrix-column settings.
The existing Minimum Responses to Display Analytics setting controls the overall availability of question feedback. This template rule adds a separate check within the embedded stakeholder charts. It does not override saved-answer requirements, feedback permissions, or the overall threshold.
For example, if the overall threshold is 20 and the stakeholder threshold is 5, the overall feedback must first become available; each embedded group chart then also needs at least 5 valid responses for that item. Neither setting changes an 80% or other consensus criterion.
Change the message when no groups qualify
If no group meets the threshold, a short message appears in the embedded chart area. You can edit or translate emptyMessage in the settings block. Keep {minimum} wherever the configured number should appear:
emptyMessage: "Charts appear after each group has at least {minimum} valid responses."The message is plain text, not HTML. Set emptyMessage: "" to omit it. The script does not automatically translate this message or switch it by participant language.
Display scope and refresh behavior
This rule applies to embedded numeric stakeholder charts on participant survey pages. It does not filter the Popup Link report, administrator analysis, downloads, or other separate result views.
It checks the chart data currently loaded on the page and rechecks when that data or chart markup updates. It does not fetch responses or add real-time streaming to an embedded chart. If Surveylet has not refreshed that chart's data, reload the participant page to obtain the latest counts.
This is a browser display rule. The underlying data is still delivered to the browser. It is not server-side suppression, an access restriction, or a guarantee of anonymity. A study requiring data to be withheld must use an appropriate server-side solution.
Test and troubleshoot
- With threshold 5, test groups with 4, 5, and 6 valid responses. Only the last two should appear.
- Test both matrix columns when participants answer one column but not the other.
- Test virtual I don't know responses and missing ratings.
- Test an item where no group qualifies and check the message.
- Set the value to 0, save, and refresh; the extra filtering should stop.
- Check desktop and mobile views, and refresh after adding or changing test responses.
If charts remain hidden, check the actual per-item group count, the overall feedback settings, the report style, and whether the complete add-on is present. An invalid threshold, such as -1, 2.5, or "5", leaves embedded charts hidden and writes a diagnostic warning to the browser console. Correct the value and refresh. If a customized chart uses a different data format, it may need an updated adapter.
Common questions
Does 0 hide every chart?
No. Zero turns this extra filtering off. Charts follow the existing Surveylet feedback settings.
Does a threshold of 5 include exactly five valid responses?
Yes. The rule uses at least the configured count: five qualifies when the setting is 5.
Is this the consensus threshold?
No. This is a valid-response count for displaying each group's chart. A consensus threshold is a separate measure, such as a percentage of ratings in the same band.
Will it hide small groups in exports or popup reports?
No. This add-on controls embedded charts on participant pages. It does not alter exports, separate popup reports, or access to the data.
