c3js / c3js/c3

C3 Js -- how to set X-Axis position .

Open
#2,609 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

Hi , is there any way to set X Axis position . my X-Axis values start from negative to positive and i want to set X-Axis to zero instead of bottom. i have used transition method as a work around but with this it gives some delay and we could see X-Axis going from bottom to zero position

d3.select(chart.element).select('.' + c3.chart.internal.fn.CLASS.axisX).transition()
.attr('transform', "translate(" + 0 + "," + chart.internal.y(0) + ")");

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the chart with X-axis values spanning negative and positive numbers, then trace the chart.element selection and CLASS.axisX transform shown in the workaround. Check the axis-rendering entry point and existing axis-position configuration. Done means the X-axis renders at the zero value without a transition delay and existing axis behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
d3js, javascript
Domain
data-visualization, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.