1 Star 0 Fork 0

soulCoke / CurvedLines

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
exampleStackedData.txt 1.38 KB
一键复制 编辑 原始数据 按行查看 历史
### html ###
<h4>CurvedLines: random stacked data</h4>
<div id="flotContainer" class="chart-style"></div>
<h4>CurvedLines: same data connected with curved lines</h4>
<div id="flotContainer2" class="chart-style"></div>
### css ###
.chart-style {
width: 600px;
height: 260px;
}
### javascript ###
//random data
var d1 = [];
for (var i = 0; i <= 10; i += 1) {
d1.push([i, parseInt(Math.random() * 30)]);
}
var d2 = [];
for (var i = 0; i <= 10; i += 1) {
d2.push([i, parseInt(Math.random() * 30)]);
}
var d3 = [];
for (var i = 0; i <= 10; i += 1) {
d3.push([i, parseInt(Math.random() * 30)]);
}
//flot options
var options = {
series: {
curvedLines: {
apply: true,
active: true,
monotonicFit: true
}
}
};
//plotting
$.plot($("#flotContainer"), [
{data: d1, lines: { show: true, fill: true }, stack: true },
{data: d2, lines: { show: true, fill: true }, stack: true },
{data: d3, lines: { show: true, fill: true }, stack: true }
], {});
$.plot($("#flotContainer2"), [
{data: d1, lines: { show: true, fill: true }, stack: true },
{data: d2, lines: { show: true, fill: true }, stack: true },
{data: d3, lines: { show: true, fill: true }, stack: true }
], options);
1
https://gitee.com/yuanliyang/CurvedLines.git
git@gitee.com:yuanliyang/CurvedLines.git
yuanliyang
CurvedLines
CurvedLines
master

搜索帮助