c3js / c3js/c3

Y2 behaves oddly

Open
#914 6 comments 0 reactions 0 assignees View on GitHub
R-needs-docs
Dominant language
JavaScript
Stars
9.3k
Forks
1.4k
Avg merge
6d 16h
Merged PRs (30d)
1

Description

I get the feeling `y2` needs better documentation, because it doesn't behave at all like `y`. Demo: http://plnkr.co/edit/XFUu193qu4F8dIfvG4L3?p=preview

They're the exact same graph, except the `y`-axis is set to `data1` and `data2` in the first and second graphs, and then `y2` in the third and fourth (respectively).

Observations:
1. The values on the `y`-axis don't seem to change, regardless of which column is associated with said-axis.
2. Associating `y2` with a column seems to remove the first column's line, regardless of which column is associated with `y2`.
3. The `y2` axis values change to reflect the max/min of the column associated with it.
4. Though not shown in the Plunker, if you don't associate a column with `y`, it will use the entire dataset's min/max. If you show `y2` without associating a column, its values range from 1 to 0.

While I get the feeling `y2` isn't intended to be used by itself, it's currently pretty confusing to use.

I'm marking as both `bug` and `documentation needed` given I'm not sure which it is — @masayuki0812, feel free to untag one or the other, depending on how you see it.

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.