stanford chart legend axis without any ticks values
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.4k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 1
Description
* **C3 version**: 0.7.1
* **D3 version**: 4.13.2
* **Browser**: Chrome/Firefox
* **OS**: Windows
#2595
Hi all,
I'm using the new stanford chart feature and it works pretty well !
I just encounter an issue with the **legendAxis**, I will try to explain it. Here is an image of the charts that generate :

Problem is that on the right chart, the legendAxis don't have any ticks values. It is due to the values of **scaleMin** and **scaleMax** of my chart but I does not understand enough D3 to know why ?!
**left chart** : scaleMin = 3.614 and scaleMax = 21.74
**right chart** : scaleMin = 34.935 and scaleMax = 35.834
I've tried to implement a custom format function for **scaleFormat** attribut with some logs but nothing pop in the console for the right chart :
```
const functFormat = (value) => {
console.log(value);
return d3.format("d")(value);
}
```
I've created a JSFiddle with the issue on a simpler dataset if someone want to manipulate :
https://jsfiddle.net/grxcdvLq/
As an example, if you replace _scaleMin: 34.985_ by _scaleMin: 1_ in the JSFiddle the ticks values of the legend axis appears.
Any idea of how to solve my issue ? Thanks for you help !
Brest regards,
Leo.
Contributor guide
Research direction
Start with the linked JSFiddle using C3 0.7.1 and D3 4.13.2, focusing on the Stanford chart legendAxis with the reported scaleMin and scaleMax values. Compare tick generation for the narrow range against the working range, then verify that the legend axis displays tick values without breaking the existing chart behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- d3, javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100