c3js / c3js/c3

Gauge chart has stange behavior in the calculation of its height when inside a small container

Open
#959 3 comments 0 reactions 0 assignees View on GitHub
C-feature-request
Dominant language
JavaScript
Stars
9.3k
Forks
1.4k
Avg merge
6d 16h
Merged PRs (30d)
1

Description

Expected: The gauge chart fits (both horizontally and vertically) the parent's container. No matter the container's size.

Actual behavior: when the container is below a certain width, the chart's height is not calculated proportionally to the width. As result, a blank space is left in the top.

JSFiddle: In the following example the container gets a smaller width in each 500ms, until it reaches 100px wide. The background of the container is gray to make it easier to see the behavior I'm talking about. Link: http://jsfiddle.net/a9hggfcb/2/.

Thanks in advance for any solution for this problem.

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.