- 1、本文档共3页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Ext.js 折线图
Ext.j s 折线图
描述
此图表⽤于以线图格式表⽰数据。 它是⼀个笛卡尔图表。
语法
这⾥是简单的语法。
Ext.create(Ext.chart.CartesianChart,{
series: [{
type: line,
xField: name,
yField: G1
}]
render, legend and ther pr perties
});
例
下⾯是⼀个简单的例⼦ ⽰⽤法。
!DOCTYPE html
html
head
link href=https://cdnjs.cl udflare.c m/ajax/libs/extjs/6.0.0/
script type=text/javascript src=https://cdnjs.cl udflare.c
script type=text/javascript src=https://cdnjs.cl udflare.c
link href=https://cdnjs.cl udflare.c m/ajax/libs/extjs/6.0.0/
script type=text/javascript
Ext. nReady(functi n() {
Ext.create(Ext.chart.CartesianChart, {
renderT : d cument.b dy,
width: 600,
height: 200,
st re: {
fields: [name, g1, g2],
data: [
{name: Item-0, g1: 57, g2: 59},
{name: Item-1, g1: 45, g2: 50},
{name: Item-2, g1: 67, g2: 43},
{name: Item-3, g1: 45, g2: 18},
{name: Item-4, g1: 30, g2: 90}
]
},
legend: {
d cked: b tt m
},
//define x and y axis.
axes: [{
type: numeric,
p siti n: left
}, {
type: categ ry ,
visibleRange: [0, 1],
p siti n: b tt m
}],
//define the actual series
series: [{
type: line,
xField: name,
yField: g1,
title: N rmal
}, {
type: line,
xField: name,
yField: g2,
title: Sm th
}]
});
});
/script
/head
b dy
/b dy
/html
这将产⽣以下结果
W3Cschool ( )最⼤的
文档评论(0)