Skip to content

[Bug] part of axis label was invisible when setting angle: 45 #439

@youngwinds

Description

@youngwinds

Version

1.1.0

Link to Minimal Reproduction

none

Steps to Reproduce

const spec = {
  type: 'bar',
  data: [
    {
      id: 'barData',
      values: [
        { month: 'Monday', sales: 22 },
        { month: 'Tuesday', sales: 13 },
        { month: 'Wednesday', sales: 25 },
        { month: 'Thursday', sales: 29 },
        { month: 'Friday', sales: 38 }
      ]
    }
  ],
  axes: [
    {
      type: 'band',
      orient: 'bottom',
      label: {
        visible: true,
        style: {
          fill: 'red',
          angle: 45,
          fontSize: 50,
        }
      }
    }
  ],
  xField: 'month',
  yField: 'sales'
};

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

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

Current Behavior

image

Expected Behavior

auto fit position

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Metadata

Metadata

Assignees

Labels

bpbugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions