apache / apache/echarts

[Bug] Heatmap Axis "time" and "value" type behavior is different between development and production versions

Open
#21,492 3 comments 0 reactions 0 assignees View on GitHub
bug en pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version

6.0.0

### Link to Minimal Reproduction

https://codesandbox.io/p/sandbox/5swcrj

### Steps to Reproduce

1. Add Heatmap type series
2. Set `xAxis` / `yAxis` types either to `value` or `time`
3. Run it in development mode

### Current Behavior

In development mode it throws `Heatmap on cartesian must have two category axes` error. In production it does not. There is a check in the `https://github.com/apache/echarts/blob/master/src/chart/heatmap/HeatmapView.ts` file that causes this behavior.
```
if (__DEV__) {
if (!(xAxis.type === 'category' && yAxis.type === 'category')) {
throw new Error('Heatmap on cartesian must have two category axes');
}
if (!(xAxis.onBand && yAxis.onBand)) {
throw new Error('Heatmap on cartesian must have two axes with boundaryGap true');
}
}
```

### Expected Behavior

It should be the same behavior in both dev and prod modes.

### Environment

```markdown
- OS:
- Browser:
- Framework:
```

### Any additional comments?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.