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

G2 的 API 对于用 jinja2 渲染很不友好 #6

Closed
sunhailin-Leo opened this issue Jan 21, 2021 · 8 comments
Closed

G2 的 API 对于用 jinja2 渲染很不友好 #6

sunhailin-Leo opened this issue Jan 21, 2021 · 8 comments

Comments

@sunhailin-Leo
Copy link

@hustcc

  • 你应该考虑怎么用 jinja2 封装 G2js api
@hustcc
Copy link
Owner

hustcc commented Jan 21, 2021

@hustcc

  • 你应该考虑怎么用 jinja2 封装 G2js api

正在考虑中了,看到 pyecharts 使用的是 JSCode string 来,这个目前提供了, 但是在考虑怎么将 Python 的 function 转成 js 的 function string。

之前的 python 忘得差不多了,还要捡起来。

@sunhailin-Leo
Copy link
Author

@hustcc

  • 我去年本来也想封装一套,后来看了一段时间就劝退了😂,最近还是折腾 Echarts 5.Xpyecharts 下一版本
  • 个人给你个建议哈:你可以折腾这个 cloud-charts

@hustcc
Copy link
Owner

hustcc commented Jan 21, 2021

@sunhailin-Leo PyG2Plot 封装的是 G2Plot,这个是完全 object 形式配置的,只有一些 callback 是 function,所以可行。对于 G2,几乎全部是命令式的 API,几乎不可行,除非解决上面提的这个问题。

cloud-charts 和 G2Plot 思路相同,我都搞不懂 AntV 都官方封装配置的图表了,为啥阿里云还搞 🤔

@sunhailin-Leo
Copy link
Author

@hustcc

  • Python 渲染一些 jsfunction 还是很难受的,写的时候得注意一些地方;除非能撸一个 AST 将 Python 的函数转换为 js 的 unction 🐶
  • 阿里云闲的蛋疼 😂😂

@hustcc
Copy link
Owner

hustcc commented Jan 21, 2021

@sunhailin-Leo G2Plot 的知名度完全不如 echarts,所以项目运营难很多。还是你 6,pyecharts 都到 10k + 了

@sunhailin-Leo
Copy link
Author

@hustcc

  • Python 渲染一些 jsfunction 还是很难受的,写的时候得注意一些地方;除非能撸一个 AST 将 Python 的函数转换为 js 的 unction 🐶
  • 阿里云闲的蛋疼 😂😂

@sunhailin-Leo
Copy link
Author

@sunhailin-Leo G2Plot 的知名度完全不如 echarts,所以项目运营难很多。还是你 6,pyecharts 都到 10k + 了

  • 主要还是 Echarts 好 😂,没有 Echarts 也没有 pyecharts 🐶

@hustcc
Copy link
Owner

hustcc commented Jan 21, 2021

@hustcc

  • Python 渲染一些 jsfunction 还是很难受的,写的时候得注意一些地方;除非能撸一个 AST 将 Python 的函数转换为 js 的 unction 🐶
  • 阿里云闲的蛋疼 😂😂

所以可以搞起来了 🐶

@hustcc hustcc closed this as completed Jan 23, 2021
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