c3js / c3js/c3

Additional data value for callbacks

Open
#547 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

I have multidimensional data, let's say just three dimensions: X, Y and Z. The scatter plot only allows me to specify the "x" and the "value", meaning the x and y axes of the resulting plot.

Is there a way to instead specify "x", "y" for the data values used as axis positions and "value" as additional value used for coloring or size of the points?

I tried specifying a (binary) color change like this inside the data block:

```
color: function (color, d) {
return d.value && d.value < 10 ? d3.rgb(255,0,0) : color;
}
```

but I have no idea how to get additional data in there. d only has the variables x, value, id and index, for example: {x: 12345, value: 23, id: "test", index: 345}. Data originally existing in the json data I supplied to C3 is not included there.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.