Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] axes label position is wrong after scrolling #2534

Closed
skie1997 opened this issue Apr 7, 2024 · 0 comments · Fixed by #2536
Closed

[Bug] axes label position is wrong after scrolling #2534

skie1997 opened this issue Apr 7, 2024 · 0 comments · Fixed by #2536
Assignees
Labels
bug Something isn't working

Comments

@skie1997
Copy link
Contributor

skie1997 commented Apr 7, 2024

Version

1.8.7

Link to Minimal Reproduction

null

Steps to Reproduce

const spec = {
  "type": "bar",
  "direction": "horizontal",
  "legends": [
    {
      "visible": true,
      "type": "discrete",
      "orient": "bottom"
    }
  ],
  "label": {
    "visible": false
  },
  "theme": {
    "colorScheme": {
      "default": [
        "#1664FF",
        "#3CC780",
        "#FF8A00",
        "#1AC6FF",
        "#7442D4",
        "#FFC400",
        "#B48DEB",
        "#009488",
        "#304D77",
        "#FF7DDA"
      ]
    }
  },
  "bar": {
    "style": {
      "fillOpacity": 1
    },
    "state": {
      "hover": {
        "stroke": "#898989",
        "lineWidth": 1
      }
    }
  },
  "padding": {
    "top": 0,
    "left": 0,
    "bottom": 0,
    "right": 0
  },
  "region": [
    {
      "clip": true
    }
  ],
  "barWidth": 10,
  "barGapInGroup": 10,
  "xField": "metrics",
  "yField": "dimension",
  "stack": true,
  "seriesField": "group",
  animation: false,
  "axes": [
    {
      "orient": "bottom",
      "title": "",
      "label": {
        "padding": 6
      }
    },
    {
      "orient": "left",
      "title": "",
      "bandSize": 95,
      "label": {
        "padding": 6
      }
    }
  ],
  "data": [
    {
      "id": "barData",
      "values": [
        {
          "dimension": "回合1",
          "metrics": 21,
          "originData": {
            "x": "回合1",
            "y": 21,
            "c": "绿水灵"
          },
          "group": "绿水灵"
        },
        {
          "dimension": "回合1",
          "metrics": 38,
          "originData": {
            "x": "回合1",
            "y": 38,
            "c": "飘飘猪"
          },
          "group": "飘飘猪"
        },
        {
          "dimension": "回合2",
          "metrics": 28,
          "originData": {
            "x": "回合2",
            "y": 28,
            "c": "绿水灵"
          },
          "group": "绿水灵"
        },
        {
          "dimension": "回合2",
          "metrics": 45,
          "originData": {
            "x": "回合2",
            "y": 45,
            "c": "飘飘猪"
          },
          "group": "飘飘猪"
        },
        {
          "dimension": "回合3",
          "metrics": 22,
          "originData": {
            "x": "回合3",
            "y": 22,
            "c": "绿水灵"
          },
          "group": "绿水灵"
        },
        {
          "dimension": "回合3",
          "metrics": 56,
          "originData": {
            "x": "回合3",
            "y": 56,
            "c": "飘飘猪"
          },
          "group": "飘飘猪"
        },
        {
          "dimension": "回合4",
          "metrics": 34,
          "originData": {
            "x": "回合4",
            "y": 34,
            "c": "绿水灵"
          },
          "group": "绿水灵"
        },
        {
          "dimension": "回合4",
          "metrics": 48,
          "originData": {
            "x": "回合4",
            "y": 48,
            "c": "飘飘猪"
          },
          "group": "飘飘猪"
        },
        {
          "dimension": "回合5",
          "metrics": 34,
          "originData": {
            "x": "回合5",
            "y": 34,
            "c": "绿水灵"
          },
          "group": "绿水灵"
        },
        {
          "dimension": "回合5",
          "metrics": 64,
          "originData": {
            "x": "回合5",
            "y": 64,
            "c": "飘飘猪"
          },
          "group": "飘飘猪"
        },
        {
          "dimension": "回合6",
          "metrics": 44,
          "originData": {
            "x": "回合6",
            "y": 44,
            "c": "绿水灵",
            "latest": true
          },
          "group": "绿水灵"
        },
        {
          "dimension": "回合6",
          "metrics": 72,
          "originData": {
            "x": "回合6",
            "y": 72,
            "c": "飘飘猪",
            "latest": true
          },
          "group": "飘飘猪"
        },
        {
          "dimension": "回合7",
          "metrics": 38,
          "originData": {
            "x": "回合7",
            "y": 38,
            "c": "绿水灵",
            "latest": true
          },
          "group": "绿水灵"
        },
        {
          "dimension": "回合7",
          "metrics": 65,
          "originData": {
            "x": "回合7",
            "y": 65,
            "c": "飘飘猪",
            "latest": true
          },
          "group": "飘飘猪"
        },
        {
          "dimension": "回合8",
          "metrics": 24,
          "originData": {
            "x": "回合8",
            "y": 24,
            "c": "绿水灵",
            "latest": true
          },
          "group": "绿水灵"
        },
        {
          "dimension": "回合8",
          "metrics": 70,
          "originData": {
            "x": "回合8",
            "y": 70,
            "c": "飘飘猪",
            "latest": true
          },
          "group": "飘飘猪"
        },
        {
          "dimension": "回合9",
          "metrics": 28,
          "originData": {
            "x": "回合9",
            "y": 28,
            "c": "绿水灵",
            "latest": true
          },
          "group": "绿水灵"
        },
        {
          "dimension": "回合9",
          "metrics": 62,
          "originData": {
            "x": "回合9",
            "y": 62,
            "c": "飘飘猪",
            "latest": true
          },
          "group": "飘飘猪"
        }
      ]
    }
  ],
  "scrollBar": [
    {
      "orient": "right",
      // start: 0,
      // end: 0.2,
      // filterMode: 'filter',
      "roam": true,
      // delayType: 'throttle',
      // delayTime: 500
      "auto": false
    }
  ]
};

Current Behavior

image

Expected Behavior

image

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

@skie1997 skie1997 added the bug Something isn't working label Apr 7, 2024
@skie1997 skie1997 self-assigned this Apr 7, 2024
@skie1997 skie1997 mentioned this issue Apr 7, 2024
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant