[charts] tickerNumber
doesn't work along with valueFormatter
#16350
Labels
bug 🐛
Something doesn't work
component: charts
This is the name of the generic UI component, not the React module!
support: premium standard
Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/
Steps to reproduce
Link to live example: https://codesandbox.io/p/sandbox/test-muix-log-87lwwq
Steps:
Create a LineChart using log scale with property tickNumber on yAxis
Then add a valueFormatter function in yAxis
Current behavior
When the yAxis.valueFormatter property is added, the tickNumber no longer works.
Expected behavior
The property tickNumber shouldn't be affected by valueFormatter function.
Context
I am trying to change the format of tick values on yAxis, example: convert 300,000 to 300k. However, the default formatter from MUIX doesn't do that. Then I use the property
valueFormatter
function to fix that. However this causes another issue: The number of ticks increases and the yAxis has too many values that is hard to see. I tried to fix it using the propertytickNumber
but it doesn't work along withvalueFormatter
.Your environment
npx @mui/envinfo
Search keywords: valueFormatter, log, tickNumber
Order ID: 98924
The text was updated successfully, but these errors were encountered: