c3js / c3js/c3

Make charts inherit font size from parent container 1em

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

* **C3 version**: 0.7.9
* **D3 version**: 5.9.2
* **Browser**: Chrome 77
* **OS**: OS X High Sierra 10.13.6

I'd like to submit a PR to inherit the current font size by evaluating the computed value of 1em from the container (chart.bindto) element.

It's not 100% working yet (So far I have the correct font size being correctly applied to the legend, axis ticks and labels and the labels on bars / arcs ... and the legend tile size. It's also adjusting the legend and axis label positioning) but given your instructions about raising an issue before submitting a PR I thought I'd check before investing any more time in it.

There are some more things I need to do with positioning but the main remaining thing I'd like to do is adjust the axis ticks so the tick labels don't overrun. At the moment this has to be done by specifying the tick values in the chart config.

Let me know what you think.

Thanks. Dan

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.