diff --git a/assets/src/scripts/d3-rendering/axes.js b/assets/src/scripts/d3-rendering/axes.js index 359707e761fcf02058c16c44ab8ca5d02493119b..c7c4b30534ff0d6014448353dee821e3b1068f09 100644 --- a/assets/src/scripts/d3-rendering/axes.js +++ b/assets/src/scripts/d3-rendering/axes.js @@ -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 diff --git a/assets/src/scripts/d3-rendering/axes.test.js b/assets/src/scripts/d3-rendering/axes.test.js index 538a36c7e4437bef9f8c4e9de2b25933163b4b1e..ef150aa56cc0f0ff1c61bb8f1fa1fdf8f165bb3d 100644 --- a/assets/src/scripts/d3-rendering/axes.test.js +++ b/assets/src/scripts/d3-rendering/axes.test.js @@ -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', () => {