plotly/plotly.js · info
Too many '${name}' warnings - additional warnings will be su
Error message
Too many '${name}' warnings - additional warnings will be suppressed. What it means
The templater counts how many times it has warned about missing variables per template name (`opts.count`) and caps it at `opts.max`. When the cap is reached it emits this suppression notice so repeated identical warnings do not flood the console; subsequent missing-variable warnings for that template are silenced.
Source
Thrown at src/lib/index.js:1151
value = lib.nestedProperty(obj, key).get(true);
}
if (value !== undefined) break;
}
}
if (value === undefined) {
const { count, max, name } = opts;
const fallbackValue = fallback === false ? match : fallback;
if (count < max) {
lib.warn(
[
`Variable '${key}' in ${name} could not be found!`,
'Please verify that the template is correct.',
`Using value: '${fallbackValue}'.`
].join(' ')
);
}
if (count === max) lib.warn(`Too many '${name}' warnings - additional warnings will be suppressed.`);
opts.count++;
return fallbackValue;
}
if (parsedOp === '*') value *= parsedNumber;
if (parsedOp === '/') value /= parsedNumber;
if (format) {
var fmt;
if (format[0] === ':') {
fmt = locale ? locale.numberFormat : lib.numberFormat;
if (value !== '') {
// e.g. skip missing data on heatmap
value = fmt(format.replace(TEMPLATE_STRING_FORMAT_SEPARATOR, ''))(value);
}
}
View on GitHub (pinned to 1d090e0b5f)
Solutions
- Fix the underlying missing variable (see error 21) so the warnings stop.
- Pass explicit `max`/`count` options to raise or lower the warning cap when debugging.
- Pre-validate your data so the templated variable is defined for every rendered item.
- Ignore the suppression notice itself; it is informational and points to the earlier warnings.
Example fix
// before
template('tick: ${v}', undefined); // per-tick, hundreds of warnings
// after
ticks.map(t => template('tick: ${v}', { v: t ?? 0 })); Defensive patterns
Strategy: validation
Validate before calling
// ensure every rendered item has the templated field defined
const safe = items.every(it => it && it.v !== undefined);
if (!safe) console.warn('some items lack the templated variable'); Type guard
function allHaveField(items, key) { return Array.isArray(items) && items.every(it => it != null && it[key] !== undefined); } Prevention
- Treat this suppression notice as a signal to fix the missing-variable warnings it caps.
- Pre-normalize data so templated fields are always defined.
- When debugging, render one item first instead of hundreds to see the raw warnings.
When it happens
Trigger: Rendering many strings (or one string many times, e.g. ticks/labels) through the same templater with missing variables, so the missing-variable warning for that `name` fires `max` times in a row.
Common situations: Axis tick templates like %{x} applied to hundreds of ticks where the referenced variable is undefined, batch relayout operations re-rendering templated text, or data arrays where a field is undefined on many points.
Related errors
AI-assisted analysis of plotly/plotly.js@1d090e0b5f (2026-09-02).
Data as JSON: /api/errors/c45dcdd972b43f05.
Report an issue: GitHub.