Skip to content

Commit

Permalink
Update controller.bar.js
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham242k committed Sep 2, 2021
1 parent 7114a3d commit 71011b1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/controllers/controller.bar.js
Expand Up @@ -4,10 +4,9 @@ import {
valueOrDefault, resolveObjectKey, sign, defined
} from '../helpers';

function getAllScaleValues(meta) {
let scale = meta.iScale;
function getAllScaleValues(scale, type) {
if (!scale._cache.$bar) {
const visibleMetas = scale.getMatchingVisibleMetas(meta._type);
const visibleMetas = scale.getMatchingVisibleMetas(type);
let values = [];

for (let i = 0, ilen = visibleMetas.length; i < ilen; i++) {
Expand All @@ -24,7 +23,7 @@ function getAllScaleValues(meta) {
*/
function computeMinSampleSize(meta) {
const scale = meta.iScale;
const values = getAllScaleValues(meta);
const values = getAllScaleValues(scale, meta.type);
let min = scale._length;
let i, ilen, curr, prev;
const updateMinAndPrev = () => {
Expand Down

0 comments on commit 71011b1

Please sign in to comment.