Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
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
edx
edx-platform
Commits
0eeabc68
Commit
0eeabc68
authored
Dec 19, 2012
by
Valera Rozuvan
Committed by
Alexander Kryklia
Jan 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added exmple with normal distribution.
parent
aa470639
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
6 deletions
+30
-6
common/lib/xmodule/xmodule/gst_module.py
+2
-0
common/lib/xmodule/xmodule/js/src/graphical_slider_tool/graph.js
+28
-6
common/lib/xmodule/xmodule/js/src/graphical_slider_tool/jstat-1.0.0.min.js
+0
-0
No files found.
common/lib/xmodule/xmodule/gst_module.py
View file @
0eeabc68
...
...
@@ -25,6 +25,8 @@ class GraphicalSliderToolModule(XModule):
js
=
{
'js'
:
[
resource_string
(
__name__
,
'js/src/graphical_slider_tool/jstat-1.0.0.min.js'
),
resource_string
(
__name__
,
'js/src/graphical_slider_tool/gst_main.js'
),
resource_string
(
__name__
,
'js/src/graphical_slider_tool/state.js'
),
resource_string
(
__name__
,
'js/src/graphical_slider_tool/logme.js'
),
...
...
common/lib/xmodule/xmodule/js/src/graphical_slider_tool/graph.js
View file @
0eeabc68
...
...
@@ -403,11 +403,12 @@ define('Graph', ['logme'], function (logme) {
obj
[
'@line'
],
obj
[
'@dot'
],
obj
[
'@label'
],
obj
[
'@point_size'
]
obj
[
'@point_size'
],
obj
[
'@fill_area'
]
);
}
function
addFunction
(
funcString
,
color
,
line
,
dot
,
label
,
pointSize
)
{
function
addFunction
(
funcString
,
color
,
line
,
dot
,
label
,
pointSize
,
fillArea
)
{
var
newFunctionObject
,
func
,
paramNames
;
// The main requirement is function string. Without it we can't
...
...
@@ -422,6 +423,8 @@ define('Graph', ['logme'], function (logme) {
// will break.
funcString
=
$
(
'<div>'
).
html
(
funcString
).
text
();
logme
(
'graph: funcstr = "'
+
funcString
+
'"'
);
// Some defaults. If no options are set for the graph, we will
// make sure that at least a line is drawn for a function.
newFunctionObject
=
{
...
...
@@ -476,17 +479,17 @@ define('Graph', ['logme'], function (logme) {
}
if
(
typeof
line
===
'string'
)
{
if
(
line
===
'true'
)
{
if
(
line
.
toLowerCase
()
===
'true'
)
{
newFunctionObject
[
'line'
]
=
true
;
}
else
if
(
line
===
'false'
)
{
}
else
if
(
line
.
toLowerCase
()
===
'false'
)
{
newFunctionObject
[
'line'
]
=
false
;
}
}
if
(
typeof
dot
===
'string'
)
{
if
(
dot
===
'true'
)
{
if
(
dot
.
toLowerCase
()
===
'true'
)
{
newFunctionObject
[
'dot'
]
=
true
;
}
else
if
(
dot
===
'false'
)
{
}
else
if
(
dot
.
toLowerCase
()
===
'false'
)
{
newFunctionObject
[
'dot'
]
=
false
;
}
}
...
...
@@ -504,6 +507,21 @@ define('Graph', ['logme'], function (logme) {
newFunctionObject
[
'line'
]
=
true
;
}
if
(
newFunctionObject
[
'line'
]
===
true
)
{
if
(
typeof
fillArea
===
'string'
)
{
if
(
fillArea
.
toLowerCase
()
===
'true'
)
{
newFunctionObject
[
'fillArea'
]
=
true
;
}
else
if
(
fillArea
.
toLowerCase
()
===
'false'
)
{
newFunctionObject
[
'fillArea'
]
=
false
;
}
else
{
logme
(
'ERROR: The attribute fill_area should be either "true" or "false".'
);
logme
(
'fill_area = "'
+
fillArea
+
'".'
);
return
;
}
}
}
if
(
typeof
label
===
'string'
)
{
newFunctionObject
[
'label'
]
=
label
;
}
...
...
@@ -622,6 +640,10 @@ define('Graph', ['logme'], function (logme) {
'show'
:
functionObj
.
line
};
if
(
functionObj
.
hasOwnProperty
(
'fillArea'
)
===
true
)
{
seriesObj
.
lines
.
fill
=
functionObj
.
fillArea
;
}
// Should each data point be represented by a point on the
// graph?
seriesObj
.
points
=
{
...
...
common/lib/xmodule/xmodule/js/src/graphical_slider_tool/jstat-1.0.0.min.js
0 → 100644
View file @
0eeabc68
This diff is collapsed.
Click to expand it.
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