c3js / c3js/c3

Scatter and step-area combination

Open
#1,898 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9.3k
Forks
1.4k
Avg merge
6d 16h
Merged PRs (30d)
1

Description

When I'm trying to combine scatter and step-area charts with timeseries x axis, there is a problem: area chart is not rendered when scatter x values intersects with area x values. Here is a sample code:

```
var chart = c3.generate({
data: {
json: [
{data2: 1, time: 1480428610000},
{data2: 1, time: 1480428620000},
{data1: 1, time: 1480428600000},
{data1: 0, time: 1480428630000}
],
keys: {
x: "time",
value: ['data1', 'data2'],
},
types: {
data1: "area-step",
data2: "scatter"
}
},
line: {
step: {
type: "step-after"
}
},
axis: {
x: {
type: 'timeseries'
}
}
});
```

But when I change the x values of scatter like this `{data2: 1, time: 1480428640000},
{data2: 1, time: 1480428650000},` area chart is rendered properly.

What may cause such problem? Is it a bug?

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.