Skip to content

Commit

Permalink
Merge pull request #1028 from knod/code-style-8
Browse files Browse the repository at this point in the history
Cleans code style of '/src/forms/output'. #1018
  • Loading branch information
knod committed Nov 29, 2018
2 parents fcc54f9 + 5764cfb commit befb0ae
Show file tree
Hide file tree
Showing 9 changed files with 1,416 additions and 1,417 deletions.
30 changes: 15 additions & 15 deletions src/forms/output/BenefitsLines.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,21 @@ class BenefitsLinesComp extends Component {
classes += ` ` + className;
}

const multiplier = multipliers[ timescale ],
resources = activePrograms,
currentEarned = client.current.earned * multiplier,
getText = textFromTranslatedElement;
let multiplier = multipliers[ timescale ],
resources = activePrograms,
currentEarned = client.current.earned * multiplier,
getText = textFromTranslatedElement;

// Adjust to time-interval. Highcharts will round
// for displayed ticks.
const max = (limits.max * multiplier),
interval = ((max / 100) / 10);
let max = (limits.max * multiplier),
interval = ((max / 100) / 10);

const xRange = range(limits.min, max, interval), // x-axis/earned income numbers
datasets = getChartData(xRange, multiplier, client, resources, {});
let xRange = range(limits.min, max, interval), // x-axis/earned income numbers
datasets = getChartData(xRange, multiplier, client, resources, {});

// Individual benefit lines
const lines = [];
let lines = [];
for (let dataset of datasets) {
let line = (
<LineSeries
Expand All @@ -112,12 +112,12 @@ class BenefitsLinesComp extends Component {
// Label for split tooltip 'labels'/'label headers' that appear
// at the bottom. Really long.
// @todo Abstract commonalities between graphs
const labelHeaderFormatStart = `<span style="font-size: 10px">${getText(translations.i_beforeMoney)}`,
labelHeaderFormatEnd = `{point.key:,.2f}${getText(translations.i_afterMoney)}</span><br/>`,
labelHeaderFormat = labelHeaderFormatStart + labelHeaderFormatEnd;
let labelHeaderFormatStart = `<span class="tooltip-label-header">${getText(translations.i_beforeMoney)}`,
labelHeaderFormatEnd = `{point.key:,.2f}${getText(translations.i_afterMoney)}</span><br/>`,
labelHeaderFormat = labelHeaderFormatStart + labelHeaderFormatEnd;


const plotOptions = { line: { pointInterval: interval }};
let plotOptions = { line: { pointInterval: interval }};
return (
<div className={ classes }>
<HighchartsChart plotOptions={ plotOptions }>
Expand Down Expand Up @@ -265,10 +265,10 @@ class BenefitsLinesComp extends Component {
this.setState({ altKeyClass: `` });
}
};
};
}; // Ends <BenefitsLinesComp>


const BenefitsLines = withHighcharts(BenefitsLinesComp, Highcharts);
let BenefitsLines = withHighcharts(BenefitsLinesComp, Highcharts);


export { BenefitsLines };
Loading

0 comments on commit befb0ae

Please sign in to comment.