Skip to content

Commit a3a8070

Browse files
pass tests
1 parent 307129a commit a3a8070

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

src/PivotTableUI.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class DraggableAttribute extends React.Component {
5454
style={{
5555
display: 'block',
5656
cursor: 'initial',
57-
zIndex: this.props.zIndex
57+
zIndex: this.props.zIndex,
5858
}}
5959
onClick={() => this.props.moveFilterBoxToTop(this.props.name)}
6060
>
@@ -135,7 +135,7 @@ export class DraggableAttribute extends React.Component {
135135
}
136136

137137
toggleFilterBox() {
138-
this.setState({ open: !this.state.open});
138+
this.setState({open: !this.state.open});
139139
this.props.moveFilterBoxToTop(this.props.name);
140140
}
141141

src/TableRenderers.jsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function redColorScaleGenerator(values) {
4747
const max = Math.max.apply(Math, values);
4848
return x => {
4949
// eslint-disable-next-line no-magic-numbers
50-
const nonRed = 255 - Math.round(255 * (x - min) / (max - min));
50+
const nonRed = 255 - Math.round((255 * (x - min)) / (max - min));
5151
return {backgroundColor: `rgb(255,${nonRed},${nonRed})`};
5252
};
5353
}
@@ -138,10 +138,9 @@ function makeRenderer(opts = {}) {
138138
{colAttrs.map(function(c, j) {
139139
return (
140140
<tr key={`colAttr${j}`}>
141-
{j === 0 &&
142-
rowAttrs.length !== 0 && (
143-
<th colSpan={rowAttrs.length} rowSpan={colAttrs.length} />
144-
)}
141+
{j === 0 && rowAttrs.length !== 0 && (
142+
<th colSpan={rowAttrs.length} rowSpan={colAttrs.length} />
143+
)}
145144
<th className="pvtAxisLabel">{c}</th>
146145
{colKeys.map(function(colKey, i) {
147146
const x = spanSize(colKeys, i, j);

src/Utilities.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,10 @@ const aggregatorTemplates = {
402402
aggregatorTemplates.countUnique = f =>
403403
aggregatorTemplates.uniques(x => x.length, f);
404404
aggregatorTemplates.listUnique = s =>
405-
aggregatorTemplates.uniques(x => x.join(s), x => x);
405+
aggregatorTemplates.uniques(
406+
x => x.join(s),
407+
x => x
408+
);
406409
aggregatorTemplates.max = f => aggregatorTemplates.extremes('max', f);
407410
aggregatorTemplates.min = f => aggregatorTemplates.extremes('min', f);
408411
aggregatorTemplates.first = f => aggregatorTemplates.extremes('first', f);
@@ -479,7 +482,7 @@ const zeroPad = number => `0${number}`.substr(-2, 2); // eslint-disable-line no-
479482

480483
const derivers = {
481484
bin(col, binWidth) {
482-
return record => record[col] - record[col] % binWidth;
485+
return record => record[col] - (record[col] % binWidth);
483486
},
484487
dateFormat(
485488
col,

0 commit comments

Comments
 (0)