c3js / c3js/c3

Unable to update the x ticks dynamically in a line chart

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

Description

C3 version: "0.4.18"
D3 version: 3.5.6
Browser: Version 61.0.3163.100 (Official Build) (64-bit) (Google Chrome)
OS: The operating system. (Windows 10)

Hi,

I am trying to update the x-axis ticks dynamically as I will be getting them in an ajax calls.

Just for clarification
In one instance I will get x-axis tick values as ['2013-01-01', '2013-01-02', ......]
And after some interval I will get as ['2013-02-02', '2013-03-04',.....]

Hence I need to update the x-ticks dynamically
I am trying the same scenario in http://c3js.org/samples/timeseries.html inside a setTimeOut function.

However I am not able to understand the way to proceed.

Please let me know if you need more information from my side

Contributor guide

Open the contributing guide

Research direction

Start with the timeseries.html sample mentioned in the issue and inspect how x-axis values and chart data are configured and updated. Reproduce the setTimeout scenario with the reported C3 and D3 versions, then determine whether the public update behavior supports replacing x-tick values from AJAX data. Done means the x-axis visibly reflects both sets of dates after an update.

Written by the indexing model from the issue text.

Assessment

Tech stack
d3, javascript
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.