Add ability to display duplicate labels
See original GitHub issueI am submitting a…
- Feature request
charts version:
LineChart v0.86 from @carbon/charts-react
Issue description
Duplicate labels get ignored and end up showing multiple data points per label.
Steps to produce the issue
I have an array of objects with unique dateTimes for every 30 minutes of the day, which can span across several days. The data looks something like this:
I shorten/reformat each dateTime before adding to the labels array so that the labels are more readable. The labels array ends up looking something like this: labels: [‘12 AM’, ‘6 AM’, ‘12 PM’, ‘6 PM’, ‘12 AM’]
If I have multiple days coming back, then I will have multiple instances of each time of day, which leads to my graph looking something like this:
Expected behavior
I’d like to be able to have multiple duplicate labels that all have unique data. For example, the following graph allows for multiple instances of 6 AM, 6PM, etc.:
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top GitHub Comments
I see, definitely a bug that we should fix ASAP.
I don’t think the time scales will be ready to use by end of Feb, but I’ll make sure this issue is fixed.
This isn’t directly addressed by #275, however the underlying issue here was the time-series relationship of those labels, which is addressed in the PR.
In other words, using the refactored version you’ll be able to provide your date-value datasets and get a result similar to the screenshot @bkrissIBM posted above