hustcc / PyG2Plot

🎨 Python3 binding for `@AntV/G2Plot` Plotting Library .
MIT License
1.07k stars 115 forks source link

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

Closed sunhailin-Leo closed 3 years ago

sunhailin-Leo commented 3 years ago

@hustcc

hustcc commented 3 years ago

@hustcc

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

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

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

sunhailin-Leo commented 3 years ago

@hustcc

hustcc commented 3 years ago

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

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

sunhailin-Leo commented 3 years ago

@hustcc

hustcc commented 3 years ago

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

sunhailin-Leo commented 3 years ago

@hustcc

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

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

hustcc commented 3 years ago

@hustcc

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

所以可以搞起来了 🐶