c3js / c3js/c3

Cannot dynamically change axis_x type to "timeseries" (need to do that)

Open
#1,940 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 do
chart.internal.config.axis_x_type = "timeseries";
I get this error:
TypeError: d.getTime is not a function. (In 'd.getTime()', 'd.getTime' is undefined)
and other bunch of errors

But when I set x: {type: "timeseries"} at the initialization level i.e. chart = c3.generate(...)
it works fine.

Why is that?

this is the complete code:

chart.internal.config.axis_x_type = "timeseries";
chart.load({});

Are there other variables needs to be set for a "timeseries" view which may automatically get initialized by generate function?

Thanks

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.