c3js / c3js/c3

Suggest to add a clear data method

Open
#896 5 comments 0 reactions 0 assignees View on GitHub
C-feature-request
Dominant language
JavaScript
Stars
9.3k
Forks
1.4k
Avg merge
6d 16h
Merged PRs (30d)
1

Description

Now I have to define a function as:

```
function Clear(chart) {
chart.data().forEach(function (target) {
var length = target.values.length;
for (var i = 0; i < length; i++) {
target.values[i].value = null;
}
});
}
```

Contributor guide

Open the contributing guide

Research direction

Start by locating the chart.data() entry point and the handling of target.values shown in the issue. Determine how a clear-data method should fit the chart API, then verify that it resets the existing data values without requiring the workaround shown. The issue names no implementation file or test, so those must be found in the repository.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.