python中的fusionexport sdk

fusionexport的Python项目详细描述


fusionexport语言sdk,支持通过python导出图表和仪表板。

安装

要安装此python包,请使用pip:

pip install fusionexport

用法

在项目中使用sdk:

fromfusionexportimportExportManager,ExportConfig

开始

从简单的图表导出开始。对于导出单个图表,只需传递图表配置,就像传递给fusioncharts构造函数一样。

fromfusionexportimportExportManager,ExportConfig# Import sdk# Instantiate the ExportConfig class and add the required configurationsexport_config=ExportConfig()export_config["chartConfig"]=[{"type":"column2d","renderAt":"chart-container","width":"600","height":"400","dataFormat":"json","dataSource":{"chart":{"caption":"Number of visitors last week","subCaption":"Bakersfield Central vs Los Angeles Topanga"},"data":[{"label":"Mon","value":"15123"},{"label":"Tue","value":"14233"},{"label":"Wed","value":"25507"}]}}]# Instantiate the ExportManager classem=ExportManager()# Call the export() method with the export config and the output locationexported_files=em.export(export_config,"./exported-charts",True)# print list of exported filesprint(exported_files)

现在运行此文件,导出的图表文件将保存在./exported-charts文件夹中。

API参考

您可以找到完整的参考here

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java接口中的每个方法都是抽象的,但在抽象类中,我们也只能使用抽象方法   初始化Java中声明的、未初始化的变量会发生什么情况?   java BouncyCastle openPGP将字节[]数组加密为csv文件   在Java中将类A(和所有子类)映射到类B的实例的字典   RSA公钥编码,在Java和Android中,代码相同,结果不同   java在安卓中实现数字检测语音识别   java取消选择复选框   java如何在其他配置中重用Maven配置XML片段   java有没有一种有效的方法来检查HashMap是否包含映射到相同值的键?   spring处理程序调度失败;嵌套的例外是java。lang.NoClassDefFoundError:org/apache/http/client/HttpClient   带有ehcache的java多层缓存   java如何访问chromium(或任何其他浏览器)cookie   java通过将两个集合与spring data mongodb data中的条件合并来获取计数   安卓中R.java的语法错误