python谷歌图表包装器。
ak-gchartwrapper的Python项目详细描述
################################################################################
# GChartWrapper - v0.9
# Copyright (C) 2009 Justin Quick <justquick@gmail.com>
#
# This program is free software. See attached LICENSE.txt for more info
################################################################################
GChartWrapper - Google Chart API Wrapper
The wrapper can render the URL of the Google chart based on your parameters.
With the chart you can render an HTML IMG标记可动态插入网页,
直接在WebBrowser中显示,or save the chart PNG to disk.
################################################################################
Changelog:
-- 0.9 --
Switched to New BSD License
-- 0.8 --
Reverse functionality
>>> g=g chart.fromURL('http://chart.apis.google.com/chart?ch…。)
<;gchartwrapper.gchart实例位于…>;
链接修复
重构轴函数
集中和添加的单元测试
增强的Unicode支持
演示带有源代码的页面
--0.7--
完全符合PY3K
从CSS名称中查找颜色名称:http://w w w.w3schools.com/css/css\u color names.asp
>;g=pie3D(范围(1,5))
>;>g.color('green')
新图表注释、文本、pin、气泡
更新了django模板标记以允许上下文包含,新图表
添加了更多模板示例
--0.6--
包装器现在支持链接
旧方法:
>;G=PIE3D(范围(1,5))
'D').color('00dd00')
New chart PieC for concentric pie charts
################################################################################
Doc TOC:
1.1 General
1.2 Constructing
1.3 Rendering and Viewing
2.1 Django extension
2.2静态数据
2.3动态数据
3.1其他模板语言
4.1测试框架
5.1 API文档
<1.1常规
>可使用http://code.google.com/api/chart/上的Google Chart API生成自定义图表。gchart包装允许pythonic访问构造图表和显示生成的url的参数。
1.2构造类gchart(dict):
"主图表类
Iterable and be multi-dimensional
如果有效的话,Kwargs将被放入图表API参数"
def初始(self,cType=none,dataset=[],**Kwargs):
>;>;数据集=(1,2,3)
也包括二维
>;>;数据集=[[3,4],[5,6],[7,8]]
gchart p3(1,2,3)>;
g=g chart('p3',dataset,size=(300150))
chl='a b c')
1.3呈现和查看
包装器有许多有用的方法来获取图表的url,并将其输出为不同的格式,如…
pis.google.com/chart?…'
…"id="chart"height="500">;'
<;pngimageplugin.pngimagefile instance at 0xb795ee4c>;
"jpeg")
这允许动态插入数据,以便在任何
web应用程序上查看。先使用"python setup.py install"安装模块,然后将"gchartwapprapper.charts"放入已安装的应用程序中,然后就可以开始了。
在制作图表之前,只需在模板中包含"{%load charts%}"标记即可。
在模板文件夹中,有一个名为djangoproj的文件夹这是一个例子
django项目让你开始。
2.2静态数据
然后在你的模板中尝试一些静态数据
{%图表行gurmrabsclgubalgvzcrgrefgryvforggreggunahtyl%}
{%title'python的禅'00cc00 36%}
{%color 00cc00%}
{%endchart%}
或者尝试一个bubble
{%bubble icon\u big snack bb$2.99 ffbb00 black as img%}
>2.3动态数据
render_to_response('example.html',{'dataset':范围(50)}
example.html模板代码
{%chart line dataset%}
{%color 00cc00%}
{%endchart%}
>查看djangoproj中的example.html以获取更详细的示例
3.1其他模板语言
模板语言的图表包装器目前正在开发中
空速?
更多内容…
4.1测试框架
该模块还提供了一个测试框架,其中包含
gchartwrapper/testing.py中提供的示例图表。测试通过gchartwrapper/tests.py
usage
$python tests.py[<;mode>;]
模式如下:
unit-运行所有图表的单元测试用例以查看校验和是否匹配
save-将所有图表的图像保存在"tests"文件夹中
demo-创建HTML演示页(需要pygments)
url-打印所有图表的URL[默认]
5.1 API文档
ePydoc API信息以HTML格式生成,可在index.html下的
docs文件夹中找到
# GChartWrapper - v0.9
# Copyright (C) 2009 Justin Quick <justquick@gmail.com>
#
# This program is free software. See attached LICENSE.txt for more info
################################################################################
GChartWrapper - Google Chart API Wrapper
The wrapper can render the URL of the Google chart based on your parameters.
With the chart you can render an HTML IMG标记可动态插入网页,
直接在WebBrowser中显示,or save the chart PNG to disk.
################################################################################
Changelog:
-- 0.9 --
Switched to New BSD License
-- 0.8 --
Reverse functionality
>>> g=g chart.fromURL('http://chart.apis.google.com/chart?ch…。)
<;gchartwrapper.gchart实例位于…>;
链接修复
重构轴函数
集中和添加的单元测试
增强的Unicode支持
演示带有源代码的页面
--0.7--
完全符合PY3K
从CSS名称中查找颜色名称:http://w w w.w3schools.com/css/css\u color names.asp
>;g=pie3D(范围(1,5))
>;>g.color('green')
新图表注释、文本、pin、气泡
更新了django模板标记以允许上下文包含,新图表
添加了更多模板示例
--0.6--
包装器现在支持链接
旧方法:
>;G=PIE3D(范围(1,5))
'D').color('00dd00')
New chart PieC for concentric pie charts
################################################################################
Doc TOC:
1.1 General
1.2 Constructing
1.3 Rendering and Viewing
2.1 Django extension
2.2静态数据
2.3动态数据
3.1其他模板语言
4.1测试框架
5.1 API文档
<1.1常规
>可使用http://code.google.com/api/chart/上的Google Chart API生成自定义图表。gchart包装允许pythonic访问构造图表和显示生成的url的参数。
1.2构造类gchart(dict):
"主图表类
Iterable and be multi-dimensional
如果有效的话,Kwargs将被放入图表API参数"
def初始(self,cType=none,dataset=[],**Kwargs):
>;>;数据集=(1,2,3)
也包括二维
>;>;数据集=[[3,4],[5,6],[7,8]]
gchart p3(1,2,3)>;
g=g chart('p3',dataset,size=(300150))
chl='a b c')
1.3呈现和查看
包装器有许多有用的方法来获取图表的url,并将其输出为不同的格式,如…
pis.google.com/chart?…'
…"id="chart"height="500">;'
<;pngimageplugin.pngimagefile instance at 0xb795ee4c>;
"jpeg")
这允许动态插入数据,以便在任何
web应用程序上查看。先使用"python setup.py install"安装模块,然后将"gchartwapprapper.charts"放入已安装的应用程序中,然后就可以开始了。
在制作图表之前,只需在模板中包含"{%load charts%}"标记即可。
在模板文件夹中,有一个名为djangoproj的文件夹这是一个例子
django项目让你开始。
2.2静态数据
然后在你的模板中尝试一些静态数据
{%图表行gurmrabsclgubalgvzcrgrefgryvforggreggunahtyl%}
{%title'python的禅'00cc00 36%}
{%color 00cc00%}
{%endchart%}
或者尝试一个bubble
{%bubble icon\u big snack bb$2.99 ffbb00 black as img%}
>2.3动态数据
render_to_response('example.html',{'dataset':范围(50)}
example.html模板代码
{%chart line dataset%}
{%color 00cc00%}
{%endchart%}
>查看djangoproj中的example.html以获取更详细的示例
3.1其他模板语言
模板语言的图表包装器目前正在开发中
空速?
更多内容…
4.1测试框架
该模块还提供了一个测试框架,其中包含
gchartwrapper/testing.py中提供的示例图表。测试通过gchartwrapper/tests.py
usage
$python tests.py[<;mode>;]
模式如下:
unit-运行所有图表的单元测试用例以查看校验和是否匹配
save-将所有图表的图像保存在"tests"文件夹中
demo-创建HTML演示页(需要pygments)
url-打印所有图表的URL[默认]
5.1 API文档
ePydoc API信息以HTML格式生成,可在index.html下的
docs文件夹中找到