Skip to content
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

Do not walk unnecessary keys in truncate titles #2487

Merged
merged 5 commits into from
Sep 28, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions extension/src/plots/vega/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ export const truncateTitles = (
const specCopy: Record<string, unknown> = {}

for (const [key, value] of Object.entries(spec)) {
if (['data', 'color', 'strokeDash', 'shape', 'detail'].includes(key)) {
Copy link
Member Author

@mattseddon mattseddon Sep 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[F] There should be no titles in any of these keys.

specCopy[key] = value
continue
}

const valueType = typeof value
if (key === 'y') {
vertical = true
Expand Down