VChart icon indicating copy to clipboard operation
VChart copied to clipboard

[Bug] animation error in 2.0.3

Open youngwinds opened this issue 4 months ago • 2 comments

Version

2.0.3

Link to Minimal Reproduction

https://visactor.github.io/VSeed/galley/dataConfig/dataset.html

Steps to Reproduce

click legend

Current Behavior

animation incorrect

Expected Behavior

https://visactor.github.io/VSeed/galley/dataConfig/dataset.html

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

youngwinds avatar Aug 15 '25 03:08 youngwinds

{
  "type": "bar",
  "direction": "vertical",
  "xField": [
    "date",
    "__DimGroup__"
  ],
  "yField": "__MeaValue__",
  "seriesField": "__DimGroupID__",
  "padding": 0,
  "region": [
    {
      "clip": true
    }
  ],
  "animation": true,
  "stackCornerRadius": [
    4,
    4,
    0,
    0
  ],
  "color": {
    "type": "ordinal",
    "domain": [
      "east-利润profit",
      "east-销售量sales",
      "north of east-利润profit",
      "north of east-销售量sales"
    ],
    "range": [
      "#8D72F6",
      "#5766EC",
      "#66A3FE",
      "#51D5E6",
      "#4EC0B3",
      "#F9DF90",
      "#F9AD71",
      "#ED8888",
      "#E9A0C3",
      "#D77DD3"
    ],
    "specified": {}
  },
  "background": "transparent",
  "data": {
    "values": [
      {
        "date": "2019",
        "region": "east",
        "__OriginalData__": {
          "date": "2019",
          "region": "east",
          "profit": 10,
          "sales": 20
        },
        "profit": 10,
        "__MeaId__": "profit",
        "__MeaName__": "利润",
        "__MeaValue__": 10,
        "__DimGroup__": "east-利润",
        "__DimGroupID__": "east-利润profit"
      },
      {
        "date": "2019",
        "region": "east",
        "__OriginalData__": {
          "date": "2019",
          "region": "east",
          "profit": 10,
          "sales": 20
        },
        "sales": 20,
        "__MeaId__": "sales",
        "__MeaName__": "销售量",
        "__MeaValue__": 20,
        "__DimGroup__": "east-销售量",
        "__DimGroupID__": "east-销售量sales"
      },
      {
        "date": "2020",
        "region": "east",
        "__OriginalData__": {
          "date": "2020",
          "region": "east",
          "profit": 30,
          "sales": 60
        },
        "profit": 30,
        "__MeaId__": "profit",
        "__MeaName__": "利润",
        "__MeaValue__": 30,
        "__DimGroup__": "east-利润",
        "__DimGroupID__": "east-利润profit"
      },
      {
        "date": "2020",
        "region": "east",
        "__OriginalData__": {
          "date": "2020",
          "region": "east",
          "profit": 30,
          "sales": 60
        },
        "sales": 60,
        "__MeaId__": "sales",
        "__MeaName__": "销售量",
        "__MeaValue__": 60,
        "__DimGroup__": "east-销售量",
        "__DimGroupID__": "east-销售量sales"
      },
      {
        "date": "2021",
        "region": "east",
        "__OriginalData__": {
          "date": "2021",
          "region": "east",
          "profit": 30,
          "sales": 60
        },
        "profit": 30,
        "__MeaId__": "profit",
        "__MeaName__": "利润",
        "__MeaValue__": 30,
        "__DimGroup__": "east-利润",
        "__DimGroupID__": "east-利润profit"
      },
      {
        "date": "2021",
        "region": "east",
        "__OriginalData__": {
          "date": "2021",
          "region": "east",
          "profit": 30,
          "sales": 60
        },
        "sales": 60,
        "__MeaId__": "sales",
        "__MeaName__": "销售量",
        "__MeaValue__": 60,
        "__DimGroup__": "east-销售量",
        "__DimGroupID__": "east-销售量sales"
      },
      {
        "date": "2022",
        "region": "east",
        "__OriginalData__": {
          "date": "2022",
          "region": "east",
          "profit": 50,
          "sales": 100
        },
        "profit": 50,
        "__MeaId__": "profit",
        "__MeaName__": "利润",
        "__MeaValue__": 50,
        "__DimGroup__": "east-利润",
        "__DimGroupID__": "east-利润profit"
      },
      {
        "date": "2022",
        "region": "east",
        "__OriginalData__": {
          "date": "2022",
          "region": "east",
          "profit": 50,
          "sales": 100
        },
        "sales": 100,
        "__MeaId__": "sales",
        "__MeaName__": "销售量",
        "__MeaValue__": 100,
        "__DimGroup__": "east-销售量",
        "__DimGroupID__": "east-销售量sales"
      },
      {
        "date": "2023",
        "region": "east",
        "__OriginalData__": {
          "date": "2023",
          "region": "east",
          "profit": 40,
          "sales": 80
        },
        "profit": 40,
        "__MeaId__": "profit",
        "__MeaName__": "利润",
        "__MeaValue__": 40,
        "__DimGroup__": "east-利润",
        "__DimGroupID__": "east-利润profit"
      },
      {
        "date": "2023",
        "region": "east",
        "__OriginalData__": {
          "date": "2023",
          "region": "east",
          "profit": 40,
          "sales": 80
        },
        "sales": 80,
        "__MeaId__": "sales",
        "__MeaName__": "销售量",
        "__MeaValue__": 80,
        "__DimGroup__": "east-销售量",
        "__DimGroupID__": "east-销售量sales"
      },
      {
        "date": "2019",
        "region": "north of east",
        "__OriginalData__": {
          "date": "2019",
          "region": "north of east",
          "profit": 10,
          "sales": 20
        },
        "profit": 10,
        "__MeaId__": "profit",
        "__MeaName__": "利润",
        "__MeaValue__": 10,
        "__DimGroup__": "north of east-利润",
        "__DimGroupID__": "north of east-利润profit"
      },
      {
        "date": "2019",
        "region": "north of east",
        "__OriginalData__": {
          "date": "2019",
          "region": "north of east",
          "profit": 10,
          "sales": 20
        },
        "sales": 20,
        "__MeaId__": "sales",
        "__MeaName__": "销售量",
        "__MeaValue__": 20,
        "__DimGroup__": "north of east-销售量",
        "__DimGroupID__": "north of east-销售量sales"
      },
      {
        "date": "2020",
        "region": "north of east",
        "__OriginalData__": {
          "date": "2020",
          "region": "north of east",
          "profit": 30,
          "sales": 60
        },
        "profit": 30,
        "__MeaId__": "profit",
        "__MeaName__": "利润",
        "__MeaValue__": 30,
        "__DimGroup__": "north of east-利润",
        "__DimGroupID__": "north of east-利润profit"
      },
      {
        "date": "2020",
        "region": "north of east",
        "__OriginalData__": {
          "date": "2020",
          "region": "north of east",
          "profit": 30,
          "sales": 60
        },
        "sales": 60,
        "__MeaId__": "sales",
        "__MeaName__": "销售量",
        "__MeaValue__": 60,
        "__DimGroup__": "north of east-销售量",
        "__DimGroupID__": "north of east-销售量sales"
      },
      {
        "date": "2021",
        "region": "north of east",
        "__OriginalData__": {
          "date": "2021",
          "region": "north of east",
          "profit": 30,
          "sales": 60
        },
        "profit": 30,
        "__MeaId__": "profit",
        "__MeaName__": "利润",
        "__MeaValue__": 30,
        "__DimGroup__": "north of east-利润",
        "__DimGroupID__": "north of east-利润profit"
      },
      {
        "date": "2021",
        "region": "north of east",
        "__OriginalData__": {
          "date": "2021",
          "region": "north of east",
          "profit": 30,
          "sales": 60
        },
        "sales": 60,
        "__MeaId__": "sales",
        "__MeaName__": "销售量",
        "__MeaValue__": 60,
        "__DimGroup__": "north of east-销售量",
        "__DimGroupID__": "north of east-销售量sales"
      },
      {
        "date": "2022",
        "region": "north of east",
        "__OriginalData__": {
          "date": "2022",
          "region": "north of east",
          "profit": 50,
          "sales": 100
        },
        "profit": 50,
        "__MeaId__": "profit",
        "__MeaName__": "利润",
        "__MeaValue__": 50,
        "__DimGroup__": "north of east-利润",
        "__DimGroupID__": "north of east-利润profit"
      },
      {
        "date": "2022",
        "region": "north of east",
        "__OriginalData__": {
          "date": "2022",
          "region": "north of east",
          "profit": 50,
          "sales": 100
        },
        "sales": 100,
        "__MeaId__": "sales",
        "__MeaName__": "销售量",
        "__MeaValue__": 100,
        "__DimGroup__": "north of east-销售量",
        "__DimGroupID__": "north of east-销售量sales"
      },
      {
        "date": "2023",
        "region": "north of east",
        "__OriginalData__": {
          "date": "2023",
          "region": "north of east",
          "profit": 40,
          "sales": 80
        },
        "profit": 40,
        "__MeaId__": "profit",
        "__MeaName__": "利润",
        "__MeaValue__": 40,
        "__DimGroup__": "north of east-利润",
        "__DimGroupID__": "north of east-利润profit"
      },
      {
        "date": "2023",
        "region": "north of east",
        "__OriginalData__": {
          "date": "2023",
          "region": "north of east",
          "profit": 40,
          "sales": 80
        },
        "sales": 80,
        "__MeaId__": "sales",
        "__MeaName__": "销售量",
        "__MeaValue__": 80,
        "__DimGroup__": "north of east-销售量",
        "__DimGroupID__": "north of east-销售量sales"
      }
    ]
  },
  "axes": [
    {
      "visible": true,
      "type": "band",
      "orient": "bottom",
      "maxHeight": 100,
      "sampling": false,
      "hover": true,
      "label": {
        "visible": true,
        "flush": true,
        "space": 8,
        "style": {
          "maxLineWidth": 100,
          "fill": "#797B85",
          "angle": 0,
          "fontSize": 12,
          "fontWeight": 400
        },
        "minGap": 4,
        "autoHide": true,
        "autoHideMethod": "greedy",
        "autoHideSeparation": 4,
        "autoLimit": true,
        "autoRotate": false,
        "autoRotateAngle": [
          0,
          -45,
          -90
        ],
        "lastVisible": true
      },
      "title": {
        "visible": false,
        "text": "",
        "style": {
          "fill": "#646A73",
          "fontSize": 12,
          "fontWeight": 400
        }
      },
      "tick": {
        "visible": false,
        "tickSize": 4,
        "inside": false,
        "style": {
          "stroke": "#3641594d"
        }
      },
      "grid": {
        "visible": false,
        "style": {
          "lineWidth": 0.5,
          "stroke": "#36415926"
        }
      },
      "domainLine": {
        "visible": true,
        "style": {
          "lineWidth": 1,
          "stroke": "#3641594d"
        }
      },
      "paddingInner": [
        0.15,
        0.1
      ],
      "paddingOuter": [
        0.075,
        0.1
      ]
    },
    {
      "visible": true,
      "type": "linear",
      "orient": "left",
      "nice": true,
      "zero": true,
      "inverse": false,
      "label": {
        "visible": true,
        "style": {
          "fill": "#797B85",
          "angle": 0,
          "fontSize": 12,
          "fontWeight": 400
        }
      },
      "title": {
        "visible": false,
        "text": "",
        "style": {
          "fill": "#646A73",
          "fontSize": 12,
          "fontWeight": 400
        }
      },
      "tick": {
        "visible": false,
        "tickSize": 4,
        "inside": false,
        "style": {
          "stroke": "#3641594d"
        }
      },
      "grid": {
        "visible": true,
        "style": {
          "lineWidth": 0.5,
          "stroke": "#36415926"
        }
      },
      "domainLine": {
        "visible": false,
        "style": {
          "lineWidth": 1,
          "stroke": "#3641594d"
        }
      },
      "innerOffset": {
        "top": 7
      }
    }
  ],
  "label": {
    "visible": true
  },
  "tooltip": {
    "visible": true,
    "mark": {
      "content": [
        {
          "visible": true
        }
      ]
    },
    "dimension": {
      "content": [
        {
          "visible": true
        }
      ]
    }
  },
  "legends": {
    "type": "discrete",
    "visible": true,
    "maxCol": 1,
    "maxRow": 1,
    "autoPage": true,
    "orient": "right",
    "position": "start",
    "item": {
      "focus": true,
      "focusIconStyle": {
        "size": 14,
        "fill": "#646A73",
        "fontWeight": 400
      },
      "shape": {
        "space": 6,
        "style": {
          "symbolType": "rectRound",
          "size": 8
        }
      },
      "label": {
        "style": {
          "fontSize": 12,
          "fill": "#646A73",
          "fontWeight": 400
        }
      },
      "background": {
        "state": {
          "selectedHover": {
            "fill": "#646A73",
            "fillOpacity": 0.05
          }
        }
      }
    }
  },
  "crosshair": {
    "xField": {
      "visible": true,
      "line": {
        "type": "rect",
        "style": {
          "lineWidth": 0,
          "opacity": 0.2,
          "fill": "#3641594d"
        }
      },
      "label": {
        "visible": true,
        "labelBackground": {
          "visible": true,
          "style": {
            "fill": "#364159"
          }
        },
        "style": {
          "fill": "#ffffff"
        }
      }
    }
  },
  "bar": {
    "state": {
      "hover": {
        "lineWidth": 4,
        "fillOpacity": 0.6
      }
    }
  }
}

youngwinds avatar Aug 15 '25 03:08 youngwinds

Image

youngwinds avatar Sep 24 '25 03:09 youngwinds