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

[BUG]: BrnProgressBarChart组件鼠标悬停在某一列上,组件一直重绘,导致页面闪动 #509

Open
Badb-Lee opened this issue Oct 13, 2023 · 1 comment

Comments

@Badb-Lee
Copy link

问题提交

标题格式:[BUG]: BrnProgressBarChart组件鼠标悬停在某一列上,组件一直重绘,导致页面闪动

内容需包含:

1、BUG 描述

使用BrnProgressBarChart组件时,在绘制出的柱状图上,鼠标如果悬停在某一列数据上时,页面会一直闪动。

2、复现步骤

建一个flutter项目,导入bruno库,直接使用BrnProgressBarChart组件即可。

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
      return Directionality(
      textDirection: TextDirection.ltr,
      child: Container(
        child: _buildProgressBarChart(),
      ),
    );
  }

  Widget _buildProgressBarChart(){
    return BrnProgressBarChart(
              barChartStyle: BarChartStyle.vertical,
              xAxis: ChartAxis(axisItemList: [
              AxisItem(showText: '示例1'),
              AxisItem(showText: '示例2'),
              AxisItem(showText: '示例3'),
              AxisItem(showText: '示例4'),
              AxisItem(showText: '示例5'),
              AxisItem(showText: '示例6'),
              AxisItem(showText: '示例7'),
              AxisItem(showText: '示例8'),
              AxisItem(showText: '示例9'),
              AxisItem(showText: '示例10'),
              ]),
              barBundleList: [
              BrnProgressBarBundle(barList: [
              BrnProgressBarItem(
              text: '示例11', value: 5, hintValue: 15, showBarValueText: "1122334"),
              BrnProgressBarItem(text: '示例12', value: 20, selectedHintText: '示例12:20'),
              BrnProgressBarItem(
              text: '示例13',
              value: 30,
              selectedHintText: '示例13:30\n示例13:30\n示例13:30\n示例13:30\n示例13:30\n示例13:30'),
              BrnProgressBarItem(text: '示例14', value: 25),
              BrnProgressBarItem(text: '示例15', value: 21),
              BrnProgressBarItem(text: '示例16', value: 28),
              BrnProgressBarItem(text: '示例17', value: 15),
              BrnProgressBarItem(text: '示例18', value: 11),
              BrnProgressBarItem(text: '示例19', value: 30),
              BrnProgressBarItem(text: '示例110', value: 24),
              ], colors: [
              Color(0xff1545FD),
              Color(0xff0984F9)
              ]),
              BrnProgressBarBundle(barList: [
              BrnProgressBarItem(text: '示例21', value: 20, hintValue: 15),
              BrnProgressBarItem(text: '示例22', value: 15, selectedHintText: '示例12:20'),
              BrnProgressBarItem(
              text: '示例23',
              value: 30,
              selectedHintText: '示例13:30\n示例13:30\n示例13:30\n示例13:30\n示例13:30\n示例13:30'),
              BrnProgressBarItem(text: '示例24', value: 20),
              BrnProgressBarItem(text: '示例25', value: 28),
              BrnProgressBarItem(text: '示例26', value: 25),
              BrnProgressBarItem(text: '示例27', value: 17),
              BrnProgressBarItem(text: '示例28', value: 14),
              BrnProgressBarItem(text: '示例29', value: 36),
              BrnProgressBarItem(text: '示例210', value: 29),
              ], colors: [
              Color(0xff01D57D),
              Color(0xff01D57D)
              ]),
              ],
              yAxis: ChartAxis(axisItemList: [
              AxisItem(showText: '10'),
              AxisItem(showText: '20'),
              AxisItem(showText: '30')
              ]),
              singleBarWidth: 30,
              barGroupSpace: 30,
              barMaxValue: 60,
              onBarItemClickInterceptor: (barBundleIndex, barBundle, barGroupIndex, barItem) {
              return true;
              },
  );
}
}

3、期望行为

正常使用

4、运行环境

  • 运行设备:web和windows都有此问题
  • 系统:Windows10
  • Bruno 版本:3.4.3
  • Flutter Doctor 信息:
    flutter_doctor

5、附加信息

视频如下:

demo.mp4
@Kingtous
Copy link
Contributor

Reproducible, seems it affects whole desktop platforms which supports mouse cursors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants