[Feature] Allow strings for XAxis data
See original GitHub issueDescription of feature
The x-axis labels could be a list of strings, right? At least that’s what I have. But I’m getting a
Warning: Failed prop type: Invalid prop
data[0]
supplied toXAxis
.
Because of XAxis.propTypes only allowing numbers and objects for the data array items.
If you agree, I’m willing to make a PR to fix this.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:6 (1 by maintainers)
Top Results From Across the Web
How to add Strings on X Axis in iOS-charts? - Stack Overflow
I had to move let xAxisValue = viewForChart.xAxis xAxisValue.valueFormatter = axisFormatDelegate above viewForChart.data = chartData fr it to ...
Read more >pgfplots using strings *from data table* as x axis labels in bar ...
1. When I add col sep=comma to the table options of the addplot command, your example compiles fine. · Wow, ermm.. · Ok...
Read more >Labels and string formatting - Highcharts
Format strings are templates for labels, where variables are inserted. Format strings were introduced in Highcharts 2.3 and improved in 3.0 to allow...
Read more >Analytics formatting per type in QuickSight
Specify axis range and label tick on the x-axis and axis range and step on the y-axis. Show or hide axis lines, axis...
Read more >Line Chart - Google Developers
You can smooth the lines by setting the curveType option to function : ... row in the table represents a set of data...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i am using
formatLabel={index => data[index].yourValue}
to call an item in the arrayAs JesperLekland mentioned, xAccessor also works well:
https://i.imgur.com/ua6v54n.png