Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile without warnings #154

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/withColumnChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const withColumnChart = (ComposedComponent) => {
this.series.forEach(s => {
s.data.filter((d,idx,arr) => {
return idx === arr.length - 1;
}).map(d => {
}).forEach(d => {
d.setState('hover');
});
});
Expand Down Expand Up @@ -132,7 +132,7 @@ const withColumnChart = (ComposedComponent) => {
this.series.chart.series.forEach(s => {
s.data.filter((d,idx) => {
return this.index === idx;
}).map(d => {
}).forEach(d => {
d.setState && d.setState('hover');
});
});
Expand All @@ -141,7 +141,7 @@ const withColumnChart = (ComposedComponent) => {
mouseOut: function() {
// todo - extract to setHighchartsSeriesDataState
this.series.chart.series.forEach(s => {
s.data.map(d => {
s.data.forEach(d => {
d.setState && d.setState('');
});
});
Expand Down
3 changes: 3 additions & 0 deletions src/components/withHeroChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ const withHeroChart = (ComposedComponent) => {
case 'visible':
this.tooltip.label.hide();
break;

default:
// Just to shut the linter up
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/withLineChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const withLineChart = (ComposedComponent) => {
this.series.forEach(s => {
s.data.filter((d,idx,arr) => {
return idx === arr.length - 1;
}).map(d => {
}).forEach(d => {
d.setState('hover');
});
});
Expand Down Expand Up @@ -120,7 +120,7 @@ const withLineChart = (ComposedComponent) => {
this.series.chart.series.forEach(s => {
s.data.filter((d,idx) => {
return this.index === idx;
}).map(d => {
}).forEach(d => {
d.setState && d.setState('hover');
});
});
Expand All @@ -129,7 +129,7 @@ const withLineChart = (ComposedComponent) => {
mouseOut: function() {
// todo - extract to setHighchartsSeriesDataState
this.series.chart.series.forEach(s => {
s.data.map(d => {
s.data.forEach(d => {
d.setState && d.setState('');
});
});
Expand Down
6 changes: 3 additions & 3 deletions src/components/withStackedColumnChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const withStackedColumnChart = (ComposedComponent) => {
this.series.forEach(s => {
s.data.filter((d,idx,arr) => {
return idx === arr.length - 1;
}).map(d => {
}).forEach(d => {
d.setState('hover');
});
});
Expand Down Expand Up @@ -115,7 +115,7 @@ const withStackedColumnChart = (ComposedComponent) => {
this.series.chart.series.forEach(s => {
s.data.filter((d,idx) => {
return this.index === idx;
}).map(d => {
}).forEach(d => {
d.setState('hover');
});
});
Expand All @@ -126,7 +126,7 @@ const withStackedColumnChart = (ComposedComponent) => {
this.series.chart.series.forEach(s => {
s.data.filter((d,idx) => {
return this.index === idx;
}).map(d => {
}).forEach(d => {
d.setState('');
});
});
Expand Down
6 changes: 2 additions & 4 deletions src/utils/chartOptionsHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ export const plotNullDataLayerToAxis = (xAxis, series, broadcastSetState) => {

const idxsWithNullValue = series.map(s => {
return s.data.map((d, idx) => {
if (d.y === null) {
return idx;
}
return d.y === null ? idx : undefined; // For the linter's sake
});
}).reduce((a,b) => {
// find an intersection between the arrays - common null vals in a series set
Expand All @@ -91,7 +89,7 @@ export const plotNullDataLayerToAxis = (xAxis, series, broadcastSetState) => {
broadcastSetState({'customLegend': createCartesianCustomLegendData(this.axis.series, idx)});
this.axis.crosshair = false;
this.axis.series.forEach(s => {
s.data.map(d => {
s.data.forEach(d => {
d.setState('');
});
});
Expand Down