ChartsOrg / ChartsOrg/Charts

Bar chart with two dataSets throws exception when re rendered

Open
#2,594 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Swift
Stars
28k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

One of my ViewControllers has a BarChart with two dataSets. It works fine when loaded first time. But if I navigate to some other page and come back, it gets re rendered. At that point it throws index out of bound error in prepareBuffer() function at buffer = _buffers[index] line.

I am not sure why it works first time and fails on re-rendering

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the BarChart lifecycle with two dataSets, navigating away, and returning to trigger the re-render. Inspect prepareBuffer(), especially the buffer = _buffers[index] access, and trace how buffers are initialized or reused between renders. Done means the chart can be re-rendered without an index-out-of-bounds exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
data-visualization, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.