> ## Documentation Index
> Fetch the complete documentation index at: https://docs.narrative.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Histogram Options Without Histogram Enabled

> Histogram options were provided but the histogram stat is not in the resolved stat set

## Error message

```
{context}: histogram options provided but histogram stat is not enabled; enable the stat or remove the options
```

## When this error occurs

`stat_options.histogram` tunes the behavior of the `histogram` stat. If `histogram` is not present in the **resolved** stat set for that level, the options have nothing to apply to and the server rejects the configuration.

This can happen in three scenarios:

### Scenario 1: `enabled_stats` is present but does not include `histogram`

```json theme={null}
{
  "defaults": {
    "enabled_stats": ["value_count", "null_value_count"],
    "stat_options": {
      "histogram": { "max_bins": 200 }
    }
  },
  "refresh": { "trigger": "manual" }
}
```

The stat set is `[value_count, null_value_count]` — no `histogram`, so the options are invalid.

### Scenario 2: `stat_options`-only at a level where the parent has no `histogram`

```json theme={null}
{
  "defaults": {
    "enabled_stats": ["value_count", "mean"]
  },
  "refresh": { "trigger": "manual" },
  "dataset": {
    "scope": {
      "stat_options": {
        "histogram": { "max_bins": 200 }
      }
    }
  }
}
```

The scope inherits the stat set from defaults `[value_count, mean]` — no `histogram` to tune.

### Scenario 3: `stat_options`-only at scope when defaults has an empty stat set

```json theme={null}
{
  "defaults": {
    "enabled_stats": []
  },
  "refresh": { "trigger": "manual" },
  "dataset": {
    "scope": {
      "stat_options": {
        "histogram": { "max_bins": 200 }
      }
    }
  }
}
```

Defaults disable all stats (empty array). The scope inherits an empty set — no `histogram` to tune.

## How to fix

Either add `histogram` to `enabled_stats`, or remove the histogram options:

**Option A: Enable the stat**

```json theme={null}
{
  "defaults": {
    "enabled_stats": ["value_count", "null_value_count", "histogram"],
    "stat_options": {
      "histogram": { "max_bins": 200 }
    }
  },
  "refresh": { "trigger": "manual" }
}
```

**Option B: Remove the options**

```json theme={null}
{
  "defaults": {
    "enabled_stats": ["value_count", "null_value_count"]
  },
  "refresh": { "trigger": "manual" }
}
```

## Related errors

* [InvalidMaxBins](/reference/architecture/dataset-statistics/errors/invalid-max-bins) — max\_bins value out of range
