Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
CurvedLines
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HS-public
CurvedLines
Commits
fbf3cf7f
Commit
fbf3cf7f
authored
Nov 09, 2013
by
MichaelZinsmaier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added a test plot for a single data point and resolved the issues with it
parent
50809657
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
2 deletions
+45
-2
curvedLines.js
curvedLines.js
+4
-2
testSinglePoint.htm
tests/testSinglePoint.htm
+41
-0
No files found.
curvedLines.js
View file @
fbf3cf7f
...
...
@@ -104,7 +104,6 @@
//if the plugin is active register processDatapoints method
function
processOptions
(
plot
,
options
)
{
if
(
options
.
series
.
curvedLines
.
active
)
{
plot
.
hooks
.
processDatapoints
.
unshift
(
processDatapoints
);
}
...
...
@@ -112,7 +111,10 @@
//only if the plugin is active
function
processDatapoints
(
plot
,
series
,
datapoints
)
{
if
(
series
.
curvedLines
.
apply
==
true
&&
series
.
originSeries
===
undefined
)
{
var
nrPoints
=
datapoints
.
points
.
length
/
datapoints
.
pointsize
;
var
EPSILON
=
0.5
;
//pretty large epsilon but save
if
(
series
.
curvedLines
.
apply
==
true
&&
series
.
originSeries
===
undefined
&&
nrPoints
>
(
1
+
EPSILON
))
{
if
(
series
.
lines
.
fill
)
{
var
pointsTop
=
calculateCurvePoints
(
datapoints
,
series
.
curvedLines
,
1
)
...
...
tests/testSinglePoint.htm
0 → 100644
View file @
fbf3cf7f
<hmtl>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
/>
<title>
CurvedLines Plugin for flot
</title>
<script
type=
"text/javascript"
src=
"../jquery-1.8.3.min.js"
></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="flot/excanvas.min.js"></script><![endif]-->
<script
language=
"javascript"
type=
"text/javascript"
src=
"../flot/jquery.flot.js"
></script>
<script
language=
"JavaScript"
type=
"text/javascript"
src=
"../curvedLines.js"
></script>
</head>
<body>
<div
id=
"placeholder"
style=
"width: 800;height: 400;"
></div>
<script
id=
"source"
language=
"javascript"
type=
"text/javascript"
>
var
d1
=
[[
4
,
4
]];
var
options
=
{
series
:
{
curvedLines
:
{
active
:
true
,
fit
:
true
}
}
};
$
.
plot
(
$
(
"#placeholder"
),
[{
data
:
d1
,
lines
:
{
show
:
true
},
curvedLines
:
{
apply
:
true
}
},
{
data
:
d1
,
points
:
{
show
:
true
}
}],
options
);
</script>
</body>
</hmtl>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment