c3js / c3js/c3

Label update doesn't stick if called after axis update

Open
#1,271 0 comments 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

I'm updating the x axis range min on my charts but I also want to update the label.
The label change does not stick if called just after an axis range update.
The label is reverted on the next tick.
Only after setting it a second time it will stick.

Example:
http://raldred.jsbin.com/pedulu/edit?js,output

To reproduce:
1. Click link once, if you insert a debugger before the call to `chart.axis.labels` and step through you will see the label change, then revert back
2. Observe label reverting

Temporary Fix:
Flip around lines 23 & 24 so `axis.labels` is called before calling `axis.min`

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.