Skip to content

The ticks may be not readable #579

Closed
@ddZ6ii

Description

@ddZ6ii

I want to display a basic Radar chart with React. This works but I get a very annoying console warning.

Not sure whether this bug is related to echarts or echarts-for-react.

Would anyone have a workaround? (I do want to remove either min or max from my config options)

Versions

echarts 5.5.1
echarts-for-react 3.0.2
react 18.3.1

Steps to reproduce

import ReactECharts from "echarts-for-react";

const OPTION = {
  animation: false,
  legend: {
    show: false,
  },
  radar: {
    indicator: [
      { name: "A", min: 0, max: 1 },
      { name: "B", min: 0, max: 1 },
      { name: "C", min: 0, max: 1 },
    ],
    splitNumber: 3,
  },
  series: {
    data: [{ value: [0.8, 0.3, 0.5], name: "Dataset" }],
    type: "radar",
  },
  tooltip: {
    show: true,
  },
};

export default function Radar() {
  return (
    <div className="radar-container">
      <ReactECharts
        option={OPTION}
        style={{ width: "100%", height: "100%", maxHeight: "320px" }}
      />
    </div>
  );
}

Environment

  • OS: Windows 10
  • Browsers: Firefox v.128.4.0esr (64-bit), Chrome v.131.0.6778.86 (64-bit)

Current behavior

Console warning:

Warning

[ECharts] The ticks may be not readable when set min: 0, max: 1 and alignTicks: true

Expected behavior

No console warning

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions