zoukankan      html  css  js  c++  java
  • pyecharts 简单使用

    def plotlib_data(self):  # 画图   Type   Proportion(%)
        self.cursor.execute('select video_name from game_fps GROUP BY video_name')
        video_name = [i[0] for i in self.cursor.fetchall()]
        self.cursor.execute('select number from game_fps GROUP BY number')
        x = [i[0] / 50 for i in self.cursor.fetchall()]
        self.cursor.execute('select fps from game_fps where video_name="{}"'.format(video_name[0]))
        y1 = [i[0] for i in self.cursor.fetchall()]
        self.cursor.execute('select fps from game_fps where video_name="{}"'.format(video_name[1]))
        y2 = [i[0] for i in self.cursor.fetchall()]
        line_fps = (
            Line()
                .add_xaxis(xaxis_data=x)
                .add_yaxis(series_name=video_name[0], y_axis=y1, is_smooth=True)
                .add_yaxis(series_name=video_name[1], y_axis=y2, is_smooth=True)
                .set_global_opts(title_opts=opts.TitleOpts(title="fps-ping"), xaxis_opts=opts.AxisOpts(name='fps', name_location='center', name_gap=35, name_textstyle_opts=opts.TextStyleOpts(font_size=25)))
                .set_series_opts(label_opts=opts.LabelOpts(is_show=False))
        )
    
        self.cursor.execute('select ping from game_fps where video_name="{}"'.format(video_name[0]))
        y1 = [i[0] for i in self.cursor.fetchall()]
        self.cursor.execute('select ping from game_fps where video_name="{}"'.format(video_name[1]))
        y2 = [i[0] for i in self.cursor.fetchall()]
        line_ping = (
            Line()
                .add_xaxis(xaxis_data=x)
                .add_yaxis(series_name=video_name[0], y_axis=y1, is_smooth=True)
                .add_yaxis(series_name=video_name[1], y_axis=y2, is_smooth=True)
                .set_global_opts(title_opts=opts.TitleOpts(title=""), xaxis_opts=opts.AxisOpts(name='ping', name_location='center', name_gap=35, name_textstyle_opts=opts.TextStyleOpts(font_size=25)))
                .set_series_opts(label_opts=opts.LabelOpts(is_show=False))  # 不现实具体数字
        )
    
        grid = (
            Page(layout=Page.SimplePageLayout)
                .add(line_fps)
                .add(line_ping)
                .render("data.html")
        )
    

      

  • 相关阅读:
    Jmeter七、jmeter中的参数化
    Jmeter六、采样器解析
    Jmeter五、jmeter中的逻辑控制器
    Jmeter四、jmeter脚本组成和组件搭配
    Jmeter三、重要组件(元素)介绍
    Jmeter二、开始使用
    Jmeter一、开源软件的崛起
    MongoDB可视化工具MongoDB Compass的增删改查基本使用教程
    JMeter
    Jmeter进行webSocket接口测试
  • 原文地址:https://www.cnblogs.com/yoyo1216/p/14755819.html
Copyright © 2011-2022 走看看