feat: add route and menu support for axis title properties#12517
Conversation
|
|
||
| if ( startsWith( k, 'title' ) ) { | ||
| if ( isUndefined( v ) || v === '' ) { | ||
| delete out[ k ]; |
There was a problem hiding this comment.
@gururaj1512 What is the rationale for explicitly deleting the field here from the object?
Doing this is not great for perf, so we want to ensure we have a good reason for using delete.
There was a problem hiding this comment.
delete out[ k ];changed with
out[ k ] = void 0;Vega's compiler assumes the property is manually overridden and disables its internal, orientation-dependent auto-positioning/auto-aligning algorithms (even if it is a signal reference that evaluates to undefined or null).
Hence, To let the Vega engine automatically compute, the properties must be completely removed.
| event.property === 'height' || | ||
| event.source === 'padding' | ||
| event.source === 'padding' || | ||
| ( event.property && startsWith( event.property, 'title' ) ) |
There was a problem hiding this comment.
Why do we need to push a fresh specification for title changes?
There was a problem hiding this comment.
I came across abnormal behaviour. When a property titleAngle, titleBaseline, titleX & titleYwhen changed needs to be refreshed first time and after they behave as intended and do not need refreshing.
See:
screen-recording-2026-06-04-at-43507-pm_nsScXjID.mp4
There was a problem hiding this comment.
Hmm...it's possible that there is something going on with Vega's layout engine. This could also be a bug in Vega.
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
|
As the CI failure is expected, I'll go ahead and merge. |
Resolves None
Description
This pull request:
Screen.Recording.2026-06-04.at.3.03.02.AM.mov
Related Issues
This pull request has the following related issues:
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
{{TODO: add disclosure if applicable}}
@stdlib-js/reviewers