Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
archery
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
archery
Commits
6f0f2678
Commit
6f0f2678
authored
Nov 12, 2014
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added average score line to progress graph
parent
b264aeca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
8 deletions
+26
-8
coffee/plot.coffee
coffee/plot.coffee
+18
-1
locale/nl_NL/LC_MESSAGES/archery.po
locale/nl_NL/LC_MESSAGES/archery.po
+2
-2
templates/user/plot.latte
templates/user/plot.latte
+6
-5
No files found.
coffee/plot.coffee
View file @
6f0f2678
$
.
jqplot
'plot'
,
[
window
.
data
],
avg
=
0
avg
+=
value
for
[
label
,
value
]
in
window
.
data
avg
/=
window
.
data
.
length
$
.
jqplot
'plot'
,
[
window
.
data
],
title
:
window
.
text
.
title
title
:
window
.
text
.
title
axes
:
axes
:
xaxis
:
xaxis
:
...
@@ -11,3 +15,16 @@ $.jqplot 'plot', [window.data],
...
@@ -11,3 +15,16 @@ $.jqplot 'plot', [window.data],
seriesDefaults
:
seriesDefaults
:
markerOptions
:
markerOptions
:
size
:
20
size
:
20
canvasOverlay
:
show
:
true
objects
:
[
horizontalLine
:
name
:
'avg'
y
:
avg
lineWidth
:
1
color
:
'#b5b5b5'
shadow
:
false
showTooltip
:
true
tooltipFormatString
:
'avg: %2$.4f'
showTooltipPrecision
:
.
1
]
locale/nl_NL/LC_MESSAGES/archery.po
View file @
6f0f2678
...
@@ -158,8 +158,8 @@ msgstr "%d meter"
...
@@ -158,8 +158,8 @@ msgstr "%d meter"
msgid "YYYY-MM-DD"
msgid "YYYY-MM-DD"
msgstr "JJJJ-MM-DD"
msgstr "JJJJ-MM-DD"
msgid "Average score over time"
msgid "Average
arrow
score over time"
msgstr "Gemiddelde score over tijd"
msgstr "Gemiddelde
pijl
score over tijd"
msgid "Progress graph"
msgid "Progress graph"
msgstr "Voortgangsgrafiek"
msgstr "Voortgangsgrafiek"
...
...
templates/user/plot.latte
View file @
6f0f2678
{extends "../layout.latte"}
{extends "../layout.latte"}
{block head}
<link rel="stylesheet" type="text/css" href="jqplot/jquery.jqplot.min.css" />
{/block}
{block content}
{block content}
<div id="plot" class="plot"></div>
<div id="plot" class="plot"></div>
{$form}
{$form}
...
@@ -9,6 +13,7 @@
...
@@ -9,6 +13,7 @@
<script type="text/javascript" src="jqplot/jquery.jqplot.min.js"></script>
<script type="text/javascript" src="jqplot/jquery.jqplot.min.js"></script>
<script type="text/javascript" src="jqplot/plugins/jqplot.highlighter.min.js"></script>
<script type="text/javascript" src="jqplot/plugins/jqplot.highlighter.min.js"></script>
<script type="text/javascript" src="jqplot/plugins/jqplot.dateAxisRenderer.min.js"></script>
<script type="text/javascript" src="jqplot/plugins/jqplot.dateAxisRenderer.min.js"></script>
<script type="text/javascript" src="jqplot/plugins/jqplot.canvasOverlay.min.js"></script>
<script type="text/javascript">
<script type="text/javascript">
window.data = [
window.data = [
{foreach $matches as $match}
{foreach $matches as $match}
...
@@ -16,12 +21,8 @@
...
@@ -16,12 +21,8 @@
{/foreach}
{/foreach}
];
];
window.text = {
window.text = {
title: {_'Average score over time'}
title: {_'Average
arrow
score over time'}
};
};
</script>
</script>
<script type="text/javascript" src="js/plot.js"></script>
<script type="text/javascript" src="js/plot.js"></script>
{/block}
{/block}
{block head}
<link rel="stylesheet" type="text/css" href="jqplot/jquery.jqplot.min.css" />
{/block}
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