Skip to content

Commit

Permalink
#2292 Bar chart with second y axis overlaps data series
Browse files Browse the repository at this point in the history
  • Loading branch information
kravets-levko committed Sep 18, 2019
1 parent e8d40bb commit bb87b80
Show file tree
Hide file tree
Showing 3 changed files with 551 additions and 1,708 deletions.
5 changes: 3 additions & 2 deletions client/app/visualizations/chart/plotly/prepareDefaultData.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isNil, each, includes, isString, map, sortBy } from 'lodash';
import { isNil, each, includes, isString, map, sortBy, toString } from 'lodash';
import { cleanNumber, normalizeValue, getSeriesAxis } from './utils';
import { ColorPaletteArray } from '@/visualizations/ColorPalette';

Expand Down Expand Up @@ -46,8 +46,9 @@ function getHoverInfoPattern(options) {
return result;
}

function prepareBarSeries(series, options) {
function prepareBarSeries(series, options, additionalOptions) {
series.type = 'bar';
series.offsetgroup = toString(additionalOptions.index);
if (options.showDataLabels) {
series.textposition = 'inside';
}
Expand Down
Loading

0 comments on commit bb87b80

Please sign in to comment.