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
60aab762
Commit
60aab762
authored
Feb 18, 2013
by
Michael
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8 from epuidokas/master
Fix compatibility with thresholds by epuidokas
parents
450f66eb
f4bc2096
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
6 deletions
+25
-6
curvedLines.js
curvedLines.js
+2
-2
example.js
example.js
+1
-1
exampleFillMultiAxis.js
exampleFillMultiAxis.js
+1
-1
exampleFit.js
exampleFit.js
+1
-1
exampleFlotWithDates.js
exampleFlotWithDates.js
+1
-1
exampleThreshold.js
exampleThreshold.js
+19
-0
No files found.
curvedLines.js
View file @
60aab762
...
...
@@ -104,13 +104,13 @@
function
processOptions
(
plot
,
options
)
{
if
(
options
.
series
.
curvedLines
.
active
)
{
plot
.
hooks
.
processDatapoints
.
push
(
processDatapoints
);
plot
.
hooks
.
processDatapoints
.
unshift
(
processDatapoints
);
}
}
//only if the plugin is active
function
processDatapoints
(
plot
,
series
,
datapoints
)
{
if
(
series
.
curvedLines
.
apply
==
true
)
{
if
(
series
.
curvedLines
.
apply
==
true
&&
series
.
originSeries
===
undefined
)
{
if
(
series
.
lines
.
fill
)
{
var
pointsTop
=
calculateCurvePoints
(
datapoints
,
series
.
curvedLines
,
1
)
...
...
example.js
View file @
60aab762
$
(
function
()
{
//<div id="flotOrig" style="width: 800
;height: 400
;"></div>
//<div id="flotOrig" style="width: 800
px;height: 400px
;"></div>
var
d1
=
[[
20
,
20
],
[
42
,
60
],
[
54
,
20
],
[
80
,
80
]];
...
...
exampleFillMultiAxis.js
View file @
60aab762
$
(
function
()
{
//<div id="fillAndMultiAxis" style="width: 800
;height: 400
;"></div>
//<div id="fillAndMultiAxis" style="width: 800
px;height: 400px
;"></div>
var
d1
=
[[
20
,
20
],
[
42
,
60
],
[
54
,
20
],
[
80
,
80
]];
var
d2
=
[[
20
,
700
],
[
80
,
300
]];
...
...
exampleFit.js
View file @
60aab762
$
(
function
()
{
//<div id="flotFit" style="width: 800
;height: 400
;"></div>
//<div id="flotFit" style="width: 800
px;height: 400px
;"></div>
var
d1
=
[[
20
,
20
],
[
42
,
60
],
[
54
,
30
],
[
80
,
80
]];
...
...
exampleFlotWithDates.js
View file @
60aab762
$
(
function
()
{
//<div id="exampleFlotWithDates" style="width: 800
;height: 400
;"></div>
//<div id="exampleFlotWithDates" style="width: 800
px;height: 400px
;"></div>
var
d1
=
[[
new
Date
(
2000
,
8
,
1
,
10
),
20
],
[
new
Date
(
2000
,
8
,
1
,
12
),
60
],
[
new
Date
(
2000
,
8
,
1
,
14
),
30
],
[
new
Date
(
2000
,
8
,
1
,
22
),
80
]];
...
...
exampleThreshold.js
0 → 100644
View file @
60aab762
$
(
function
()
{
//<div id="flotOrig" style="width: 800px;height: 400px;"></div>
var
d1
=
[[
20
,
20
],
[
42
,
60
],
[
54
,
20
],
[
80
,
80
]];
var
options
=
{
series
:
{
curvedLines
:
{
active
:
true
},
threshold
:
{
below
:
40
,
color
:
"rgb(0, 0, 0)"
}
},
axis
:
{
min
:
10
,
max
:
100
},
yaxis
:
{
min
:
10
,
max
:
90
}
};
$
.
plot
(
$
(
"#flotOrig"
),
[{
data
:
d1
,
lines
:
{
show
:
true
,
lineWidth
:
3
},
curvedLines
:
{
apply
:
true
}},
{
data
:
d1
,
points
:
{
show
:
true
}}],
options
);
});
\ No newline at end of file
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