VisActor/VChart

[Bug] radius轴label默认不显示,配置个空对象才行

Open

#3.371 aberto em 30 de out. de 2024

Ver no GitHub
 (3 comments) (0 reactions) (1 assignee)TypeScript (212 forks)user submission
buggood first issue

Métricas do repositório

Stars
 (1.800 stars)
Métricas de merge de PR
 (Mesclagem média 3d 12h) (15 fundiu PRs em 30d)

Description

Version

1.12.9

Link to Minimal Reproduction

1.12.9

Steps to Reproduce

const spec = {
  type: 'radar',
  data: [
    {
      id: 'radarData',
      values: [
        {
          key: 'Strength',
          value: 5
        },
        {
          key: 'Speed',
          value: 5
        },
        {
          key: 'Shooting',
          value: 3
        },
        {
          key: 'Endurance',
          value: 5
        },
        {
          key: 'Precision',
          value: 5
        },
        {
          key: 'Growth',
          value: 5
        }
      ]
    }
  ],
  categoryField: 'key',
  valueField: 'value',
  point: {
    visible: false // disable point
  },
  area: {
    visible: true, // display area
    state: {
      // The style in the hover state of the area
      hover: {
        fillOpacity: 0.5
      }
    }
  },
  line: {
    style: {
      lineWidth: 4
    }
  },
  axes: [
    {
      orient: 'radius', // radius axis
      // 不设置无法显示
      label: {},
    }
  ]
};

const theme = {
  component: {
    axisRadius: {
      label: {
          visible: true,
      },
      domainLine: {
        visible: true,
      }
    },
  }
}

VChart.ThemeManager.registerTheme("simple", theme);
VChart.ThemeManager.setCurrentTheme("simple");

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderSync();

// Just for the convenience of console debugging, DO NOT COPY!
window['vchart'] = vchart;

Current Behavior

label不显示

Expected Behavior

label显示

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Guia do colaborador