antvis / F2

📱📈An elegant, interactive and flexible charting library for mobile.
https://f2.antv.vision/zh
MIT License
7.89k stars 649 forks source link

Be compatible between `g2` and `f2`? #38

Closed NoraGithub closed 6 years ago

NoraGithub commented 6 years ago

When I read the chart by g2 directly in mobile side , the chart disappeared. Should I take f2 as a total uncorrelated library to g2? As I read the docs, it seems that you do take them as two independent/separate libraries.

If I want to make my code be compatible between g2 and f2? What else should I do? Would there be an instruction? Like

1. change g2 to  f2 
2. change the element to <canvas>
...
Done

Especially for facet concept.

NoraGithub commented 6 years ago

I switch the browser(Safari to Chrome), the chart is rendered as expected, it seems something wrong with the browser.

Actually what I really want is a cross-platform chart.

If I don't care about the code size and the performance, the code is compatible between web and wap, but it seems there would be a problem when using weex-chart.

图表插件是通过g2-mobile依赖gcanvas插件实现的

because some abstraction like facet doesn't exist in f2.

Do you have any suggestions?

simaQ commented 6 years ago
  1. Currently, G2 has not considered the demand of the cross platform, mainly for the web, if you don't care about the code size and the performance, you can just use G2.
  2. F2 will be a subset of G2, although there are a few api differences with G2 currently, we will unify them later and provide cross-platform solutions, which is what we are currently doing.
  3. About facet support in F2, we will not support it in F2, but we may provide it as a plugin for F2 in the future.

Finally, If you decide to use G2, any problems you encounter during use,you can commit issues https://github.com/antvis/g2/issues and we will respond promptly.

NoraGithub commented 6 years ago

Thanks.