Skip to content

Commit

Permalink
update codes according review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
huqingkun committed Aug 5, 2024
1 parent e5ec33e commit d0963c1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/controllers/controller.bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,10 @@ export default class BarController extends DatasetController {
const stacked = iScale.options.stacked;
const stacks = [];
const currentParsed = this._cachedMeta.controller.getParsed(dataIndex);
const xStackIndex = currentParsed && currentParsed[iScale.axis];
const iScaleValue = currentParsed && currentParsed[iScale.axis];

const skipNull = (meta) => {
const filtered = meta._parsed.filter(item => item[iScale.axis] === xStackIndex);
const parsed = filtered.length > 0 ? filtered[0] : undefined;
const parsed = meta._parsed.find(item => item[iScale.axis] === iScaleValue);
const val = parsed && parsed[meta.vScale.axis];

if (isNullOrUndef(val) || isNaN(val)) {
Expand Down

0 comments on commit d0963c1

Please sign in to comment.