VisActor/VChart

[Bug] the position of cursor and the position of datazoom should keep align

Closed this issue · 0 comments

Version

1.13.0

Link to Minimal Reproduction

no need

Steps to Reproduce

      
{
    "type": "bar",
    "xField": [
        "241206151151015",
        "10001"
    ],
    "yField": [
        "10002"
    ],
    "direction": "vertical",
    "seriesField": "20001",
    "padding": 0,
    "labelLayout": "region",
    "data": [
        {
            "id": "data",
            "values": [
                {
                    "10001": "sale_price",
                    "10002": "14477.3382",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-01",
                    "241206151151018": "14477.3382"
                },
                {
                    "10001": "sale_price",
                    "10002": "13931.52",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-02",
                    "241206151151018": "13931.52"
                },
                {
                    "10001": "sale_price",
                    "10002": "15012.1782",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-03",
                    "241206151151018": "15012.1782"
                },
                {
                    "10001": "sale_price",
                    "10002": "7156.54",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-04",
                    "241206151151018": "7156.54"
                },
                {
                    "10001": "sale_price",
                    "10002": "15012.1782",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-05",
                    "241206151151018": "15012.1782"
                },
                {
                    "10001": "sale_price",
                    "10002": "14313.08",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-06",
                    "241206151151018": "14313.08"
                },
                {
                    "10001": "sale_price",
                    "10002": "7855.638199999999",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-07",
                    "241206151151018": "7855.638199999999"
                },
                {
                    "10001": "sale_price",
                    "10002": "7855.638199999999",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-08",
                    "241206151151018": "7855.638199999999"
                },
                {
                    "10001": "sale_price",
                    "10002": "20909.78",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-09",
                    "241206151151018": "20909.78"
                },
                {
                    "10001": "sale_price",
                    "10002": "10556.53",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-10",
                    "241206151151018": "10556.53"
                },
                {
                    "10001": "sale_price",
                    "10002": "14313.08",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-11",
                    "241206151151018": "14313.08"
                },
                {
                    "10001": "sale_price",
                    "10002": "14134.8",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-12",
                    "241206151151018": "14134.8"
                },
                {
                    "10001": "sale_price",
                    "10002": "7156.54",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-13",
                    "241206151151018": "7156.54"
                },
                {
                    "10001": "sale_price",
                    "10002": "25047.89",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-14",
                    "241206151151018": "25047.89"
                },
                {
                    "10001": "sale_price",
                    "10002": "11230.6282",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-15",
                    "241206151151018": "11230.6282"
                },
                {
                    "10001": "sale_price",
                    "10002": "14313.08",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-16",
                    "241206151151018": "14313.08"
                },
                {
                    "10001": "sale_price",
                    "10002": "14134.800000000001",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-17",
                    "241206151151018": "14134.800000000001"
                },
                {
                    "10001": "sale_price",
                    "10002": "6953.26",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-18",
                    "241206151151018": "6953.26"
                },
                {
                    "10001": "sale_price",
                    "10002": "25568.7082",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-19",
                    "241206151151018": "25568.7082"
                },
                {
                    "10001": "sale_price",
                    "10002": "11255.6282",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-20",
                    "241206151151018": "11255.6282"
                },
                {
                    "10001": "sale_price",
                    "10002": "14313.08",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-21",
                    "241206151151018": "14313.08"
                },
                {
                    "10001": "sale_price",
                    "10002": "38241.28999999999",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-22",
                    "241206151151018": "38241.28999999999"
                },
                {
                    "10001": "sale_price",
                    "10002": "15012.1782",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-23",
                    "241206151151018": "15012.1782"
                },
                {
                    "10001": "sale_price",
                    "10002": "10734.81",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-24",
                    "241206151151018": "10734.81"
                },
                {
                    "10001": "sale_price",
                    "10002": "11433.9082",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-25",
                    "241206151151018": "11433.9082"
                },
                {
                    "10001": "sale_price",
                    "10002": "17534.79",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-26",
                    "241206151151018": "17534.79"
                },
                {
                    "10001": "sale_price",
                    "10002": "28041.32",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-27",
                    "241206151151018": "28041.32"
                },
                {
                    "10001": "sale_price",
                    "10002": "19785.3646",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-28",
                    "241206151151018": "19785.3646"
                },
                {
                    "10001": "sale_price",
                    "10002": "17688.07",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-29",
                    "241206151151018": "17688.07"
                },
                {
                    "10001": "sale_price",
                    "10002": "14402.3382",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-30",
                    "241206151151018": "14402.3382"
                },
                {
                    "10001": "sale_price",
                    "10002": "15012.1782",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-07-31",
                    "241206151151018": "15012.1782"
                },
                {
                    "10001": "sale_price",
                    "10002": "17891.35",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-01",
                    "241206151151018": "17891.35"
                },
                {
                    "10001": "sale_price",
                    "10002": "10734.81",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-02",
                    "241206151151018": "10734.81"
                },
                {
                    "10001": "sale_price",
                    "10002": "11230.6282",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-03",
                    "241206151151018": "11230.6282"
                },
                {
                    "10001": "sale_price",
                    "10002": "17534.79",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-04",
                    "241206151151018": "17534.79"
                },
                {
                    "10001": "sale_price",
                    "10002": "15711.2764",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-05",
                    "241206151151018": "15711.2764"
                },
                {
                    "10001": "sale_price",
                    "10002": "25390.428199999995",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-06",
                    "241206151151018": "25390.428199999995"
                },
                {
                    "10001": "sale_price",
                    "10002": "14313.08",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-07",
                    "241206151151018": "14313.08"
                },
                {
                    "10001": "sale_price",
                    "10002": "11255.6282",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-08",
                    "241206151151018": "11255.6282"
                },
                {
                    "10001": "sale_price",
                    "10002": "13906.52",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-09",
                    "241206151151018": "13906.52"
                },
                {
                    "10001": "sale_price",
                    "10002": "21088.059999999998",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-10",
                    "241206151151018": "21088.059999999998"
                },
                {
                    "10001": "sale_price",
                    "10002": "17891.35",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-11",
                    "241206151151018": "17891.35"
                },
                {
                    "10001": "sale_price",
                    "10002": "21469.62",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-12",
                    "241206151151018": "21469.62"
                },
                {
                    "10001": "sale_price",
                    "10002": "11929.726400000001",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-13",
                    "241206151151018": "11929.726400000001"
                },
                {
                    "10001": "sale_price",
                    "10002": "14313.08",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-14",
                    "241206151151018": "14313.08"
                },
                {
                    "10001": "sale_price",
                    "10002": "21113.059999999998",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-15",
                    "241206151151018": "21113.059999999998"
                },
                {
                    "10001": "sale_price",
                    "10002": "3578.27",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-17",
                    "241206151151018": "3578.27"
                },
                {
                    "10001": "sale_price",
                    "10002": "21266.34",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-18",
                    "241206151151018": "21266.34"
                },
                {
                    "10001": "sale_price",
                    "10002": "17109.4728",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-19",
                    "241206151151018": "17109.4728"
                },
                {
                    "10001": "sale_price",
                    "10002": "21266.34",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-20",
                    "241206151151018": "21266.34"
                },
                {
                    "10001": "sale_price",
                    "10002": "28016.319999999996",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-21",
                    "241206151151018": "28016.319999999996"
                },
                {
                    "10001": "sale_price",
                    "10002": "17688.07",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-22",
                    "241206151151018": "17688.07"
                },
                {
                    "10001": "sale_price",
                    "10002": "10531.529999999999",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-23",
                    "241206151151018": "10531.529999999999"
                },
                {
                    "10001": "sale_price",
                    "10002": "28968.6982",
                    "10003": "241206151151018",
                    "20001": "sale_price",
                    "241206151151015": "2013-08-24",
                    "241206151151018": "28968.6982"
                }
            ],
            "fields": {
                "10001": {
                    "alias": "指标名称 "
                },
                "10002": {
                    "alias": "指标值 "
                },
                "20001": {
                    "alias": "图例项 ",
                    "domain": [
                        "sale_price"
                    ],
                    "sortIndex": 0,
                    "lockStatisticsByDomain": true
                },
                "241206151151015": {
                    "alias": "order_date",
                    "domain": [
                        "2013-07-01",
                        "2013-07-02",
                        "2013-07-03",
                        "2013-07-04",
                        "2013-07-05",
                        "2013-07-06",
                        "2013-07-07",
                        "2013-07-08",
                        "2013-07-09",
                        "2013-07-10",
                        "2013-07-11",
                        "2013-07-12",
                        "2013-07-13",
                        "2013-07-14",
                        "2013-07-15",
                        "2013-07-16",
                        "2013-07-17",
                        "2013-07-18",
                        "2013-07-19",
                        "2013-07-20",
                        "2013-07-21",
                        "2013-07-22",
                        "2013-07-23",
                        "2013-07-24",
                        "2013-07-25",
                        "2013-07-26",
                        "2013-07-27",
                        "2013-07-28",
                        "2013-07-29",
                        "2013-07-30",
                        "2013-07-31",
                        "2013-08-01",
                        "2013-08-02",
                        "2013-08-03",
                        "2013-08-04",
                        "2013-08-05",
                        "2013-08-06",
                        "2013-08-07",
                        "2013-08-08",
                        "2013-08-09",
                        "2013-08-10",
                        "2013-08-11",
                        "2013-08-12",
                        "2013-08-13",
                        "2013-08-14",
                        "2013-08-15",
                        "2013-08-17",
                        "2013-08-18",
                        "2013-08-19",
                        "2013-08-20",
                        "2013-08-21",
                        "2013-08-22",
                        "2013-08-23",
                        "2013-08-24"
                    ],
                    "sortIndex": 0,
                    "lockStatisticsByDomain": true
                },
                "241206151151018": {
                    "alias": "sale_price"
                }
            }
        }
    ],
    "stackInverse": true,
    "axes": [
        {
            "type": "band",
            "tick": {
                "visible": false
            },
            "grid": {
                "visible": false,
                "style": {
                    "zIndex": 150,
                    "stroke": "#DADCDD",
                    "lineWidth": 1,
                    "lineDash": [
                        4,
                        2
                    ]
                }
            },
            "orient": "bottom",
            "visible": true,
            "domainLine": {
                "visible": true,
                "style": {
                    "lineWidth": 1,
                    "stroke": "#989999"
                }
            },
            "title": {
                "visible": false,
                "space": 5,
                "text": "order_date",
                "style": {
                    "fontSize": 12,
                    "fill": "#363839",
                    "fontWeight": "normal"
                }
            },
            "maxHeight": null,
            "autoIndent": false,
            "sampling": false,
            "zIndex": 200,
            "label": {
                "visible": true,
                "space": 4,
                "style": {
                    "fontSize": 12,
                    "fill": "#6F6F6F",
                    "angle": 0,
                    "fontWeight": "normal",
                    "direction": "horizontal",
                    "maxLineWidth": 174
                },
                "autoHide": true,
                "autoHideMethod": "greedy",
                "flush": true,
                "lastVisible": true
            },
            "hover": true,
            "background": {
                "visible": true,
                "state": {
                    "hover": {
                        "fillOpacity": 0.08,
                        "fill": "#141414"
                    },
                    "hover_reverse": {
                        "fillOpacity": 0.08,
                        "fill": "#141414"
                    }
                }
            },
            "paddingInner": [
                0.15,
                0.1
            ],
            "paddingOuter": [
                0.075,
                0.1
            ]
        },
        {
            "type": "linear",
            "tick": {
                "visible": false,
                "style": {
                    "stroke": "rgba(255, 255, 255, 0)"
                }
            },
            "niceType": "accurateFirst",
            "zIndex": 200,
            "grid": {
                "visible": true,
                "style": {
                    "zIndex": 150,
                    "stroke": "#DADCDD",
                    "lineWidth": 1,
                    "lineDash": [
                        4,
                        2
                    ]
                }
            },
            "orient": "left",
            "visible": true,
            "domainLine": {
                "visible": true,
                "style": {
                    "lineWidth": 1,
                    "stroke": "rgba(255, 255, 255, 0)"
                }
            },
            "title": {
                "visible": false,
                "text": "sale_price",
                "space": 8,
                "style": {
                    "fontSize": 12,
                    "fill": "#363839",
                    "fontWeight": "normal"
                }
            },
            "autoIndent": false,
            "sampling": false,
            "label": {
                "visible": true,
                "space": 6,
                "flush": true,
                "padding": 0,
                "style": {
                    "fontSize": 12,
                    "maxLineWidth": 174,
                    "fill": "#6F6F6F",
                    "angle": 0,
                    "fontWeight": "normal",
                    "dy": 0,
                    "direction": "horizontal"
                },
                "autoHide": true,
                "autoHideMethod": "greedy"
            },
            "background": {
                "visible": true,
                "state": {
                    "hover": {
                        "fillOpacity": 0.08,
                        "fill": "#141414"
                    },
                    "hover_reverse": {
                        "fillOpacity": 0.08,
                        "fill": "#141414"
                    }
                }
            },
            "zero": true,
            "nice": true
        }
    ],
    "dataZoom": [
        {
            "filterMode": "filter",
            "showDetail": false,
            "orient": "bottom",
            "padding": {
                "top": 15
            },
            "height": 28,
            "backgroundColor": {
                "style": {}
            },
            "backgroundChart": {
                "area": {
                    "style": {}
                }
            },
            "selectedBackground": {
                "style": {}
            },
            "startText": {
                "visible": false,
                "style": {
                    "text": ""
                }
            },
            "endText": {
                "visible": false,
                "style": {
                    "text": ""
                }
            },
            "startHandler": {
                "style": {
                    "size": 22
                }
            },
            "endHandler": {
                "style": {
                    "size": 22
                }
            },
            "middleHandler": {
                "visible": false
            }
        },
        {
            "filterMode": "axis",
            "showDetail": false,
            "orient": "left",
            "padding": {
                "right": 15
            },
            "width": 28,
            "backgroundColor": {
                "style": {}
            },
            "backgroundChart": {
                "area": {
                    "style": {}
                }
            },
            "selectedBackground": {
                "style": {}
            },
            "startText": {
                "visible": false,
                "style": {
                    "text": ""
                }
            },
            "endText": {
                "visible": false,
                "style": {
                    "text": ""
                }
            },
            "startHandler": {
                "style": {
                    "size": 22
                }
            },
            "endHandler": {
                "style": {
                    "size": 22
                }
            },
            "middleHandler": {
                "visible": false
            }
        }
    ],
    "color": {
        "field": "20001",
        "type": "ordinal",
        "range": [
            "#2E62F1"
        ],
        "specified": {},
        "domain": [
            "sale_price"
        ]
    },
    "legends": [
        {
            "type": "discrete",
            "visible": true,
            "id": "legend-discrete",
            "orient": "right",
            "position": "start",
            "layoutType": "normal",
            "maxCol": 1,
            "title": {
                "textStyle": {
                    "fontSize": 12,
                    "fill": "#6F6F6F"
                }
            },
            "layoutLevel": 60,
            "item": {
                "focus": true,
                "focusIconStyle": {
                    "size": 14
                },
                "maxWidth": 392,
                "spaceRow": 0,
                "spaceCol": 0,
                "padding": {
                    "top": 1,
                    "bottom": 2,
                    "left": 3,
                    "right": 2
                },
                "background": {
                    "visible": false,
                    "style": {
                        "fillOpacity": 0.001
                    }
                },
                "label": {
                    "style": {
                        "fontSize": 12,
                        "fill": "#6F6F6F"
                    }
                },
                "shape": {
                    "style": {
                        "lineWidth": 0,
                        "symbolType": "square",
                        "size": 10,
                        "fillOpacity": 1
                    }
                }
            },
            "pager": {
                "type": "default",
                "layout": "horizontal",
                "padding": {
                    "left": -18
                },
                "textStyle": {},
                "space": 0,
                "handler": {
                    "preShape": "triangleLeft",
                    "nextShape": "triangleRight",
                    "style": {},
                    "state": {
                        "disable": {}
                    }
                }
            },
            "alignSelf": "end",
            "padding": {
                "top": 0,
                "bottom": 12,
                "left": 16,
                "right": 0
            }
        }
    ],
    "label": {
        "visible": false,
        "offset": 3,
        "overlap": {
            "hideOnHit": true,
            "avoidBaseMark": false,
            "strategy": [
                {
                    "type": "position",
                    "position": []
                }
            ],
            "clampForce": true
        },
        "style": {
            "fontSize": 12,
            "fontWeight": "normal",
            "zIndex": 400,
            "lineHeight": "100%",
            "boundsPadding": [
                1,
                0,
                0,
                0
            ],
            "fill": "#363839",
            "lineWidth": 2,
            "strokeOpacity": 1
        },
        "position": "inside",
        "smartInvert": {
            "fillStrategy": "invertBase",
            "strokeStrategy": "similarBase",
            "outsideEnable": true,
            "mode": "lightness"
        }
    },
    "tooltip": {
        "handler": {}
    },
    "hover": {
        "enable": true
    },
    "select": {
        "enable": true
    },
    "bar": {
        "state": {
            "hover": {
                "cursor": "pointer",
                "fillOpacity": 0.8,
                "stroke": "#58595B",
                "lineWidth": 1,
                "zIndex": 500
            },
            "selected": {
                "cursor": "pointer",
                "fillOpacity": 1,
                "stroke": "#58595B",
                "lineWidth": 1
            },
            "selected_reverse": {
                "fillOpacity": 0.3,
                "lineWidth": 0.3
            }
        },
        "style": {
            "cornerRadius": 0
        }
    },
    "region": [
        {
            "clip": true
        }
    ],
    "background": "rgba(255, 255, 255, 0)",
    "animation": false,
    "brush": {
        "inBrush": {
            "fillOpacity": 1,
            "stroke": "#58595B",
            "lineWidth": 1,
            "strokeOpacity": 1,
            "colorAlpha": 1
        },
        "outOfBrush": {
            "colorAlpha": 0.2,
            "fillOpacity": 0.3,
            "lineWidth": 0.3
        }
    },
    "crosshair": {
        "xField": {
            "visible": true,
            "line": {
                "type": "rect",
                "style": {
                    "fillOpacity": 0.2,
                    "fill": "#b2bacf"
                }
            }
        },
        "gridZIndex": 100
    },
    "hash": "66fecb0c7e541bc5656f79d4e8d9ab68"
}

Current Behavior

  1. 图表开启缩放 filter 模式后,缓慢拖拽手柄,位置错位,存在抖动。
  2. 鼠标滑动超出图表范围,缩略轴不跟手。

Expected Behavior

  1. 鼠标能够跟手

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response