Skip to content

Commit

Permalink
Chart series switch places when picking Y axis or color (#4412)
Browse files Browse the repository at this point in the history
  • Loading branch information
kravets-levko authored and arikfr committed Dec 4, 2019
1 parent c14e7ab commit 041d05d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/app/visualizations/chart/getChartData.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isNil, each, forOwn, sortBy, values } from 'lodash';
import { isNil, isObject, each, forOwn, sortBy, values } from 'lodash';

function addPointToSeries(point, seriesCollection, seriesName) {
if (seriesCollection[seriesName] === undefined) {
Expand Down Expand Up @@ -89,8 +89,8 @@ export default function getChartData(data, options) {
}
});
return sortBy(values(series), ({ name }) => {
if (options.seriesOptions[name]) {
return options.seriesOptions[name].zIndex;
if (isObject(options.seriesOptions[name])) {
return options.seriesOptions[name].zIndex || 0;
}
return 0;
});
Expand Down

0 comments on commit 041d05d

Please sign in to comment.