c3js / c3js/c3

Tooltip Title format can not be combined with tick as categories

Open
#1,063 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

Using bar chart, and the next config:
...
axis: {
x: {
type: 'category',
categories: ['2010', '2011', '2012', '2013', '2014']
},
...
tooltip: {
format: {
title: function (v) {
return "Year " + v;
},
}
....
Without tooltip format, when event onfocus is triggered in the first bar of the chart the tooltip show for default "2010" in the title. But when using format, it shows "Year 0" when it should be "Year 2010".

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.