VChart icon indicating copy to clipboard operation
VChart copied to clipboard

[Bug] last x axis laebl position error

Open youngwinds opened this issue 3 months ago • 1 comments

Version

latest

Link to Minimal Reproduction

latest

Steps to Reproduce

Image

Current Behavior

none

Expected Behavior

none

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

youngwinds avatar Sep 01 '25 03:09 youngwinds

{
  "type": "bar",
  "direction": "vertical",
  "xField": [
    "__Dim_X__",
    "__Dim_Detail__"
  ],
  "yField": "__MeaValue__",
  "seriesField": "__Dim_ColorId__",
  "padding": 0,
  "region": [
    {
      "clip": true
    }
  ],
  "animation": true,
  "color": {
    "type": "ordinal",
    "domain": [
      "当前月UT率-current_ut",
      "上月UT率-previous_ut"
    ],
    "range": [
      "#8D72F6",
      "#5766EC",
      "#66A3FE",
      "#51D5E6",
      "#4EC0B3",
      "#F9DF90",
      "#F9AD71",
      "#ED8888",
      "#E9A0C3",
      "#D77DD3"
    ],
    "specified": {
      "当前月UT率-current_ut": "#4472C4",
      "上月UT率-previous_ut": "#A5A5A5"
    }
  },
  "background": "transparent",
  "data": {
    "id": "columnParallel",
    "values": [
      {
        "vc": "Overall",
        "__OriginalData__": {
          "current_ut": 71,
          "previous_ut": 74,
          "vc": "Overall"
        },
        "current_ut": 71,
        "__MeaId__": "current_ut",
        "__MeaName__": "当前月UT率",
        "__MeaValue__": 71,
        "__Dim_X__": "Overall",
        "__Dim_Color__": "当前月UT率",
        "__Dim_Detail__": "当前月UT率",
        "__Dim_ColorId__": "当前月UT率-current_ut"
      },
      {
        "vc": "Overall",
        "__OriginalData__": {
          "current_ut": 71,
          "previous_ut": 74,
          "vc": "Overall"
        },
        "previous_ut": 74,
        "__MeaId__": "previous_ut",
        "__MeaName__": "上月UT率",
        "__MeaValue__": 74,
        "__Dim_X__": "Overall",
        "__Dim_Color__": "上月UT率",
        "__Dim_Detail__": "上月UT率",
        "__Dim_ColorId__": "上月UT率-previous_ut"
      },
      {
        "vc": "Search",
        "__OriginalData__": {
          "current_ut": 79,
          "previous_ut": 76,
          "vc": "Search"
        },
        "current_ut": 79,
        "__MeaId__": "current_ut",
        "__MeaName__": "当前月UT率",
        "__MeaValue__": 79,
        "__Dim_X__": "Search",
        "__Dim_Color__": "当前月UT率",
        "__Dim_Detail__": "当前月UT率",
        "__Dim_ColorId__": "当前月UT率-current_ut"
      },
      {
        "vc": "Search",
        "__OriginalData__": {
          "current_ut": 79,
          "previous_ut": 76,
          "vc": "Search"
        },
        "previous_ut": 76,
        "__MeaId__": "previous_ut",
        "__MeaName__": "上月UT率",
        "__MeaValue__": 76,
        "__Dim_X__": "Search",
        "__Dim_Color__": "上月UT率",
        "__Dim_Detail__": "上月UT率",
        "__Dim_ColorId__": "上月UT率-previous_ut"
      },
      {
        "vc": "PGC",
        "__OriginalData__": {
          "current_ut": 77,
          "previous_ut": 74,
          "vc": "PGC"
        },
        "current_ut": 77,
        "__MeaId__": "current_ut",
        "__MeaName__": "当前月UT率",
        "__MeaValue__": 77,
        "__Dim_X__": "PGC",
        "__Dim_Color__": "当前月UT率",
        "__Dim_Detail__": "当前月UT率",
        "__Dim_ColorId__": "当前月UT率-current_ut"
      },
      {
        "vc": "PGC",
        "__OriginalData__": {
          "current_ut": 77,
          "previous_ut": 74,
          "vc": "PGC"
        },
        "previous_ut": 74,
        "__MeaId__": "previous_ut",
        "__MeaName__": "上月UT率",
        "__MeaValue__": 74,
        "__Dim_X__": "PGC",
        "__Dim_Color__": "上月UT率",
        "__Dim_Detail__": "上月UT率",
        "__Dim_ColorId__": "上月UT率-previous_ut"
      },
      {
        "vc": "Product_Infrastructure",
        "__OriginalData__": {
          "current_ut": 72,
          "previous_ut": 76,
          "vc": "Product_Infrastructure"
        },
        "current_ut": 72,
        "__MeaId__": "current_ut",
        "__MeaName__": "当前月UT率",
        "__MeaValue__": 72,
        "__Dim_X__": "Product_Infrastructure",
        "__Dim_Color__": "当前月UT率",
        "__Dim_Detail__": "当前月UT率",
        "__Dim_ColorId__": "当前月UT率-current_ut"
      },
      {
        "vc": "Product_Infrastructure",
        "__OriginalData__": {
          "current_ut": 72,
          "previous_ut": 76,
          "vc": "Product_Infrastructure"
        },
        "previous_ut": 76,
        "__MeaId__": "previous_ut",
        "__MeaName__": "上月UT率",
        "__MeaValue__": 76,
        "__Dim_X__": "Product_Infrastructure",
        "__Dim_Color__": "上月UT率",
        "__Dim_Detail__": "上月UT率",
        "__Dim_ColorId__": "上月UT率-previous_ut"
      },
      {
        "vc": "Social",
        "__OriginalData__": {
          "current_ut": 71,
          "previous_ut": 77,
          "vc": "Social"
        },
        "current_ut": 71,
        "__MeaId__": "current_ut",
        "__MeaName__": "当前月UT率",
        "__MeaValue__": 71,
        "__Dim_X__": "Social",
        "__Dim_Color__": "当前月UT率",
        "__Dim_Detail__": "当前月UT率",
        "__Dim_ColorId__": "当前月UT率-current_ut"
      },
      {
        "vc": "Social",
        "__OriginalData__": {
          "current_ut": 71,
          "previous_ut": 77,
          "vc": "Social"
        },
        "previous_ut": 77,
        "__MeaId__": "previous_ut",
        "__MeaName__": "上月UT率",
        "__MeaValue__": 77,
        "__Dim_X__": "Social",
        "__Dim_Color__": "上月UT率",
        "__Dim_Detail__": "上月UT率",
        "__Dim_ColorId__": "上月UT率-previous_ut"
      },
      {
        "vc": "Growth",
        "__OriginalData__": {
          "current_ut": 67,
          "previous_ut": 74,
          "vc": "Growth"
        },
        "current_ut": 67,
        "__MeaId__": "current_ut",
        "__MeaName__": "当前月UT率",
        "__MeaValue__": 67,
        "__Dim_X__": "Growth",
        "__Dim_Color__": "当前月UT率",
        "__Dim_Detail__": "当前月UT率",
        "__Dim_ColorId__": "当前月UT率-current_ut"
      },
      {
        "vc": "Growth",
        "__OriginalData__": {
          "current_ut": 67,
          "previous_ut": 74,
          "vc": "Growth"
        },
        "previous_ut": 74,
        "__MeaId__": "previous_ut",
        "__MeaName__": "上月UT率",
        "__MeaValue__": 74,
        "__Dim_X__": "Growth",
        "__Dim_Color__": "上月UT率",
        "__Dim_Detail__": "上月UT率",
        "__Dim_ColorId__": "上月UT率-previous_ut"
      },
      {
        "vc": "引擎工具",
        "__OriginalData__": {
          "current_ut": 64,
          "previous_ut": 73,
          "vc": "引擎工具"
        },
        "current_ut": 64,
        "__MeaId__": "current_ut",
        "__MeaName__": "当前月UT率",
        "__MeaValue__": 64,
        "__Dim_X__": "引擎工具",
        "__Dim_Color__": "当前月UT率",
        "__Dim_Detail__": "当前月UT率",
        "__Dim_ColorId__": "当前月UT率-current_ut"
      },
      {
        "vc": "引擎工具",
        "__OriginalData__": {
          "current_ut": 64,
          "previous_ut": 73,
          "vc": "引擎工具"
        },
        "previous_ut": 73,
        "__MeaId__": "previous_ut",
        "__MeaName__": "上月UT率",
        "__MeaValue__": 73,
        "__Dim_X__": "引擎工具",
        "__Dim_Color__": "上月UT率",
        "__Dim_Detail__": "上月UT率",
        "__Dim_ColorId__": "上月UT率-previous_ut"
      },
      {
        "vc": "Open_Platform",
        "__OriginalData__": {
          "current_ut": 64,
          "previous_ut": 77,
          "vc": "Open_Platform"
        },
        "current_ut": 64,
        "__MeaId__": "current_ut",
        "__MeaName__": "当前月UT率",
        "__MeaValue__": 64,
        "__Dim_X__": "Open_Platform",
        "__Dim_Color__": "当前月UT率",
        "__Dim_Detail__": "当前月UT率",
        "__Dim_ColorId__": "当前月UT率-current_ut"
      },
      {
        "vc": "Open_Platform",
        "__OriginalData__": {
          "current_ut": 64,
          "previous_ut": 77,
          "vc": "Open_Platform"
        },
        "previous_ut": 77,
        "__MeaId__": "previous_ut",
        "__MeaName__": "上月UT率",
        "__MeaValue__": 77,
        "__Dim_X__": "Open_Platform",
        "__Dim_Color__": "上月UT率",
        "__Dim_Detail__": "上月UT率",
        "__Dim_ColorId__": "上月UT率-previous_ut"
      },
      {
        "vc": "Intelligent_Creation",
        "__OriginalData__": {
          "current_ut": 58,
          "previous_ut": 62,
          "vc": "Intelligent_Creation"
        },
        "current_ut": 58,
        "__MeaId__": "current_ut",
        "__MeaName__": "当前月UT率",
        "__MeaValue__": 58,
        "__Dim_X__": "Intelligent_Creation",
        "__Dim_Color__": "当前月UT率",
        "__Dim_Detail__": "当前月UT率",
        "__Dim_ColorId__": "当前月UT率-current_ut"
      },
      {
        "vc": "Intelligent_Creation",
        "__OriginalData__": {
          "current_ut": 58,
          "previous_ut": 62,
          "vc": "Intelligent_Creation"
        },
        "previous_ut": 62,
        "__MeaId__": "previous_ut",
        "__MeaName__": "上月UT率",
        "__MeaValue__": 62,
        "__Dim_X__": "Intelligent_Creation",
        "__Dim_Color__": "上月UT率",
        "__Dim_Detail__": "上月UT率",
        "__Dim_ColorId__": "上月UT率-previous_ut"
      }
    ],
    "fields": {
      "__Dim_Angle__": {
        "sortIndex": 0
      },
      "__Dim_X__": {
        "sortIndex": 0
      },
      "__Dim_ColorId__": {
        "sortIndex": 0
      }
    }
  },
  "axes": [
    {
      "visible": true,
      "type": "band",
      "orient": "bottom",
      "maxHeight": 160,
      "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": true,
        "autoRotateAngle": [
          0,
          -45,
          -90
        ],
        "lastVisible": true
      },
      "title": {
        "visible": false,
        "text": "VC名称",
        "style": {
          "fill": "#646A73",
          "fontSize": 12,
          "fontWeight": 400
        }
      },
      "tick": {
        "visible": true,
        "tickSize": 4,
        "inside": false,
        "style": {
          "stroke": "rgba(54, 65, 89, 0.30)"
        }
      },
      "grid": {
        "visible": false,
        "style": {
          "lineWidth": 0.5,
          "stroke": "rgba(54, 65, 89, 0.15)"
        }
      },
      "domainLine": {
        "visible": true,
        "style": {
          "lineWidth": 1,
          "stroke": "rgba(54, 65, 89, 0.30)"
        }
      },
      "paddingInner": [
        0.15,
        0.1
      ],
      "paddingOuter": [
        0.075,
        0.1
      ]
    },
    {
      "visible": true,
      "type": "linear",
      "base": 10,
      "orient": "left",
      "nice": false,
      "zero": true,
      "inverse": false,
      "max": 100,
      "min": 0,
      "label": {
        "visible": true,
        "style": {
          "fill": "#797B85",
          "angle": 0,
          "fontSize": 12,
          "fontWeight": 400
        }
      },
      "title": {
        "visible": false,
        "text": "当前月UT率 & 上月UT率",
        "style": {
          "fill": "#646A73",
          "fontSize": 12,
          "fontWeight": 400
        }
      },
      "tick": {
        "visible": true,
        "tickSize": 4,
        "inside": false,
        "style": {
          "stroke": "rgba(54, 65, 89, 0.30)"
        }
      },
      "grid": {
        "visible": false,
        "style": {
          "lineWidth": 0.5,
          "stroke": "rgba(54, 65, 89, 0.15)"
        }
      },
      "domainLine": {
        "visible": true,
        "style": {
          "lineWidth": 1,
          "stroke": "rgba(54, 65, 89, 0.30)"
        }
      },
      "innerOffset": {
        "top": 7
      }
    }
  ],
  "label": {
    "visible": true,
    "style": {},
    "smartInvert": false,
    "overlap": {
      "hideOnHit": true,
      "clampForce": true
    }
  },
  "tooltip": {
    "visible": true,
    "mark": {
      "title": {
        "visible": false
      },
      "content": [
        {
          "visible": true,
          "hasShape": true,
          "shapeType": "rectRound"
        },
        {
          "visible": true,
          "hasShape": true,
          "shapeType": "rectRound"
        }
      ]
    },
    "dimension": {
      "title": {
        "visible": true
      },
      "content": [
        {
          "visible": true,
          "shapeType": "rectRound",
          "hasShape": true
        }
      ]
    }
  },
  "legends": {
    "type": "discrete",
    "visible": true,
    "maxCol": 1,
    "maxRow": 1,
    "autoPage": true,
    "orient": "right",
    "position": "start",
    "item": {
      "focus": true,
      "maxWidth": "30%",
      "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
          }
        }
      }
    },
    "padding": 0
  },
  "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": {
    "style": {
      "lineWidth": 1
    },
    "state": {
      "hover": {
        "fillOpacity": 0.6
      }
    }
  },
  "markArea": [
    {
      "zIndex": 1000,
      "regionRelative": true,
      "label": {
        "position": "insideBottom",
        "visible": true,
        "text": "数据来源:风神平台",
        "style": {
          "dy": 12,
          "textAlign": "center",
          "textBaseline": "top",
          "stroke": "#191d24",
          "lineWidth": 1,
          "fill": "#666666",
          "fontSize": 12,
          "fontWeight": 400
        },
        "labelBackground": {
          "visible": true,
          "padding": 4,
          "style": {
            "dy": 12,
            "cornerRadius": 4,
            "fill": "#191d24",
            "stroke": "#191d24",
            "lineWidth": 1
          }
        }
      },
      "area": {
        "style": {
          "visible": true,
          "fill": "#888888",
          "fillOpacity": 0.15,
          "stroke": "#888888",
          "lineWidth": 1,
          "cornerRadius": 4
        }
      }
    }
  ]
}

youngwinds avatar Sep 17 '25 03:09 youngwinds