Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
75530220
Commit
75530220
authored
Jan 07, 2015
by
Mathieu Rodic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ANOMALY] in graphs, Y-axis is now linear by default
parent
dab2307e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
gargantext.angular.js
static/js/gargantext.angular.js
+14
-2
mvc.html
templates/tests/mvc.html
+1
-1
No files found.
static/js/gargantext.angular.js
View file @
75530220
...
@@ -323,7 +323,7 @@ gargantext.controller("GraphController", function($scope, $http, $element) {
...
@@ -323,7 +323,7 @@ gargantext.controller("GraphController", function($scope, $http, $element) {
options
:
{
options
:
{
axes
:
{
axes
:
{
x
:
{
key
:
'x'
,
type
:
'date'
},
x
:
{
key
:
'x'
,
type
:
'date'
},
y
:
{
type
:
'l
og
'
},
y
:
{
type
:
'l
inear'
,
type
:
'numeric
'
},
},
},
tension
:
1.0
,
tension
:
1.0
,
lineMode
:
'bundle'
,
lineMode
:
'bundle'
,
...
@@ -384,15 +384,27 @@ gargantext.controller("GraphController", function($scope, $http, $element) {
...
@@ -384,15 +384,27 @@ gargantext.controller("GraphController", function($scope, $http, $element) {
});
});
});
});
// Convert this object back to a sorted array
// Convert this object back to a sorted array
var
yMin
,
yMax
;
var
linearData
=
[];
var
linearData
=
[];
for
(
var
x
in
dataObject
)
{
for
(
var
x
in
dataObject
)
{
var
row
=
{
x
:
convert
(
x
)};
var
row
=
{
x
:
convert
(
x
)};
var
yList
=
dataObject
[
x
];
var
yList
=
dataObject
[
x
];
for
(
var
i
=
0
;
i
<
yList
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
yList
.
length
;
i
++
)
{
row
[
'y'
+
i
]
=
yList
[
i
];
y
=
yList
[
i
];
row
[
'y'
+
i
]
=
y
;
if
(
yMax
==
undefined
||
y
>
yMax
)
{
yMax
=
y
;
}
if
(
yMin
==
undefined
||
y
<
yMin
)
{
yMin
=
y
;
}
}
}
linearData
.
push
(
row
);
linearData
.
push
(
row
);
}
}
// Update the axis
$scope
.
graph
.
options
.
axes
.
y
.
min
=
yMin
;
$scope
.
graph
.
options
.
axes
.
y
.
max
=
yMax
;
$scope
.
graph
.
options
.
axes
.
y
.
ticks
=
100
;
// Finally, update the graph
// Finally, update the graph
var
series
=
[];
var
series
=
[];
for
(
var
i
=
0
,
n
=
$scope
.
datasets
.
length
;
i
<
n
;
i
++
)
{
for
(
var
i
=
0
,
n
=
$scope
.
datasets
.
length
;
i
<
n
;
i
++
)
{
...
...
templates/tests/mvc.html
View file @
75530220
...
@@ -273,7 +273,7 @@
...
@@ -273,7 +273,7 @@
<br/>
<br/>
Y-axis: use a
Y-axis: use a
<select
ng-model=
"graph.options.axes.y.type"
ng-options=
"type for type in ['l
og', 'linear
']"
></select>
<select
ng-model=
"graph.options.axes.y.type"
ng-options=
"type for type in ['l
inear', 'log
']"
></select>
scale
scale
<br/>
<br/>
...
...
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