-
Notifications
You must be signed in to change notification settings - Fork 3.6k
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Axis options can not be cleared with undefined
#10525
Comments
undefined
undefined
undefined
The same problem exists with max and min options. |
Should we allow |
I agree in the sense, that we should continue to support Otherwise it would get inconsistent with the behaviour in all other parts. It is also easier to handle |
Probably a related issue: #10525 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! |
Hi, Can this issue be re-opened? It's still a problem on 9.2.2 |
Hi @jamesonhill, Modified demo: https://jsfiddle.net/bre1470/tr6shfy4/ |
@bre1470 Setting it to empty array causes no tick marks to display. In my case, I want to let Highcharts decide how the ticks are plotted. Currently it works if the initial value is undefined, but if you change it from non-undefined -> undefined the ticks don't update. Setting it to null and casting the variable to |
@jamesonhill Thank you for the details about your use case. @TorsteinHonsi The use case reads like we have to support |
@bre1470 Actually I think this is a bug, and in more than one sense.
|
Further investigation leads me to the highcharts/ts/Core/Utilities.ts Lines 297 to 300 in d29fd2a
Should be replaced with this: // Arrays, primitives and DOM nodes are copied directly
} else if (
isObject(newer[key]) ||
newer[key] !== older[key] ||
// If the newer key is explicitly undefined, keep it (#10525)
(key in newer && !(key in older))
) { @KacperMadej I'll mark this good for beginners, then it's up for grabs. Write a test, implement a fix and create a PR. |
For the records: It is also a problem that |
See: highcharts/highcharts-react#110
Demo: https://jsfiddle.net/43w5ch2L/
Workaround: https://jsfiddle.net/bre1470/tr6shfy4/
Setting tickPositions options to
[]
is working with rendering of Highcharts 9.3.1, though the previous options are still accessible viaAxis.options
.The text was updated successfully, but these errors were encountered: