DevOps研发效能
媒体矩阵
开源中国APP
授权协议 MIT
开发语言 Python
操作系统 跨平台
软件类型 开源软件
所属分类 大数据可视化
开源组织
地区 不详
投 递 者 不详
适用人群 未知
收录时间 2023-12-19

软件简介

G2 是一种可视化语法,用于仪表盘构建、数据探索和故事讲述。

创建该项目是为了在 streamlit 中渲染 G2 图表。Live Demo

Installation

pip install streamlit-g2 

Usage

import streamlit as st
from streamlit_g2 import g2

options = {
    "type": "interval",
    "data": [
        { "genre": 'Sports', "sold": 275 },
        { "genre": 'Strategy', "sold": 115 },
        { "genre": 'Action', "sold": 120 },
        { "genre": 'Shooter', "sold": 350 },
        { "genre": 'Other', "sold": 150 },
    ],
    "encode": {
        "x": "genre",
        "y": "sold",
        "color": "genre",
    }
}

g2(options=options, style=None, key="streamlit_g2")

API

streamlit-g2 目前只有一个名为 g2 的 API,参见 G2 Spec API 中的选项。

Property Description Type Default
options the options for the visualization, say chart.options(options) G2options | null -
style the style of the container CSSProperties -
展开阅读全文

代码

的 Gitee 指数为
超过 的项目

评论

点击引领话题📣 发布并加入讨论🔥
暂无内容
发表了博客
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
发表了问答
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
暂无内容
0 评论
4 收藏
分享
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部