c3js / c3js/c3

sub-bar label position in stacked horizontal bar chart

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

hey there,

i'm trying to create a stacked bar chart with labels' positions configured for each segment.

i have a jsbin [here](https://jsbin.com/tukequhanu/edit?html,js,output).

this is what it looks like now:

![image](https://user-images.githubusercontent.com/1835496/27261098-7c728576-543c-11e7-93df-d76236135fbd.png)

my ideal solution would be to have the sub-bar's respective labels aligned:
* on the leftmost boundary of the leftmost sub-bar,
* on the rightmost boundary of the rightmost sub-bar,
* centered for the sub-bars in between

![image](https://user-images.githubusercontent.com/1835496/27261171-998542a6-543d-11e7-8ebe-0c6268b21284.png)

but i'd also be happy just having the labels centered inside each sub-bar.

i've gone through the reference material as well as examples and not found any indication that c3 has specialized API for positioning sub-bar labels.

can this be accomplished with some workaround?

thanks in advance.

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.