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

我点击新的圆柱体,默认选中的没有去除 #156

Closed
yunliangQ opened this issue Jan 14, 2023 · 2 comments
Closed

我点击新的圆柱体,默认选中的没有去除 #156

yunliangQ opened this issue Jan 14, 2023 · 2 comments
Labels

Comments

@yunliangQ
Copy link

yunliangQ commented Jan 14, 2023

我现在添加的代码是

aaOptions.chart?.events(
                AAChartEvents()
                    .load(
                        String.format(
                            """
            function() {
                let points = [];
                let chart = this;
                let series = chart.series;
                let length = series.length;
                           
                for (let i = 0; i < length; i++) {
                    let pointElement = series[i].data[%s];
                    points.push(pointElement);
                }
                chart.xAxis[0].drawCrosshair(null, points[0]);
                chart.tooltip.refresh(points);
                       }""", defaultSelectedIndex
                        )
                    )
            )

添加这段代码,现在出现的结果是默认位置为点击效果,但是点击新的圆柱,默认位置的颜色没有变成未选择的颜色,然后就有两个选中的样子。我想要点击新的,去除旧的

@AAChartModel
Copy link
Owner

解决方案也是一样的:


也就是说, 在原来的 JSfor 循环中多加一句

                    pointElement.onMouseOver();

就可以了.

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