Skip to content

Commit

Permalink
fix issue chartjs#11717
Browse files Browse the repository at this point in the history
Signed-off-by: Hu, Vince <[email protected]>
  • Loading branch information
huqingkun committed Jul 13, 2024
1 parent 0ca1b6e commit 549ce91
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/controllers/controller.bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,12 @@ export default class BarController extends DatasetController {
.filter(meta => meta.controller.options.grouped);
const stacked = iScale.options.stacked;
const stacks = [];
const currentParsed = this._cachedMeta.controller.getParsed(dataIndex);
const xStackIndex = currentParsed && currentParsed[iScale.axis];

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

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

0 comments on commit 549ce91

Please sign in to comment.