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

[Feature or Bug] 参考线随图例隐藏 #2127

Closed
youngwinds opened this issue Jan 24, 2024 · 1 comment
Closed

[Feature or Bug] 参考线随图例隐藏 #2127

youngwinds opened this issue Jan 24, 2024 · 1 comment
Assignees
Labels

Comments

@youngwinds
Copy link
Contributor

参考线无法随图例而隐藏

const spec = {
    "type": "common",
    "region": [
        {
            "clip": true
        }
    ],
    "series": [
        {
            "id": "mainSeries",
            "type": "line",
            "xField": "221104133321033",
            "yField": "10011",
            "zIndex": 200,
            "seriesField": "20001",
            "data": {
                "id": "mainSeriesData",
                "values": [
                    {
                        "10001": "TEST A",
                        "10003": "221104133321050",
                        "10011": "53467.857142857145",
                        "20001": "H -TEST A",
                        "221104133321033": "2023-W48(11/27~12/03)",
                        "221104133321050": "53467.857142857145",
                        "221104133321084": "H "
                    },
                    {
                        "10001": "TEST A",
                        "10003": "221104133321050",
                        "10011": "53384.71428571428",
                        "20001": "H -TEST A",
                        "221104133321033": "2023-W49(12/04~12/10)",
                        "221104133321050": "53384.71428571428",
                        "221104133321084": "H "
                    },
                    {
                        "10001": "TEST A",
                        "10003": "221104133321050",
                        "10011": "52454.71428571428",
                        "20001": "H -TEST A",
                        "221104133321033": "2023-W50(12/11~12/17)",
                        "221104133321050": "52454.71428571428",
                        "221104133321084": "H "
                    },
                    {
                        "10001": "TEST A",
                        "10003": "221104133321050",
                        "10011": "53084.28571428572",
                        "20001": "H -TEST A",
                        "221104133321033": "2023-W51(12/18~12/24)",
                        "221104133321050": "53084.28571428572",
                        "221104133321084": "H "
                    },
                    {
                        "10001": "TEST A",
                        "10003": "221104133321050",
                        "10011": "52784.57142857143",
                        "20001": "H -TEST A",
                        "221104133321033": "2023-W52(12/25~12/31)",
                        "221104133321050": "52784.57142857143",
                        "221104133321084": "H "
                    },
                    {
                        "10001": "TEST A",
                        "10003": "221104133321050",
                        "10011": "51517.857142857145",
                        "20001": "H -TEST A",
                        "221104133321033": "2000-W01(01/01~01/07)",
                        "221104133321050": "51517.857142857145",
                        "221104133321084": "H "
                    },
                    {
                        "10001": "TEST A",
                        "10003": "221104133321050",
                        "10011": "53428.142857142855",
                        "20001": "H -TEST A",
                        "221104133321033": "2000-W02(01/08~01/14)",
                        "221104133321050": "53428.142857142855",
                        "221104133321084": "H "
                    },
                    {
                        "10001": "TEST A",
                        "10003": "221104133321050",
                        "10011": "52583.857142857145",
                        "20001": "H -TEST A",
                        "221104133321033": "2000-W03(01/15~01/21)",
                        "221104133321050": "52583.857142857145",
                        "221104133321084": "H "
                    },
                    {
                        "10001": "TEST A",
                        "10003": "221104133321050",
                        "10011": "51472",
                        "20001": "H -TEST A",
                        "221104133321033": "2000-W04(01/22~01/28)",
                        "221104133321050": "51472",
                        "221104133321084": "H "
                    }
                ],
                "fields": {
                    "10001": {
                        "alias": "指标名称 "
                    },
                    "10011": {
                        "alias": "指标值(主轴) "
                    },
                    "10012": {
                        "alias": "指标值(次轴) "
                    },
                    "20001": {
                        "alias": "图例项 ",
                        "domain": [
                            "H -TEST A",
                            "H -TEST B(W)"
                        ],
                        "sortIndex": 0,
                        "lockStatisticsByDomain": true
                    },
                    "221104133321033": {
                        "alias": "业务日期",
                        "domain": [
                            "2023-W48(11/27~12/03)",
                            "2023-W49(12/04~12/10)",
                            "2023-W50(12/11~12/17)",
                            "2023-W51(12/18~12/24)",
                            "2023-W52(12/25~12/31)",
                            "2000-W01(01/01~01/07)",
                            "2000-W02(01/08~01/14)",
                            "2000-W03(01/15~01/21)",
                            "2000-W04(01/22~01/28)"
                        ],
                        "sortIndex": 0,
                        "lockStatisticsByDomain": true
                    },
                    "221104133321050": {
                        "alias": "TEST A"
                    },
                    "221104133321081": {
                        "alias": "TEST B(W)"
                    },
                    "221104133321084": {
                        "alias": "所属垂类团队"
                    }
                }
            },
            "stackInverse": true,
            "label": {
                "visible": false,
                "offset": 3,
                "overlap": {
                    "hideOnHit": true,
                    "avoidBaseMark": false,
                    "strategy": [
                        {
                            "type": "position",
                            "position": [
                                "top",
                                "bottom"
                            ]
                        }
                    ],
                    "clampForce": true
                },
                "style": {
                    "fontSize": 12,
                    "fontWeight": "normal",
                    "zIndex": 400,
                    "lineHeight": "100%",
                    "fill": "#363839",
                    "stroke": "rgba(255, 255, 255, 0.8)",
                    "lineWidth": 2,
                    "strokeOpacity": 1
                },
                "position": "top",
                "smartInvert": false
            },
            "line": {
                "style": {
                    "curveType": {
                        "type": "ordinal",
                        "field": "20001",
                        "range": [
                            "linear"
                        ],
                        "domain": [
                            "H -TEST A",
                            "H -TEST B(W)"
                        ]
                    },
                    "lineWidth": {
                        "type": "ordinal",
                        "field": "20001",
                        "range": [
                            5
                        ],
                        "domain": [
                            "H -TEST A",
                            "H -TEST B(W)"
                        ]
                    },
                    "lineDash": {
                        "type": "ordinal",
                        "field": "20001",
                        "range": [
                            [
                                0,
                                0
                            ]
                        ],
                        "domain": [
                            "H -TEST A",
                            "H -TEST B(W)"
                        ]
                    }
                }
            },
            "area": {
                "style": {
                    "fillOpacity": 0.35
                },
                "visible": true
            },
            "point": {
                "style": {
                    "shape": {
                        "type": "ordinal",
                        "field": "20001",
                        "range": [
                            "square"
                        ],
                        "domain": [
                            "H -TEST A",
                            "H -TEST B(W)"
                        ]
                    },
                    "size": {
                        "type": "ordinal",
                        "field": "20001",
                        "range": [
                            14.179630807244127
                        ],
                        "domain": [
                            "H -TEST A",
                            "H -TEST B(W)"
                        ]
                    },
                    "stroke": {
                        "field": "20001",
                        "type": "ordinal",
                        "range": [
                            "#2E62F1",
                            "#4DC36A"
                        ],
                        "specified": {
                            "H -TEST A": "#3772ff",
                            "undefined": "#5cb855",
                            "H -TEST B(W)": "#5cb855"
                        },
                        "domain": [
                            "H -TEST A",
                            "H -TEST B(W)"
                        ]
                    },
                    "strokeOpacity": {
                        "type": "ordinal",
                        "field": "20001",
                        "range": [
                            1
                        ],
                        "domain": [
                            "H -TEST A",
                            "H -TEST B(W)"
                        ]
                    },
                    "fillOpacity": {
                        "type": "ordinal",
                        "field": "20001",
                        "range": [
                            1
                        ],
                        "domain": [
                            "H -TEST A",
                            "H -TEST B(W)"
                        ]
                    }
                },
                "state": {
                    "hover": {
                        "lineWidth": 2,
                        "fillOpacity": 1,
                        "strokeOpacity": 1,
                        "scaleX": 1.5,
                        "scaleY": 1.5
                    }
                }
            },
            "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,
                        "strokeWidth": 0.3
                    }
                }
            },
            "invalidType": "break",
            "seriesMark": "line",
            "markOverlap": true,
            "region": [
                {
                    "clip": true
                }
            ],
            "background": "rgba(255, 255, 255, 0)",
            "animation": false
        },
        {
            "id": "subSeries",
            "type": "line",
            "xField": "221104133321033",
            "yField": "10012",
            "zIndex": 300,
            "seriesField": "20001",
            "data": {
                "id": "subSeriesData",
                "values": [
                    {
                        "10001": "TEST B(W)",
                        "10003": "221104133321081",
                        "10012": "7269.571482857143",
                        "20001": "H -TEST B(W)",
                        "221104133321033": "2023-W48(11/27~12/03)",
                        "221104133321081": "7269.571482857143",
                        "221104133321084": "H "
                    },
                    {
                        "10001": "TEST B(W)",
                        "10003": "221104133321081",
                        "10012": "10219.42426",
                        "20001": "H -TEST B(W)",
                        "221104133321033": "2023-W49(12/04~12/10)",
                        "221104133321081": "10219.42426",
                        "221104133321084": "H "
                    },
                    {
                        "10001": "TEST B(W)",
                        "10003": "221104133321081",
                        "10012": "10733.737468571428",
                        "20001": "H -TEST B(W)",
                        "221104133321033": "2023-W50(12/11~12/17)",
                        "221104133321081": "10733.737468571428",
                        "221104133321084": "H "
                    },
                    {
                        "10001": "TEST B(W)",
                        "10003": "221104133321081",
                        "10012": "7628.288995714285",
                        "20001": "H -TEST B(W)",
                        "221104133321033": "2023-W51(12/18~12/24)",
                        "221104133321081": "7628.288995714285",
                        "221104133321084": "H "
                    },
                    {
                        "10001": "TEST B(W)",
                        "10003": "221104133321081",
                        "10012": "7539.0848157142855",
                        "20001": "H -TEST B(W)",
                        "221104133321033": "2023-W52(12/25~12/31)",
                        "221104133321081": "7539.0848157142855",
                        "221104133321084": "H "
                    },
                    {
                        "10001": "TEST B(W)",
                        "10003": "221104133321081",
                        "10012": "6811.388998571428",
                        "20001": "H -TEST B(W)",
                        "221104133321033": "2000-W01(01/01~01/07)",
                        "221104133321081": "6811.388998571428",
                        "221104133321084": "H "
                    },
                    {
                        "10001": "TEST B(W)",
                        "10003": "221104133321081",
                        "10012": "6908.732348571428",
                        "20001": "H -TEST B(W)",
                        "221104133321033": "2000-W02(01/08~01/14)",
                        "221104133321081": "6908.732348571428",
                        "221104133321084": "H "
                    },
                    {
                        "10001": "TEST B(W)",
                        "10003": "221104133321081",
                        "10012": "6822.051985714285",
                        "20001": "H -TEST B(W)",
                        "221104133321033": "2000-W03(01/15~01/21)",
                        "221104133321081": "6822.051985714285",
                        "221104133321084": "H "
                    },
                    {
                        "10001": "TEST B(W)",
                        "10003": "221104133321081",
                        "10012": "7374.97233",
                        "20001": "H -TEST B(W)",
                        "221104133321033": "2000-W04(01/22~01/28)",
                        "221104133321081": "7374.97233",
                        "221104133321084": "H "
                    }
                ],
                "fields": {
                    "10001": {
                        "alias": "指标名称 "
                    },
                    "10011": {
                        "alias": "指标值(主轴) "
                    },
                    "10012": {
                        "alias": "指标值(次轴) "
                    },
                    "20001": {
                        "alias": "图例项 ",
                        "domain": [
                            "H -TEST A",
                            "H -TEST B(W)"
                        ],
                        "sortIndex": 0,
                        "lockStatisticsByDomain": true
                    },
                    "221104133321033": {
                        "alias": "业务日期",
                        "domain": [
                            "2023-W48(11/27~12/03)",
                            "2023-W49(12/04~12/10)",
                            "2023-W50(12/11~12/17)",
                            "2023-W51(12/18~12/24)",
                            "2023-W52(12/25~12/31)",
                            "2000-W01(01/01~01/07)",
                            "2000-W02(01/08~01/14)",
                            "2000-W03(01/15~01/21)",
                            "2000-W04(01/22~01/28)"
                        ],
                        "sortIndex": 0,
                        "lockStatisticsByDomain": true
                    },
                    "221104133321050": {
                        "alias": "TEST A"
                    },
                    "221104133321081": {
                        "alias": "TEST B(W)"
                    },
                    "221104133321084": {
                        "alias": "所属垂类团队"
                    }
                }
            },
            "stackInverse": true,
            "label": {
                "visible": false,
                "offset": 3,
                "overlap": {
                    "hideOnHit": true,
                    "avoidBaseMark": false,
                    "strategy": [
                        {
                            "type": "position",
                            "position": [
                                "top",
                                "bottom"
                            ]
                        }
                    ],
                    "clampForce": true
                },
                "style": {
                    "fontSize": 12,
                    "fontWeight": "normal",
                    "zIndex": 400,
                    "lineHeight": "100%",
                    "fill": "#363839",
                    "stroke": "rgba(255, 255, 255, 0.8)",
                    "lineWidth": 2,
                    "strokeOpacity": 1
                },
                "position": "top",
                "smartInvert": false
            },
            "line": {
                "style": {
                    "curveType": {
                        "type": "ordinal",
                        "field": "20001",
                        "range": [
                            "linear"
                        ],
                        "domain": [
                            "H -TEST A",
                            "H -TEST B(W)"
                        ]
                    },
                    "lineWidth": {
                        "type": "ordinal",
                        "field": "20001",
                        "range": [
                            5
                        ],
                        "domain": [
                            "H -TEST A",
                            "H -TEST B(W)"
                        ]
                    },
                    "lineDash": {
                        "type": "ordinal",
                        "field": "20001",
                        "range": [
                            [
                                0,
                                0
                            ]
                        ],
                        "domain": [
                            "H -TEST A",
                            "H -TEST B(W)"
                        ]
                    }
                }
            },
            "area": {
                "style": {
                    "fillOpacity": 0.35
                },
                "visible": true
            },
            "point": {
                "style": {
                    "shape": {
                        "type": "ordinal",
                        "field": "20001",
                        "range": [
                            "square"
                        ],
                        "domain": [
                            "H -TEST A",
                            "H -TEST B(W)"
                        ]
                    },
                    "size": {
                        "type": "ordinal",
                        "field": "20001",
                        "range": [
                            14.179630807244127
                        ],
                        "domain": [
                            "H -TEST A",
                            "H -TEST B(W)"
                        ]
                    },
                    "stroke": {
                        "field": "20001",
                        "type": "ordinal",
                        "range": [
                            "#2E62F1",
                            "#4DC36A"
                        ],
                        "specified": {
                            "H -TEST A": "#3772ff",
                            "undefined": "#5cb855",
                            "H -TEST B(W)": "#5cb855"
                        },
                        "domain": [
                            "H -TEST A",
                            "H -TEST B(W)"
                        ]
                    },
                    "strokeOpacity": {
                        "type": "ordinal",
                        "field": "20001",
                        "range": [
                            1
                        ],
                        "domain": [
                            "H -TEST A",
                            "H -TEST B(W)"
                        ]
                    },
                    "fillOpacity": {
                        "type": "ordinal",
                        "field": "20001",
                        "range": [
                            1
                        ],
                        "domain": [
                            "H -TEST A",
                            "H -TEST B(W)"
                        ]
                    }
                },
                "state": {
                    "hover": {
                        "lineWidth": 2,
                        "fillOpacity": 1,
                        "strokeOpacity": 1,
                        "scaleX": 1.5,
                        "scaleY": 1.5
                    }
                }
            },
            "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,
                        "strokeWidth": 0.3
                    }
                }
            },
            "invalidType": "break",
            "seriesMark": "line",
            "markOverlap": true,
            "region": [
                {
                    "clip": true
                }
            ],
            "background": "rgba(255, 255, 255, 0)",
            "animation": false
        }
    ],
    "padding": 0,
    "labelLayout": "region",
    "data": [
        {
            "id": "data",
            "values": [
                {
                    "10001": "TEST A",
                    "10003": "221104133321050",
                    "10011": "53467.857142857145",
                    "20001": "H -TEST A",
                    "221104133321033": "2023-W48(11/27~12/03)",
                    "221104133321050": "53467.857142857145",
                    "221104133321084": "H "
                },
                {
                    "10001": "TEST A",
                    "10003": "221104133321050",
                    "10011": "53384.71428571428",
                    "20001": "H -TEST A",
                    "221104133321033": "2023-W49(12/04~12/10)",
                    "221104133321050": "53384.71428571428",
                    "221104133321084": "H "
                },
                {
                    "10001": "TEST A",
                    "10003": "221104133321050",
                    "10011": "52454.71428571428",
                    "20001": "H -TEST A",
                    "221104133321033": "2023-W50(12/11~12/17)",
                    "221104133321050": "52454.71428571428",
                    "221104133321084": "H "
                },
                {
                    "10001": "TEST A",
                    "10003": "221104133321050",
                    "10011": "53084.28571428572",
                    "20001": "H -TEST A",
                    "221104133321033": "2023-W51(12/18~12/24)",
                    "221104133321050": "53084.28571428572",
                    "221104133321084": "H "
                },
                {
                    "10001": "TEST A",
                    "10003": "221104133321050",
                    "10011": "52784.57142857143",
                    "20001": "H -TEST A",
                    "221104133321033": "2023-W52(12/25~12/31)",
                    "221104133321050": "52784.57142857143",
                    "221104133321084": "H "
                },
                {
                    "10001": "TEST A",
                    "10003": "221104133321050",
                    "10011": "51517.857142857145",
                    "20001": "H -TEST A",
                    "221104133321033": "2000-W01(01/01~01/07)",
                    "221104133321050": "51517.857142857145",
                    "221104133321084": "H "
                },
                {
                    "10001": "TEST A",
                    "10003": "221104133321050",
                    "10011": "53428.142857142855",
                    "20001": "H -TEST A",
                    "221104133321033": "2000-W02(01/08~01/14)",
                    "221104133321050": "53428.142857142855",
                    "221104133321084": "H "
                },
                {
                    "10001": "TEST A",
                    "10003": "221104133321050",
                    "10011": "52583.857142857145",
                    "20001": "H -TEST A",
                    "221104133321033": "2000-W03(01/15~01/21)",
                    "221104133321050": "52583.857142857145",
                    "221104133321084": "H "
                },
                {
                    "10001": "TEST A",
                    "10003": "221104133321050",
                    "10011": "51472",
                    "20001": "H -TEST A",
                    "221104133321033": "2000-W04(01/22~01/28)",
                    "221104133321050": "51472",
                    "221104133321084": "H "
                },
                {
                    "10001": "TEST B(W)",
                    "10003": "221104133321081",
                    "10012": "7269.571482857143",
                    "20001": "H -TEST B(W)",
                    "221104133321033": "2023-W48(11/27~12/03)",
                    "221104133321081": "7269.571482857143",
                    "221104133321084": "H "
                },
                {
                    "10001": "TEST B(W)",
                    "10003": "221104133321081",
                    "10012": "10219.42426",
                    "20001": "H -TEST B(W)",
                    "221104133321033": "2023-W49(12/04~12/10)",
                    "221104133321081": "10219.42426",
                    "221104133321084": "H "
                },
                {
                    "10001": "TEST B(W)",
                    "10003": "221104133321081",
                    "10012": "10733.737468571428",
                    "20001": "H -TEST B(W)",
                    "221104133321033": "2023-W50(12/11~12/17)",
                    "221104133321081": "10733.737468571428",
                    "221104133321084": "H "
                },
                {
                    "10001": "TEST B(W)",
                    "10003": "221104133321081",
                    "10012": "7628.288995714285",
                    "20001": "H -TEST B(W)",
                    "221104133321033": "2023-W51(12/18~12/24)",
                    "221104133321081": "7628.288995714285",
                    "221104133321084": "H "
                },
                {
                    "10001": "TEST B(W)",
                    "10003": "221104133321081",
                    "10012": "7539.0848157142855",
                    "20001": "H -TEST B(W)",
                    "221104133321033": "2023-W52(12/25~12/31)",
                    "221104133321081": "7539.0848157142855",
                    "221104133321084": "H "
                },
                {
                    "10001": "TEST B(W)",
                    "10003": "221104133321081",
                    "10012": "6811.388998571428",
                    "20001": "H -TEST B(W)",
                    "221104133321033": "2000-W01(01/01~01/07)",
                    "221104133321081": "6811.388998571428",
                    "221104133321084": "H "
                },
                {
                    "10001": "TEST B(W)",
                    "10003": "221104133321081",
                    "10012": "6908.732348571428",
                    "20001": "H -TEST B(W)",
                    "221104133321033": "2000-W02(01/08~01/14)",
                    "221104133321081": "6908.732348571428",
                    "221104133321084": "H "
                },
                {
                    "10001": "TEST B(W)",
                    "10003": "221104133321081",
                    "10012": "6822.051985714285",
                    "20001": "H -TEST B(W)",
                    "221104133321033": "2000-W03(01/15~01/21)",
                    "221104133321081": "6822.051985714285",
                    "221104133321084": "H "
                },
                {
                    "10001": "TEST B(W)",
                    "10003": "221104133321081",
                    "10012": "7374.97233",
                    "20001": "H -TEST B(W)",
                    "221104133321033": "2000-W04(01/22~01/28)",
                    "221104133321081": "7374.97233",
                    "221104133321084": "H "
                }
            ],
            "fields": {
                "10001": {
                    "alias": "指标名称 "
                },
                "10011": {
                    "alias": "指标值(主轴) "
                },
                "10012": {
                    "alias": "指标值(次轴) "
                },
                "20001": {
                    "alias": "图例项 ",
                    "domain": [
                        "H -TEST A",
                        "H -TEST B(W)"
                    ],
                    "sortIndex": 0,
                    "lockStatisticsByDomain": true
                },
                "221104133321033": {
                    "alias": "业务日期",
                    "domain": [
                        "2023-W48(11/27~12/03)",
                        "2023-W49(12/04~12/10)",
                        "2023-W50(12/11~12/17)",
                        "2023-W51(12/18~12/24)",
                        "2023-W52(12/25~12/31)",
                        "2000-W01(01/01~01/07)",
                        "2000-W02(01/08~01/14)",
                        "2000-W03(01/15~01/21)",
                        "2000-W04(01/22~01/28)"
                    ],
                    "sortIndex": 0,
                    "lockStatisticsByDomain": true
                },
                "221104133321050": {
                    "alias": "TEST A"
                },
                "221104133321081": {
                    "alias": "TEST B(W)"
                },
                "221104133321084": {
                    "alias": "所属垂类团队"
                }
            }
        }
    ],
    "stackInverse": true,
    "axes": [
        {
            "id": "dimensionAxis",
            "type": "band",
            "tick": {
                "visible": false
            },
            "grid": {
                "visible": true,
                "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": "业务日期",
                "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
            ]
        },
        {
            "id": "measureAxisLeft",
            "type": "linear",
            "tick": {
                "visible": true,
                "tickMode": "d3",
                "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": "TEST A",
                "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": -1,
                    "direction": "horizontal"
                },
                "autoHide": true,
                "autoHideMethod": "greedy"
            },
            "background": {
                "visible": true,
                "state": {
                    "hover": {
                        "fillOpacity": 0.08,
                        "fill": "#141414"
                    },
                    "hover_reverse": {
                        "fillOpacity": 0.08,
                        "fill": "#141414"
                    }
                }
            },
            "zero": false,
            "nice": true,
            "seriesId": "mainSeries"
        },
        {
            "id": "measureAxisRight",
            "type": "linear",
            "tick": {
                "visible": true,
                "tickMode": "d3",
                "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": "right",
            "visible": true,
            "domainLine": {
                "visible": true,
                "style": {
                    "lineWidth": 1,
                    "stroke": "rgba(255, 255, 255, 0)"
                }
            },
            "title": {
                "visible": true,
                "text": "TEST B(W)",
                "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": -1,
                    "direction": "horizontal"
                },
                "autoHide": true,
                "autoHideMethod": "greedy"
            },
            "background": {
                "visible": true,
                "state": {
                    "hover": {
                        "fillOpacity": 0.08,
                        "fill": "#141414"
                    },
                    "hover_reverse": {
                        "fillOpacity": 0.08,
                        "fill": "#141414"
                    }
                }
            },
            "zero": false,
            "nice": true,
            "seriesId": "subSeries",
            "sync": {
                "axisId": "measureAxisLeft",
                "zeroAlign": false
            }
        }
    ],
    "seriesField": "20001",
    "color": {
        "field": "20001",
        "type": "ordinal",
        "range": [
            "#2E62F1",
            "#4DC36A"
        ],
        "specified": {
            "H -TEST A": "#3772ff",
            "undefined": "#5cb855",
            "H -TEST B(W)": "#5cb855"
        },
        "domain": [
            "H -TEST A",
            "H -TEST B(W)"
        ]
    },
    "legends": [
        {
            "type": "discrete",
            "visible": true,
            "id": "legend-discrete",
            "orient": "bottom",
            "position": "start",
            "layoutType": "normal",
            "maxRow": 1,
            "title": {
                "textStyle": {
                    "fontSize": 12,
                    "fill": "#6F6F6F"
                }
            },
            "layoutLevel": 30,
            "item": {
                "focus": true,
                "focusIconStyle": {
                    "size": 14
                },
                "maxWidth": 400,
                "spaceRow": 0,
                "spaceCol": 0,
                "padding": {
                    "top": 1,
                    "bottom": 1,
                    "left": 1,
                    "right": 1
                },
                "background": {
                    "visible": false,
                    "style": {
                        "fillOpacity": 0.001
                    }
                },
                "label": {
                    "style": {
                        "fontSize": 12,
                        "fill": "#6F6F6F"
                    }
                },
                "shape": {
                    "style": {
                        "lineWidth": 0,
                        "symbolType": "square",
                        "size": 10,
                        "fillOpacity": 1
                    }
                }
            },
            "pager": {
                "layout": "horizontal",
                "padding": 0,
                "textStyle": {},
                "space": 0,
                "handler": {
                    "preShape": "triangleLeft",
                    "nextShape": "triangleRight",
                    "style": {},
                    "state": {
                        "disable": {}
                    }
                }
            },
            "padding": {
                "top": 16,
                "bottom": 0,
                "left": 0,
                "right": 0
            }
        }
    ],
    "crosshair": {
        "xField": {
            "visible": true,
            "line": {
                "type": "rect"
            }
        },
        "gridZIndex": 100
    },
    "background": "rgba(255, 255, 255, 0)",
    "markLine": [
        {
            "y": 51769.4,
            "startSymbol": {
                "visible": true,
                "symbolType": "triangleDown",
                "style": {
                    "size": 10,
                    "dx": 5,
                    "fill": "#2a59c5"
                }
            },
            "endSymbol": {
                "visible": false
            },
            "autoRange": true,
            "label": {
                "visible": true,
                "style": {
                    "dx": 10,
                    "dy": 0,
                    "fontSize": 12,
                    "fontWeight": "normal",
                    "fill": "#fff",
                    "cursor": "pointer"
                },
                "confine": true,
                "position": "insideStartTop",
                "labelBackground": {
                    "visible": true,
                    "padding": {
                        "left": 5,
                        "right": 5,
                        "top": 2,
                        "bottom": 2
                    },
                    "style": {
                        "fill": "#2F3B52",
                        "fillOpacity": 0.9,
                        "dx": 10,
                        "dy": 0
                    }
                }
            },
            "line": {
                "style": {
                    "stroke": "#2a59c5",
                    "lineWidth": 5,
                    "lineDash": [
                        3,
                        3
                    ],
                    "cursor": "pointer"
                }
            },
            "relativeSeriesId": "mainSeries",
            "id": "ead6bd3d-1058-4016-85ee-040c6bbbd126",
            "interactive": true
        },
        {
            "y": 6808,
            visible: (...agrs) => { 
              console.log('debug', agrs)
              return true
            },
            "startSymbol": {
                "visible": false
            },
            "endSymbol": {
                "visible": true,
                "symbolType": "triangleDown",
                "style": {
                    "size": 10,
                    "dx": -5,
                    "fill": "#479044"
                }
            },
            "autoRange": true,
            "label": {
                "visible": true,
                "style": {
                    "dx": 10,
                    "dy": 0,
                    "fontSize": 12,
                    "fontWeight": "normal",
                    "fill": "#fff",
                    "cursor": "pointer"
                },
                "confine": true,
                "position": "insideEndTop",
                "labelBackground": {
                    "visible": true,
                    "padding": {
                        "left": 5,
                        "right": 5,
                        "top": 2,
                        "bottom": 2
                    },
                    "style": {
                        "fill": "#2F3B52",
                        "fillOpacity": 0.9,
                        "dx": 10,
                        "dy": 0
                    }
                }
            },
            "line": {
                "style": {
                    "stroke": "#479044",
                    "lineWidth": 5,
                    "lineDash": [
                        3,
                        3
                    ],
                    "cursor": "pointer"
                }
            },
            "relativeSeriesId": "subSeries",
            "id": "7f1d8cd8-e980-4595-9d8d-d5936bf117c0",
            "interactive": true
        }
    ],
    "brush": {
        "inBrush": {
            "fillOpacity": 1,
            "stroke": "#58595B",
            "lineWidth": 1,
            "strokeOpacity": 1,
            "colorAlpha": 1
        },
        "outOfBrush": {
            "colorAlpha": 0.2,
            "fillOpacity": 0.3,
            "strokeWidth": 0.3
        }
    },
    "hash": "713811eda3965e8891c0ee653624dabb"
}

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

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

xile611 commented Jan 26, 2024

Fixed in 1.8.10

@xile611 xile611 closed this as completed Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants