Skip to content

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

@Seymur

Description

@Seymur

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

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions