Skip to content

Commit

Permalink
Do not walk unnecessary keys in truncate titles (#2487)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattseddon authored Sep 28, 2022
1 parent 4b6a18d commit ea5621e
Showing 1 changed file with 5 additions and 0 deletions.
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)) {
specCopy[key] = value
continue
}

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

0 comments on commit ea5621e

Please sign in to comment.