plotly/plotly.js · error

Attempted to group the bins of trace <traceOut.index> set wi

Error message

Attempted to group the bins of trace <traceOut.index> set with a <calendar> calendar with bins <(binOpts.calendar ? 'on a ' + binOpts.calendar + ' calendar' : 'w/o a set calendar')>

What it means

Error "Attempted to group the bins of trace <traceOut.index> set with a <calendar> calendar with bins <(binOpts.calendar ? 'on a ' + binOpts.calendar + ' calendar' : 'w/o a set calendar')>" thrown in plotly/plotly.js.

Source

Thrown at src/traces/histogram/cross_trace_defaults.js:73

        if(binOpts) {
            if(axType === binOpts.axType && calendar === binOpts.calendar) {
                needsNewItem = false;
                binOpts.traces.push(traceOut);
                binOpts.dirs.push(binDir);
            } else {
                groupName = fallbackGroupName;

                if(axType !== binOpts.axType) {
                    Lib.warn([
                        'Attempted to group the bins of trace', traceOut.index,
                        'set on a', 'type:' + axType, 'axis',
                        'with bins on', 'type:' + binOpts.axType, 'axis.'
                    ].join(' '));
                }
                if(calendar !== binOpts.calendar) {
                    // prohibit bingroup for traces using different calendar,
                    // there's probably a way to make this work, but skip for now
                    Lib.warn([
                        'Attempted to group the bins of trace', traceOut.index,
                        'set with a', calendar, 'calendar',
                        'with bins',
                        (binOpts.calendar ? 'on a ' + binOpts.calendar + ' calendar' : 'w/o a set calendar')
                    ].join(' '));
                }
            }
        }

        if(needsNewItem) {
            allBinOpts[groupName] = {
                traces: [traceOut],
                dirs: [binDir],
                axType: axType,
                calendar: traceOut[binDir + 'calendar'] || ''
            };
        }
        traceOut['_' + binDir + 'bingroup'] = groupName;

View on GitHub (pinned to 1d090e0b5f)

Solutions

  1. Give all traces in a bingroup the same xcalendar/ycalendar setting (e.g. all 'gregorian' or all 'chinese').
  2. Remove the calendar setting from one trace if the group has no calendar, or add it to all traces.
  3. Remove bingroup if the traces were not meant to share bins.
  4. Check that date-axis traces and their bin group use a consistent calendar.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/traces/histogram/cross_trace_defaults.js:73 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of plotly/plotly.js@1d090e0b5f (2026-09-02). Data as JSON: /api/errors/abeae9acd8bd38ca. Report an issue: GitHub.