Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
waterdataui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Water Mission Area
Internet of Water
waterdataui
Commits
e1d6ff3d
Commit
e1d6ff3d
authored
4 years ago
by
Briggs, Aaron Shane
Browse files
Options
Downloads
Patches
Plain Diff
fixed data error on chrome
parent
895aaa0b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
assets/src/scripts/d3-rendering/axes.js
+9
-7
9 additions, 7 deletions
assets/src/scripts/d3-rendering/axes.js
assets/src/scripts/d3-rendering/axes.test.js
+2
-2
2 additions, 2 deletions
assets/src/scripts/d3-rendering/axes.test.js
with
11 additions
and
9 deletions
assets/src/scripts/d3-rendering/axes.js
+
9
−
7
View file @
e1d6ff3d
...
...
@@ -97,12 +97,14 @@ export const appendSecondaryYAxis = function(elem, {yAxis, layout, yTitle}) {
* @prop {String} yTitle - label for the y axis
* @prop {String} secondaryYtitle - label for the secondary y axis.
*/
export
const
appendAxes
=
function
(
elem
,
{
xAxis
,
yAxis
,
secondaryYAxis
,
layout
,
yTitle
,
secondaryYTitle
})
{
export
const
appendAxes
=
function
(
elem
,
{
xAxis
,
yAxis
,
layout
,
yTitle
})
{
// export const appendAxes = function(elem, {xAxis, yAxis, secondaryYAxis, layout, yTitle, secondaryYTitle}) {
elem
.
call
(
appendXAxis
,
{
xAxis
,
layout
})
.
call
(
appendYAxis
,
{
yAxis
,
layout
,
yTitle
})
.
call
(
appendSecondaryYAxis
,
{
yAxis
:
secondaryYAxis
,
layout
:
layout
,
yTitle
:
secondaryYTitle
});
.
call
(
appendYAxis
,
{
yAxis
,
layout
,
yTitle
});
// will reuse for graphing two parameters
// .call(appendSecondaryYAxis, {
// yAxis: secondaryYAxis,
// layout: layout,
// yTitle: secondaryYTitle
// });
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
assets/src/scripts/d3-rendering/axes.test.js
+
2
−
2
View file @
e1d6ff3d
...
...
@@ -88,8 +88,8 @@ describe('axes module', () => {
expect
(
svg
.
selectAll
(
'
.x-axis
'
).
size
()).
toBe
(
1
);
expect
(
svg
.
selectAll
(
'
.y-axis
'
).
size
()).
toBe
(
1
);
expect
(
svg
.
selectAll
(
'
.secondary-y-axis
'
).
size
()).
toBe
(
1
);
expect
(
svg
.
selectAll
(
'
.y-axis-label
'
).
size
()).
toBe
(
2
);
expect
(
svg
.
selectAll
(
'
.secondary-y-axis
'
).
size
()).
toBe
(
0
);
expect
(
svg
.
selectAll
(
'
.y-axis-label
'
).
size
()).
toBe
(
1
);
});
it
(
'
should render only one y axis if a secondaryYAxis is not defined
'
,
()
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment