:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(charts): make quill legend truncation context-aware (#69279)
Sam Penningtonc5d5f5a1402e
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex a1bf979386fd..eb2752fffba7 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -645,65 +645,65 @@ snapshots:components-hogcharts-defaulttooltip--total-excludes-overlay--light:hash: v1.k794b7964.0ef742f50f4f5cebd2c50b24b514c90a101012d53f3cb61e3b461f5ff0864d9c.h-i6FX0wnz_8r7gxr3pus1F2U1i-hcsuXZQ8drcM35Ecomponents-hogcharts-legend--built-in-toggle-bottom--dark:- hash: v1.k794b7964.e2b1c189d66faf11314a82017d5a7aca4107f7f0cb916e804cf068b5a7154721.72I51YD9BzGNxkgpRt-mizyxBpbLwdZPszKHiYzgRpo+ hash: v1.k794b7964.bb7fd009c6bea74119d317347fe7d6dcd977f59e10bfe73d641e305c8df1c949.YlAqy3cuOfkX3u0lLP5gPrBnCIwk5tPeoZFbe67G6uscomponents-hogcharts-legend--built-in-toggle-bottom--light:- hash: v1.k794b7964.82b6b1ff227c3bb2e8355b6e6462226df2d4bd3615a77896d97b2449a7cdaef6.5ThNn4VgfWeyo7k0n-gEWnJ-FMfPQOu9LNYQX1GYLJc+ hash: v1.k794b7964.19fe55dd47e8aeb0b5d951313c1c2b2dccb4b85a842d37b925d4a68dabecc48a.EjKGqpsz8jQfDr7evh8YyZhMJQGXJ9jv7U6SZTUkYSAcomponents-hogcharts-legend--built-in-toggle-left--dark:- hash: v1.k794b7964.b7918982520a3c86dd974005cac17fad973bc54f624dc1577db01f4de7ed41be.lX0BgCiQ2GgDUPx9fyGlfMSN2Uim4isRd4GzJmMpfrA+ hash: v1.k794b7964.e289e4792998c305372bac5ff05c4ec12887593dd28668c772309d9677f831e8.-Iiprap-cpMvwy6L6vv65zB9pCx9WFz6nvkgZXotxO8components-hogcharts-legend--built-in-toggle-left--light:- hash: v1.k794b7964.45d42961ad5e626a944e0f5c080fdbecc454879da8a2cdbe2ad2a6e2684972a0.9JsRpNc1wYFlEsRPZoL0O-LLdUIGiFIeWyvj1fiD07I+ hash: v1.k794b7964.0ba528cc5d8f48ea48430bd8d6ef949fef1998a291bc4f3ecab083c42767ea80.ToOv5ndHEQkxcC7xXHnTZVKNGrYBOYbHiABwQhgNRKAcomponents-hogcharts-legend--built-in-toggle-render-item--dark:hash: v1.k794b7964.7bb3271baeb53355873c97695f15304f5cc9479c3dd1e8e63a8d8bdbd5bee3b6.UmPvcn3tSvV0PauN5SkPLjnIvAXwjZ1WGtEb2o8nHOUcomponents-hogcharts-legend--built-in-toggle-render-item--light:hash: v1.k794b7964.87ebe1563c7e89e48c97f71b4ef96ad18f9c4603b8793af03ce54b092294df3d.jvgL0pca2AP_oK9AFT-6K8JYQg6WWP1P4IIkliLLStMcomponents-hogcharts-legend--built-in-toggle-right--dark:- hash: v1.k794b7964.7fc1e43f216ce2eee5e2a834f98769a9a9872c75fafda4c1a1965be8df130f73.KzRKkr08A5xybam7j5KybxVcalEY9oAyFCM2A9pR5qs+ hash: v1.k794b7964.0c45ff5653cccc04b6a9a74f1dbec2f3ca7e42dd1e880ce1e3f2cb9646ea1b21.6NoVvVPY9bbkbV52JIPHiikwHlH5N00bAI8daYhEFOEcomponents-hogcharts-legend--built-in-toggle-right--light:- hash: v1.k794b7964.17728bea8eba3d28f4c755e1c360096ac1e00691da2dc30b0696b8f21f4d54f8.IX7aReBoqZpoxEF5oTBgi_8RAF9XD2qRvYqJeYuUPR0+ hash: v1.k794b7964.e5495540634fd6d68af5b33c3204b6dc94317b9f2ed8917edaede196d04c5f68.ktC3SbZ06xZJsiofiVBTO0TctiSu1TdUZ9Q8xP_3NIUcomponents-hogcharts-legend--built-in-toggle-top--dark:- hash: v1.k794b7964.31cf43f4028e4e9d52ed4a072c4f2e2127200869c16ae295bbc200bc62b5ca0e.OrVTDNk7JvW0pCcfsB7x303fJNcTQOl7rYqYdKYkLuI+ hash: v1.k794b7964.0829513af4385cefe0b129996ab15f81550b18ddec98f10e04c918a68fdb0b28._2Zq15izHIvJYK2NmXI5_7ZR_2YzM0JfFPEm17k4FGQcomponents-hogcharts-legend--built-in-toggle-top--light:- hash: v1.k794b7964.a17c772c6170c3d697a4f62c440f081e52a786a8977eaedc61be167aabe47489.-O8vP5O0iO9Yone6FG0z3GBR6maPEfJgzQtrZ-8x5sI+ hash: v1.k794b7964.8fbeca7bcdb4c86b8a018582407f37949275d2a7ab2e0adfd9efeebd496c15c4.3a0lrO5ezOOBw6QQLhfuIGn6TDzyLRQipzaxOflp7c8components-hogcharts-legend--horizontal--dark:- hash: v1.k794b7964.7d9a1b02b541685d6da769a4cc388b943bd9aef4a419c02d31896af06af36c9f.DEoSO8Jh90bya8IlUbxB0GoZzO_IofxVrkFV7iR_FHM+ hash: v1.k794b7964.daa45523f3b31ee4230c8e555d3bef1c5d223c61698499bd1d6d58b1f2a99829.7ZSUVA0RnZx4SOQ8Tdlb5ohjr6UUi_ZaN1NbROxeccscomponents-hogcharts-legend--horizontal--light:- hash: v1.k794b7964.67775831f770faa7fa2144911a0020381a5e1e21dfffdd32ed25e99cf3e5f9b7.4kiKiAnZcj0WSvlxqt7MPTlMXNLetAZMz3hCEOdFld0+ hash: v1.k794b7964.59e42ba7d18968632965874267d8e8550907cafe9523a5139d752918e19f26a7._PPw8voOw30nJuiDLdhf1gls_8r46qpeIxhAMfTy1Zkcomponents-hogcharts-legend--interactive--dark:- hash: v1.k794b7964.7d9a1b02b541685d6da769a4cc388b943bd9aef4a419c02d31896af06af36c9f.ol4-RFRfXsP7rSJq0Q3V7AjtnNZQfhpUc39SUU3jMJo+ hash: v1.k794b7964.daa45523f3b31ee4230c8e555d3bef1c5d223c61698499bd1d6d58b1f2a99829.jNlj30eFdo6Zlg8AXMOliarlUgWUTcNU1S0NJD4RuSccomponents-hogcharts-legend--interactive--light:- hash: v1.k794b7964.67775831f770faa7fa2144911a0020381a5e1e21dfffdd32ed25e99cf3e5f9b7.SkMN2Bt9ZLrDR6Mn8upsutoW4Sslplo5RxGWewU9eOU+ hash: v1.k794b7964.59e42ba7d18968632965874267d8e8550907cafe9523a5139d752918e19f26a7.6z5XbZoL4S6iejJk2Zl-4TP6vyw6k59RlrXda798uNUcomponents-hogcharts-legend--layout-bottom--dark:- hash: v1.k794b7964.e2b1c189d66faf11314a82017d5a7aca4107f7f0cb916e804cf068b5a7154721.FvksEoF8_8stmM0DWZuWcCz2UittBJ_N4pk9G3hscg4+ hash: v1.k794b7964.bb7fd009c6bea74119d317347fe7d6dcd977f59e10bfe73d641e305c8df1c949.YhcFiODmj9GxzOzWlWH_OzmPL90coaWuH-viMmBF64Mcomponents-hogcharts-legend--layout-bottom--light:- hash: v1.k794b7964.82b6b1ff227c3bb2e8355b6e6462226df2d4bd3615a77896d97b2449a7cdaef6.2liVcGZYt45fCt5W95oKy71_kyYKvue-IGWU7Idnht4+ hash: v1.k794b7964.19fe55dd47e8aeb0b5d951313c1c2b2dccb4b85a842d37b925d4a68dabecc48a.7GDV8n7rJ3Yo1g2iHVVaUw4eQgg54AmOYi4qctYl9Hwcomponents-hogcharts-legend--layout-left--dark:- hash: v1.k794b7964.b7918982520a3c86dd974005cac17fad973bc54f624dc1577db01f4de7ed41be.Lktr1D_T1roYknDgdLEU6KT63V6h7JhjyV6FfNjfqLo+ hash: v1.k794b7964.e289e4792998c305372bac5ff05c4ec12887593dd28668c772309d9677f831e8.xHxq_PpAYLUQ9XmNuXOz3GK70hSs0g_jCmPpjywFsC8components-hogcharts-legend--layout-left--light:- hash: v1.k794b7964.45d42961ad5e626a944e0f5c080fdbecc454879da8a2cdbe2ad2a6e2684972a0.Bqb0bXg3mw63WhLBIHnQLLV0SoXebSdkljACbMqwICc+ hash: v1.k794b7964.0ba528cc5d8f48ea48430bd8d6ef949fef1998a291bc4f3ecab083c42767ea80.gAT9yeeMEVS-_k1EIGbqZl8fZi3MhGbYFfBK9v4TSrkcomponents-hogcharts-legend--layout-right--dark:- hash: v1.k794b7964.7fc1e43f216ce2eee5e2a834f98769a9a9872c75fafda4c1a1965be8df130f73.nP7ma0Rh5wjTOSbu01tSJvjF7uqxUR_QtjpnNHEHO5E+ hash: v1.k794b7964.0c45ff5653cccc04b6a9a74f1dbec2f3ca7e42dd1e880ce1e3f2cb9646ea1b21.7GOYm85v9jM61nbELJVOrzA4hGLCkgz1Qt_yFsHVDr8components-hogcharts-legend--layout-right--light:- hash: v1.k794b7964.17728bea8eba3d28f4c755e1c360096ac1e00691da2dc30b0696b8f21f4d54f8.gQPEmyQw4lLaHGlk7GUFAyHg4DuLwCSE5e6cxwFoB-0+ hash: v1.k794b7964.e5495540634fd6d68af5b33c3204b6dc94317b9f2ed8917edaede196d04c5f68.mnUcNt1otrbDaqc-2I_7ww5FgDAB9iaxpQ2AeSrzghAcomponents-hogcharts-legend--layout-top--dark:- hash: v1.k794b7964.31cf43f4028e4e9d52ed4a072c4f2e2127200869c16ae295bbc200bc62b5ca0e.EsG-5eqO5ALl_Qa4RqO0GmKrknrgAJ8Yn51jFpvzy4Y+ hash: v1.k794b7964.0829513af4385cefe0b129996ab15f81550b18ddec98f10e04c918a68fdb0b28.1fuPOpFvhAb-XA7yoXOYeocQ2Owku_vhYNJ-dSkNEGMcomponents-hogcharts-legend--layout-top--light:- hash: v1.k794b7964.a17c772c6170c3d697a4f62c440f081e52a786a8977eaedc61be167aabe47489.q9bW2znHcUoPyutFXYVcIpWWe0Wx1NssnzNQGcAVYDY+ hash: v1.k794b7964.8fbeca7bcdb4c86b8a018582407f37949275d2a7ab2e0adfd9efeebd496c15c4.PYFiM4znNquDvcau7UfvTHy7xfKgw-vnO2Pv0G5yYZscomponents-hogcharts-legend--legend-hidden--dark:hash: v1.k794b7964.417591a464c5d90443535783f8b3308eefdcf407b88b492ae20d5e98a8e815ff.WLnH56E-fYhNCt5jvOCeHwLC004qIyP952D4MArBdKocomponents-hogcharts-legend--legend-hidden--light:hash: v1.k794b7964.8a994521ae672c3bfe178cc636f29fafa207434181d1c394a9a197c4baf6103f.ZcIzvcwYHABKnjW9k_0yaOdALKWXCxs93PBHSkkm-XQcomponents-hogcharts-legend--long-labels-truncate--dark:- hash: v1.k794b7964.7011348473d60c5015b8901aca9fa94421c9b5be510d337bf587db855ce9b34a.qEBUMnDsUCaN9ykwvEE5xg6INY0Ux1TA8B16yDCuiX8+ hash: v1.k794b7964.bac06f7e5a7fd0a77d005a8d72ceb938c307939f4a813cffff8dbdfae42d8830.bswthdTg1bhKLGU736pbPduu6BuyFedQiMW67Msh9IAcomponents-hogcharts-legend--long-labels-truncate--light:- hash: v1.k794b7964.c0bced4ae4231da7e7d8e5168b6dfaf4062f29197fa50e28cf45b4984b92b2c4.7MJVJ2ewrtDAsRsKYRAOKvqedQaEhfW2bevA1na3E3o+ hash: v1.k794b7964.dbd7520262e3bcfbfb2d63cdf86b571719e4d747ff438411760741452e047ed4.CeL4sukIUA8-B2G-T8gFyemDbvLZ3pXmQIpkHyoKj0Qcomponents-hogcharts-legend--many-items-wraps--dark:- hash: v1.k794b7964.1b02a8e09443a2467b16e8b01a252a33a6037e1a82af96cf28a0446595a7b4c8.LSghldODLPSyuakvufmYty12qVdBCET8lltUt4Bq1u8+ hash: v1.k794b7964.a7b5c2c511f76aec9911fc6c001011e531eec71f4820de93e53bad297dcef124.-MwbjRhakqx3hNrP1Mpws9Fldwr4nqbGDWiBXJr-FDocomponents-hogcharts-legend--many-items-wraps--light:- hash: v1.k794b7964.4a367d7f736da4e8f0691b98d3d04aed15c75f1f0dbda28ae75aded65b7b1072.xzb0DKWhILKgC-1VEnolxfqy-S-fRGrsD7pvw6BVlqs+ hash: v1.k794b7964.d4b2c4fdeb9d5b96bf7ddaf52a55d6b1cb7e8f9e853d3022e22c223ff228221c.23UOQu_BXhLGFC7hEOsllLqbBTgYxLpfHT__R3pF-AUcomponents-hogcharts-legend--vertical--dark:- hash: v1.k794b7964.63ef5f8d822574ef0b0657cb45fa66028a99577e2c9c6f0eeb1eb265184405b0.p6RqaG_0AOyG5CGRx5azfifY6E5QUG1C9xCkUCiO8Lk+ hash: v1.k794b7964.cee476f6ba8cf719932415d7dbd4b5e3676b29f0f06d94d36a961f48886f341e.4oZRbFwpS_sD_8M6IuFr-SKDm4Vvmk4VhvUr_LVpMlAcomponents-hogcharts-legend--vertical--light:- hash: v1.k794b7964.7a3daeb0c0d6e5b7bf10d2f7e848b238ed1e6b3580739b6a2d7fcab6544df796.k_FzvoNOVuZjjjBV_VYMYEUaxIlS1Yj1DH8AL4CNqT0+ hash: v1.k794b7964.2a05ac06ff596da5774c5e6ec7bb6029d634db4ecaf315628600c60819787c28.u8q-wm5x1b_jgTZO6XvOCYOZqyG18Gc5u3U8OkXo8EAcomponents-hogcharts-linechart--combined-overlays--dark:hash: v1.k794b7964.418ddbcacf7c02d03fa080722bf10bd4c4dafc00ef136cd75d21232f5cebe084.DQPxa0_gwUwR4pZd6Uv4MbdLe89xGXs7yGxzEhEkELgcomponents-hogcharts-linechart--combined-overlays--light:@@ -873,17 +873,17 @@ snapshots:components-hogcharts-slopechart--incomplete-end--light:hash: v1.k794b7964.08c98cc27efdfaeb5e1cd948c290dd69068b3643b444769634fd08ca3489fab6.Qi9kWsBfr4UutZ63OGi6TDGiwf5JAHALKeWyPFD6LCMcomponents-hogcharts-slopechart--legend-right--dark:- hash: v1.k794b7964.1a905fd6f6c3ab1202a8eb52788bad211cb68ab1da092b1f0c0d234dc9d33d56.9dHZO6Uc1EPykwcIl-d6fcJgJG16FIYb2QRh9NSiCp4+ hash: v1.k794b7964.9995ee0e96b3d4657a397bf008558ed65d6d5b7326308a34dd714a80990c02a2.u6kMG-iVd9IaVeaubb0JeT95vyWw99wa9AgeaETTG0kcomponents-hogcharts-slopechart--legend-right--light:- hash: v1.k794b7964.885b39ecfb39677333eea75297c517736a7051abfd8804783af83445bb066920.R7pNDvr4A_IB1MFr2_ac9FejTDDKvRZuLq459HFPZtQ+ hash: v1.k794b7964.a49649bf6bfcad06c12276ab51fea6ae3f95319eec55bd609f05b762679f3694.VIpJhLzyt4XzrdKkfRSMdK1zilgyqzqD6Km0gIqs6vEcomponents-hogcharts-slopechart--per-series-value-labels--dark:hash: v1.k794b7964.48023d79d6eb75009d06af8de372e6e5cde0c9b261d0593b5f03f5c6cd48eff6.k59x1e-8bFbPZOv6_hlbG0dKphFhjPnGZjfEO8VlTEwcomponents-hogcharts-slopechart--per-series-value-labels--light:hash: v1.k794b7964.bc6dd93517d9476f237437448b5e95b0d008cf9fcbf026a3581b8877a856e0f9.hMt7bF1al6LNPytT_UmwdWFRbGgqmHI8ZA8Nvz20wVIcomponents-hogcharts-slopechart--with-legend--dark:- hash: v1.k794b7964.e69cb9f2531833ce03f4381d65691ac9c96c15cce1badc7a1611bffdd1c6d7d7.H0Ox0y9UpjkPDdCwaZHbXVRUmOAZVYDhRMttefhHISc+ hash: v1.k794b7964.1f3e7bf00dbbb0b20d544c1409f8ea62e541e9ec78cb66dd0e28fb1387e10783.IYBUYOMiujR5aOqF7P68j1ihsvzGZd0MmYmcwmS1UGUcomponents-hogcharts-slopechart--with-legend--light:- hash: v1.k794b7964.c3c0fa6d2626d3d153b245808f5f3a36cb0eebe621d66259e839bfa7e378f8a3.2dbm9-veIiPoJotdXj6GfrLzPv1W4cP356GvExD9TXo+ hash: v1.k794b7964.44279652725003a08b350f693742bd699fe6443a9b4c9eae8b1182358b903614.LdUC_a_rPrpsZL5-8bPhAurobpq2OclUp0lKj_hIdB0components-hogcharts-slopechart--without-series-labels--dark:hash: v1.k794b7964.298a8b5041dd7d331feb2af9f05f88f46c3a7d9d09ff3518931bab2635105bac.riN9w_kEdcqhVqOTuZT46yyaIU2V9zSeTCjuCZ3D3hscomponents-hogcharts-slopechart--without-series-labels--light:@@ -941,17 +941,17 @@ snapshots:components-hogcharts-timeseriesbarchart--y-axis-formats--light:hash: v1.k794b7964.389c691abc637e71b62ff6f5f80ff49800ee9bd46d68160e9ffcc96b44292a4e.meBqJYZ6X3znIeMgPgHkgHquG_NpXsdthR9puntzZuQcomponents-hogcharts-timeseriescombochart--basic--dark:- hash: v1.k794b7964.fbce910300e81ebad0f9843c03b184c253f324b776ac1924325f027e3532083f.ELref2ayNEYLyG2Br3CErOCHjG9ofdzPlnZHq1TL63o+ hash: v1.k794b7964.34e2d06dbbeeb9716f1e90a2a109d5207bc11359ce078f7f8044408e12ff2b4e.9mpVlFHXdaKQOgGw01AvtLyhJtXvO2hrqlzZUZZffOYcomponents-hogcharts-timeseriescombochart--basic--light:- hash: v1.k794b7964.04ca30afbf0951084d20c394aa9786f192940b90b70842f86f653c72582ae92d.VYHD45FjSc-pijQhtVAs18-ouJnVEj80jC3Kg2wZ918+ hash: v1.k794b7964.194a16b8827de77cc0bac129fabfaf6282454ca87584c7316910e4cbae0458d5.hb9h5W2k7WMaAZHgb4cvgAxkSPgAwxcFLC4VJeFPLYUcomponents-hogcharts-timeseriescombochart--dual-y-axis--dark:- hash: v1.k794b7964.e9c96e06bc63510a5387fcaf8cd2dfb25a09b26596d5ebc503d0f0d7a5fc4310.0k3p7v2WvQmZBy8qqXykHDlOG4qvV7NavTVtOiD1WU4+ hash: v1.k794b7964.9b768b0c71714fd3b38cd84ddc5c844ffe98eab116c60e17392629e65c6ca047.qsrHEkiwRhPYPu4spBeHvS130Yw1mFTgwZZOvuUS-M0components-hogcharts-timeseriescombochart--dual-y-axis--light:- hash: v1.k794b7964.9aaae91e26996429e73b8ceaa72c82fdf8a6d81a1c79e0dbc362f5f17cdc8228.2D98tWHkuflb8mKFCISDCbpf--jSeZLgX718WEGWJv0+ hash: v1.k794b7964.2433d00c42553c809b8ce926778c3f7ed881798132551ed1cb5599277dfb074c.-tnLrJmu2tLoJ9SqvplMDG9kVtVX7e3P6c2zWVvXCcEcomponents-hogcharts-timeseriescombochart--stacked-bars-and-line--dark:- hash: v1.k794b7964.e8c7307f4e44fb26d3f9f5dc1b967d729bfd8e5166aa88151a315436896c70d7.RM1IOo5-rYMTwEBBDJ9mFqvV_-L-IXgjiP0El7XqnGI+ hash: v1.k794b7964.546b4d51cf39544bf536e144ef86d8f16d1480d3c2b90099055c6450242b561f.HPXibpO5b3iUR5Ampg1tacNQAF8aGxKY5-JiUwZ4uDUcomponents-hogcharts-timeseriescombochart--stacked-bars-and-line--light:- hash: v1.k794b7964.710a7798820c3ebc50d4ba578cd86434bf3e1235998731471958a285b0bf310f.1jytmlcRLEQce1vDY1tN8Or78Y2q3gCzYDXvC8uhF2k+ hash: v1.k794b7964.51a9a256fec3bdd350e14f2ef266c20c2747fa94e1e6f41681d54d6cc1f74f92.G70Ri7_jK957OWi6rHr-UzIwtO52SfXPahyfjZbreEkcomponents-hogcharts-timeseriescombochart--with-goal-line--dark:hash: v1.k794b7964.30e7fc41bf6de6160dc729a1e2e80304ed77177db9bf5f531c6aacd40723c21f.e0oqaOMmoH-aFTEhf8NC06nhrs3RQuROWLP8v2a9dxkcomponents-hogcharts-timeseriescombochart--with-goal-line--light:@@ -2653,17 +2653,17 @@ snapshots:insights-retentionlinechart--realistic-curve--light:hash: v1.k794b7964.a676a22c376a69efc58f71bc328ddccb3d16e34f8d5b833d2a74ddf3db70d482.34ys4jWcmKwIvZ07aOeBLI8RTRbepooFqJUzMytMHb0insights-sqlbargraph--grouped-bar-with-negative-values--dark:- hash: v1.k794b7964.96661956bfb88def6ac0978969ec4bb3187c27d740ac267aa7c003d5dc88d98f.kSlPtFZQ4s2I7ssZRA0qLUthG4IpVsO1yPjXlnE5vhM+ hash: v1.k794b7964.30f0bd4f2ebd899771264c9215cf4802fa6726e0f9ab5adf2a5d484e7ce45282.EdXsaOfbOBWfrCQnXD6-rY2gxz0i9-VrpLv48vOlRHUinsights-sqlbargraph--grouped-bar-with-negative-values--light:- hash: v1.k794b7964.b235c2b03f5cebfcc9e0344ad4c3d09057e47a8913a0cd958570e39417bff572.nT_3Icz6F0NMqQg0Y3RD5uqZj8q5e-gYR-IJmsLoDzE+ hash: v1.k794b7964.cdf53eace47e2f2fce1937a1277d1ecb1cb6e86c80cb29ca985033a1886b292d.i3EAMe_iYRObmVlgVJIyt-R1Sb5i6Cidtx2pidGnX2cinsights-sqlbargraph--stacked-bar--dark:- hash: v1.k794b7964.455dd9370e551548a689c548c9f80f4cb8f909a9a37a744e90c8b1803bc318b8.ObBczeEAiHxme10OUevCul7_Uefq2pbjOJFcYglOdA0+ hash: v1.k794b7964.50b7e82e96bd587465d600798bf7b0340ed36a61ca78b3510fee47a28e92fd82.zqWeM1P7-0e3ktpffEO8KB86X7bg46MYjkwx-2LxFdQinsights-sqlbargraph--stacked-bar--light:- hash: v1.k794b7964.6b8dbb66da73ce0719af51d0b035072af88aaab3f8575028b70f0c925bc6b82b.wTqMYDh4pIYJdWHmhKcd5eRZazowSX9o58X-Znp1VuY+ hash: v1.k794b7964.3fc2d3e1b2b7077f0210927cce10559bc62cdb14695007f12db7336bfe8620fc.vnqGUn6FT37B5HO_Qx52nzbuIzDXSsRXAgCC3Xso5dginsights-sqlbargraph--stacked-bar-with-negative-values--dark:- hash: v1.k794b7964.f1d4f08820b41780902ccf0a56d5b05315b6ae420da662caa4d621d6eb5a9e2f.9nCqJx4hFHmL-fWYrrC0FBI65AU9Q4-C41iymlMKZHk+ hash: v1.k794b7964.6e981a67ab0e1701649376a7107c0df855c60a358f129a6368fc6f7c29cabc43.gR3VqkMo_lYw0UHhtKHZOG1fxso9Z_XJjciJHEOjv_4insights-sqlbargraph--stacked-bar-with-negative-values--light:- hash: v1.k794b7964.013320c042e09c007de0763de69835764030d60201eb747b42fa4a737398e7c9.vNmEaCqqYeN4wXeu19Sg26CTTSMs2q4yH3fHfBqPSNg+ hash: v1.k794b7964.0036b40d8f70aa10c91ff49711dc1862219a5cdd61b5d9559d33fde8c44b5acf.NItC8I3iM9vwzhz2fTOx1Liahnb43I0t0aD7MAwC4Fcinsights-sqlpiegraph--breakdown-colors--dark:hash: v1.k794b7964.459b2f2dad813b806560c40f292c41503482dcc864756aa5c27e936ef6ad5890.35VUrVQBDx9LxDWhN1L1896BV62m-OhK3d4ujQHrU5oinsights-sqlpiegraph--breakdown-colors--light:@@ -2717,9 +2717,9 @@ snapshots:insights-trendslifecyclechart--stacked--light:hash: v1.k794b7964.2ee854f974a56d5415734a402cb2624a48d1bbb66a37bd0dcdddd7cc5429ef3d.7oX-daJquN3RPuK4D0tzDTQLJZRbaqmgmkrrPjZRsnEinsights-trendslifecyclechart--stacked-with-legend--dark:- hash: v1.k794b7964.f6d9132c236f1e8af9001aed46ca8d4a41c8cb7ba8859100a060c448c5063ed3.68RAlbBhYPArxIYvF8MO6Lq4-yCtaVyepbkJZoPp3JE+ hash: v1.k794b7964.0b08fc217dc1bcdcbda752ceb4cbb857a4572c7894dafa1ef532e77e6b2226ab.BYWA_lw_d3rtDMQtv5jJEPbaOHbiS-LMgwbUyXawTxEinsights-trendslifecyclechart--stacked-with-legend--light:- hash: v1.k794b7964.87cb43bf1dacbb83ca7211829faa36fef5dd506e006dd906e46cd280cadd0b71.KPTnq3NiT1vuiqdrxWfqg5PMPgHlD9fC1wT6L5V6Gcg+ hash: v1.k794b7964.3d52b5ea821a1d1791a9b45f7ebeaa3655fdbc1898e297e1d0dcf1afb5827c9a.3-JrZCBBFyHGa5BW08sjU_Ku4c6a3i09EQ5TMzO-zhoinsights-trendslifecyclechart--stacked-with-percentages-on-series--dark:hash: v1.k794b7964.23dcd5e543068113cded5111c26cb231d47e9dffb434393a931a869475a82450.5jWPw6-qeCtsgvsQbHSjljpFDkyWi3HB-wGljml88jUinsights-trendslifecyclechart--stacked-with-percentages-on-series--light:@@ -2737,9 +2737,9 @@ snapshots:insights-trendslifecyclechart--unstacked--light:hash: v1.k794b7964.1d01deb9c9081a6ad5e5554fa0efb1df960051a8663d037000599783bcdb3873._yrVG5fErPmwKntTMK9MmgqTrAsOdo20FXhPqKD-39kinsights-trendslifecyclechart--unstacked-with-legend--dark:- hash: v1.k794b7964.2cdade11cad96d0375d9a1a484f10d5e14413f3dff4cd2530a99ee30e6675e94.qaeo7SMJOJmbmnTjtMaUUop6sJAMq1X1FNmI--nsJYY+ hash: v1.k794b7964.856f14c93e33c9b62fb1a7d5da53cdcdbd6c3b7b500c9724c37f14a72691b808.HsVZ2-ky1eC-p9T8OxgpJXIx868TfHP5NIrEt9B7Bq8insights-trendslifecyclechart--unstacked-with-legend--light:- hash: v1.k794b7964.9bcf7b4031885ad1f8bf032e37df346de811365322b3a9c8310311e299a2c9a3.V8x0iEfjbJc_8bNNDxCCPYU0yb8m6a56_V3b7Sq8_Zw+ hash: v1.k794b7964.40cc3134e647b31e60629e55eee96927e09ab1462e01302663be17ba14045a89.lFNkmmEBPv2xj2ZPEAjlEbK01MNfHLpona8bFzzTj_Iinsights-trendslifecyclechart--unstacked-with-percentages-on-series--dark:hash: v1.k794b7964.09d3581e008cc47c1cdf66360523c268cc9d40ae383ec3d2f3b65bfefab0f167.OsiKUWmf9lDqII1iDRCe39NG43E2opGn69vs6l3XyaIinsights-trendslifecyclechart--unstacked-with-percentages-on-series--light:@@ -4413,9 +4413,9 @@ snapshots:mcp-apps-insight-actors--with-recordings--light:hash: v1.k794b7964.6bc38bc90689750e45b0eefa5974ce2e0fee05f581a64552835accca3914ded3.5ZInU5bxqbu_rkPp-prY1W5D2hsW8hn21EAwNfRjf_gmcp-apps-lifecycle--grouped--light:- hash: v1.k794b7964.5c33ba0a4dbe6cf279197eadea244d7b9838b99d80b8ba2b899df7ca881e066b.GNSIWjjq4NaJTgY9UUDYIXoxNuzz74X5yRL5TuFPO_Y+ hash: v1.k794b7964.a16ed9cc47e97da7d6604365a64ed5d1ea1d0da1e1b0e811f307f98562696097.STlHdu4MjbT2dlQshmYxtk9Uak-YWsJ_6MKyOdNKDVUmcp-apps-lifecycle--stacked--light:- hash: v1.k794b7964.ba05f9228b85cb77c43ddf41d7c4612123546422dc1ab7adea5c2f0ac57fede1.5HaCtwm-U2r0pTewvvTY96rwrsRFfyk9dh5liLtVxkI+ hash: v1.k794b7964.5f3c6d9ccd34e3f1ffd0efff84ae33dc1316187d1b365bc2a72f57fa2a4134db.tiRYVRMLhy2k30EEdLbYCfsDOEhVWDnVS7I-VZK8arImcp-apps-query-results--single-number--light:hash: v1.k794b7964.b53e77f7c428fe5d86903e3bee082eb7c752f67fb3225c043229e4b713debe69.hhBuSmExHBpDioDG9Ij-4qfvVhG77IC5FNYierdlZq8mcp-apps-query-results--table--light:@@ -4425,7 +4425,7 @@ snapshots:mcp-apps-retention-actors--daily--light:hash: v1.k794b7964.98ed364bc169b666ee69ff6e44c7fa385360df9410875c5ee3cd85ff2e53104f.-p5rL3gbD8LRZ-kriXkNM3NHeYm8nf0v0VfVq5XWZFsmcp-apps-stickiness--multiple-series--light:- hash: v1.k794b7964.9ffcba3452bbcd678c11f0d873b02a32a97ad071d5fc55f2c00681df9bdc7141.0G-r5IrknmUdR0cBBeCfTQjKKC2nBiE3-F4F0PgX9FQ+ hash: v1.k794b7964.e90daedecce46a2211ed97115683dd062e0780f0c1be9fe89cc4fb0490c7e08e.j1Wha9nPH-J5d7usdLOu9P4PnXZH49CotPoDtJb9v2cmcp-apps-stickiness--single-series--light:hash: v1.k794b7964.d1536728712178593de0eeb14f682a2bd5ccccd7b9d693d0605a4e738dace476.NeZoFm3eCYh_b5vTlASuNX6vM7aoJgZd-V09STOVp9omcp-apps-surveys--active-popover--light:@@ -6051,9 +6051,9 @@ snapshots:scenes-app-insights-trendsslopegraph--trends-slope-graph-incomplete-period--light:hash: v1.k794b7964.99e138dff5ed78e57028ad84ccb0c1990007a7b0f8f3704b96acb57e8f639f32.gER0-8SEKJbjXtsKJ_hpg9b7E8Qj3FvtNMnxzsSWAk0scenes-app-insights-trendsslopegraph--trends-slope-graph-with-legend--dark:- hash: v1.k794b7964.262509740b296a753468c7043f97184b712ed2eb6dae815a2da8c0f104451723.xkkmaiU__nT_Pi574SdUw5AH5CX8gwbmlTb6e1ee1LM+ hash: v1.k794b7964.656778243c700e85011e31522e905efef3bc9b0321bf2e595154a9bf13053046.As6mEehwXhbDCU3X4ZtcPohryDEYp3s7RV_Q3uZIozsscenes-app-insights-trendsslopegraph--trends-slope-graph-with-legend--light:- hash: v1.k794b7964.fb16b00c8ab6aeace0245ab576c8a6c30f4431d1a5f7255bcaffe4f42db5e23e.NNK0juntFucVYWiwf1AoAW0FaQYRc2H2IJrocum-V1o+ hash: v1.k794b7964.139b9838b7eeb200933b8cb4eb0c418f68283553a2bf3592009796d6ee3ee79d.ugVQrNcQQgI8b0FshQ1gk5juSKVqDvkhkXeNkpzLl5Iscenes-app-insights-trendsvalue--trends-area--dark:hash: v1.k794b7964.aeab9be6f0fee10e894ebeb87540c6d0f86acea98ac11e583b53998f9c895f1e.2bP80VZ6JVW4j9uvSqRpeSFla-_goMNZ0S7Yq-PHC7cscenes-app-insights-trendsvalue--trends-area--light:@@ -6655,21 +6655,21 @@ snapshots:scenes-app-replay-vision--scanners-list--light:hash: v1.k794b7964.45152642e4bab1d33429f7a8ab7012c317622d06b04d3cc6bb0da0f58c417baa.1iizSOBB9Nn8M9-s4kIZ3X1-GFYB1UKqyCW9D1qlVOwscenes-app-revenue-analytics--revenue-analytics-dashboard--dark:- hash: v1.k794b7964.cb5ee978d302e9665907d3fddcfb42f43e0be511c920cb282046813bd36c4692.4FgLEatyjJWvuJBkxO4dVCe_vK81uDrAe3QDjcBoYso+ hash: v1.k794b7964.3ea83eb81304d8f428406dd91932063929413974fe5d5a9efeedae5af86810ea.HkT7YP6qgm9kWpEwPA8TPmx_2kkLGLto_mEgUAby5Tsscenes-app-revenue-analytics--revenue-analytics-dashboard--light:- hash: v1.k794b7964.974a7a306c59f1077734ea3eab315788bae211da717614646f8c141b8a81c574.fNooGm5K19vXv9zYnHi-tvBlZFSAWovlz2bve_5W4oM+ hash: v1.k794b7964.23a350fedfbfed153c3da509aa34cad0b70e36a8ed9a9b9c315b6ba20664c149.IqSq-mM9e_QqaYOcLM4X4TSRRA_btOGIsITZ4-SpqVwscenes-app-revenue-analytics--revenue-analytics-dashboard-area-mode--dark:- hash: v1.k794b7964.4e46e7b6fd84607d8a42a553260db3aa12d6f330285b6e0d4d969c9dfd4858c7.2jR7P-34xDRJkKdaRtii0cCGtayJNJaTJ3HAXkn29hk+ hash: v1.k794b7964.d4abd3b2e5a782cfe668df097be314fc3c5de94e6dfb3c79805d5049a7c86ca8.8wGNlytH-FjpjN0SfpGAVh6ExPbDmyv52yb0WOvPq7cscenes-app-revenue-analytics--revenue-analytics-dashboard-area-mode--light:- hash: v1.k794b7964.519f2909879878373b70812db02b9cf3743ebbec0351d68672dddfa7edd6fee6.eOXddyJJ39A4oQHPxwnQzYJHtCi9hMaLDSkBfW4ZDTI+ hash: v1.k794b7964.f2f7cf83313ddc6d32b9064f10f7d382c0ebf6125e36235670a57cee5131f4b6.1xBLElMCMCYko6Fj_B_mvlYoFDBrfFpGBMDqqRvUM7oscenes-app-revenue-analytics--revenue-analytics-dashboard-bar-mode--dark:- hash: v1.k794b7964.558d7c94a29ea46c8148d421a0ea6e8a1cdd7597420faa8bc4f0494cfb8a585d.h0PKhs0YBhY0zECumGEpvLvkHB_DGCQIGplFcEO1O1E+ hash: v1.k794b7964.fb1f38915cdca06b0519971c154a59765b841c5eef0d48874f6d245ddd14b82f.WkxNu4Wqx7jZFYKaR5SrEHY484QAA_sKQ744Umzqgicscenes-app-revenue-analytics--revenue-analytics-dashboard-bar-mode--light:- hash: v1.k794b7964.835fe8bf4be37db56839c10c2a383281bf1cac219c0d38e0b3950859bc9109cc.tpbpVyujACXvdFltpXj3wREuP4o569gcW5StuwUV2iY+ hash: v1.k794b7964.47b00dd276459d5b754432cd2a7f552c302d33b8bede66f058b8c6160d1aa602.LEntHdf_sIuVSiqD-OB8fog7u61zRlLyXrkfuP8TcDIscenes-app-revenue-analytics--revenue-analytics-dashboard-sync-in-progress--dark:- hash: v1.k794b7964.69d9cff32532e6616205d8fbbb06cce3a30162c420557df82f997bc5bbb953a2.BKvF0y5eVE0XV4VcovO5sFzZevTc-ebio7NQqg2ydmI+ hash: v1.k794b7964.d60549a00a08aa298cb3baf9c3137b42ac8db0b2d42adf3ab910adc517326322.HLBk9n43WpPBFApRBvTgDAXO_EHJ-JTEYckaRooX5ioscenes-app-revenue-analytics--revenue-analytics-dashboard-sync-in-progress--light:- hash: v1.k794b7964.8835b3db1f804cf79cfd4099d9ad676b0950bf2cce6c1048a32b223712f14f9a.KspL8VqbtubieUmgjtgKT1y1ogaVf0tsuw4nUZYOG4Q+ hash: v1.k794b7964.90b7d681e2b40acc73f165b5d387c6b01fc1c0b56bfbe686bf1a48693f6e35f2.W9zWABRMzFXyK2ygGGNs3snio7tTRYEFxx1A2u-E0i4scenes-app-revenue-analytics-mrr-breakdown-modal--mrr-breakdown-modal--dark:hash: v1.k794b7964.b500f615c6956b5f6aab9c09c08a3193a0a090f8acf52419d0f4c5c2e26c5880.9Rvtbj9pGRPBFSNBSfC1NlH3y8hVmo3FWMA_7FIT0TYscenes-app-revenue-analytics-mrr-breakdown-modal--mrr-breakdown-modal--light:diff --git a/packages/quill/packages/charts/AGENTS.md b/packages/quill/packages/charts/AGENTS.mdindex 47a39c1af1da..f7118deb5e88 100644--- a/packages/quill/packages/charts/AGENTS.md+++ b/packages/quill/packages/charts/AGENTS.md@@ -76,7 +76,7 @@ Charts fill their container and need a parent with real dimensions — a `0`-hei- `TrendLineOverlay` renders linear/exponential regression lines as SVG polylines on vertical bar and combo charts. Use via `trendLines?: TrendLineConfig[]` in `TimeSeriesBarChartConfig` or `TimeSeriesComboChartConfig` — the chart computes the derived series via `buildTrendLineSeries` and passes them to the overlay as a child. Only works for `axisOrientation: 'vertical'`; returns null on horizontal charts. Legend-toggled-off series are filtered automatically.- `ValueLabels` formatter gets `(value, seriesIndex, dataIndex, context)`; in percent layouts `value` is a 0–1 fraction — use `context.rawValue` for the original. `context.bandValues` is the stack's values at this index and `context.previousBandValues` the same for the preceding index (empty at the first), so a formatter can compute a segment's share of the current or the previous band (e.g. period-over-period).- Every multi-series chart (`LineChart`, `BarChart`, `TimeSeriesLineChart`, `TimeSeriesBarChart`, `SlopeChart`) takes a `config.legend: ChartLegendConfig` (`{ show, position, align, gap, interactive, hiddenKeys, onToggleSeries, renderItem }`). With `show: true` the chart renders a built-in legend that, by default (`interactive`), is click-to-toggle: clicking a row hides that series (no draw, no scale contribution, no tooltip — the axes rescale into the freed space) while the row stays listed but dimmed so it can be restored. The chart owns the toggled-off state (uncontrolled); set `interactive: false` for a static legend, or pass `hiddenKeys` + `onToggleSeries` to control it yourself. Hidden by default. `config.legend.renderItem(defaultNode, item)` wraps each rendered row, so consumers can augment it (e.g. attach a right-click context menu) while keeping the default swatch/label/toggle rendering — return `defaultNode` to leave a row untouched. Toggling on time-series charts lists the user's series only (not derived trend lines / CI bands) — and hiding a series also hides everything derived from it (its CI band, moving average, and trend line), so no orphaned overlay floats over the gap.-- `Legend` (and `ChartLegend` for layout) is the lower-level presentational primitive: pass `items`, `onItemClick`, `hiddenKeys` — filtering series is the caller's state. Use it directly when the built-in `config.legend` can't express what you need (custom item order/labels). `useChartLegend(series, theme, config, items?)` is the shared hook the charts use — returns `visibleSeries` (hidden applied as `visibility.excluded`) plus `legendProps` to spread onto `<ChartLegend>`; `applyHiddenSeries` is the underlying helper. `LegendItem.secondaryLabel` shows muted trailing text (e.g. a slope chart's per-series change). Long labels clip to a max width with an ellipsis and expose the full text via a native `title` tooltip on hover. The legend slot in `ChartLegendLayout` is bounded and scrolls (a top/bottom legend caps at ~40% of the chart height so the plot keeps the majority; a left/right legend stretches to full chart height and caps at ~45% width), so a many-series legend scrolls instead of squeezing or stretching the chart. A left/right legend uses `align-self: stretch` (resolves against the container's used height, so it works even when no ancestor sets an explicit `height`). The top/bottom `max-height: 40%` cap is a percentage, so it only resolves when the chart container has an **explicit** `height` — a flex-derived used size (e.g. `flex: 1` with only `min-height`/`max-height`) does **not** count and the cap silently no-ops; pin a real `height` on the container.+- `Legend` (and `ChartLegend` for layout) is the lower-level presentational primitive: pass `items`, `onItemClick`, `hiddenKeys` — filtering series is the caller's state. Use it directly when the built-in `config.legend` can't express what you need (custom item order/labels). `useChartLegend(series, theme, config, items?)` is the shared hook the charts use — returns `visibleSeries` (hidden applied as `visibility.excluded`) plus `legendProps` to spread onto `<ChartLegend>`; `applyHiddenSeries` is the underlying helper. `LegendItem.secondaryLabel` shows muted trailing text (e.g. a slope chart's per-series change). Long labels clip with an ellipsis only when they run out of the space actually available — there is no fixed max width. A vertical legend bounds each row to its column and truncates at the column edge; a horizontal legend caps each row at an equal share of the line floored at 180px (flexbox wraps before it shrinks, so without a cap one long label would take a whole line instead of clipping) — many series pack into tidy 180px columns while a few series with room to spare, or a lone series, show unclipped whenever they fit. The full text is always exposed via a native `title` tooltip on hover. The legend slot in `ChartLegendLayout` is bounded and scrolls (a top/bottom legend caps at ~40% of the chart height so the plot keeps the majority; a left/right legend stretches to full chart height and caps at 45% width but never more than 240px), so a many-series legend scrolls instead of squeezing or stretching the chart. A left/right legend uses `align-self: stretch` (resolves against the container's used height, so it works even when no ancestor sets an explicit `height`). The top/bottom `max-height: 40%` cap is a percentage, so it only resolves when the chart container has an **explicit** `height` — a flex-derived used size (e.g. `flex: 1` with only `min-height`/`max-height`) does **not** count and the cap silently no-ops; pin a real `height` on the container.- `SlopeChart` config: `showSeriesLabels` (name beside each point; steepest line wins label collisions), `showStartLabels`/`showEndLabels` (defaults overridable per series via `meta.showStartLabel`/`showEndLabel`), `legend` (`{ show, position }`, rows carry the formatted change, ordered biggest-to-smallest by end value to match the lines' right-edge order), `valueFormatter`/`deltaFormatter`. The value axis is hidden by default — the start/end labels are the readout. The default tooltip orders its rows biggest-to-smallest by the hovered point's value (so many-breakdown tooltips match the lines' vertical order) and formats values with `valueFormatter` so they match the on-chart labels' units; pass your own `tooltip` to override. (`DefaultTooltip` itself takes an optional `valueFormatter` for the same reason — without it values fall back to `toLocaleString`.) Per-series `meta.incompleteEnd` dashes only the second half of that connector (the last point is the current incomplete period); the renderer splits the final segment at its midpoint via `stroke.partial.fromFraction`, so a two-point line needs no phantom interior point.- `MetricCard` is a left-aligned tile. Pass `title={null}` to drop the title row — the header band collapses when there is no title and no change pill, and the subtitle row is omitted when there is no subtitle (and no `labels`), so a value-only card renders just the number. `changeSize="md"` renders a larger change pill (default `sm`); `changeInline` puts the pill beside the headline instead of in the header; `sparklineFill` makes the sparkline fill the card's remaining height instead of a fixed `sparklineHeight`; `sparklineDashedFromIndex` dashes the sparkline from that index onward (e.g. an in-progress trailing period). `subtitle` always wins (shown at rest and on hover); `restingSubtitle` (e.g. `'Avg'`) shows only at rest and yields to the hovered point's label on hover — pair it with a `value` that summarizes the series (average/total) so the headline reads as a summary until hovered. `hoverChangeFromPreviousPoint` keeps the supplied resting `change` pill at rest but, while hovering, swaps it for the hovered point's change vs the previous point (hidden at the first point). `changeTooltip` shows a styled hover tooltip (floating-ui, using the host's tooltip surface tokens with chart-surface fallbacks) on the change pill (e.g. to spell out what the resting comparison is).- The composable form of `MetricCard` lives one layer up as `Metric` in `@posthog/quill-components` (it needs `Card`/`Badge` from primitives, which charts can't depend on). It's built on `Sparkline` plus the headless metric helpers this package exports — `resolveDelta` / `computeFallbackChangePercent` (delta math), `useAnimatedNumber` (count-up headline), `useHoverIntent` (hover dwell) — and the `MetricChange` / `ResolvedDelta` types. Reach for `Metric` when you need a custom layout; use the monolithic `MetricCard` here for the default self-contained tile.diff --git a/packages/quill/packages/charts/src/components/Legend/ChartLegendLayout.tsx b/packages/quill/packages/charts/src/components/Legend/ChartLegendLayout.tsxindex dc710e5944da..c7cdabf035b4 100644--- a/packages/quill/packages/charts/src/components/Legend/ChartLegendLayout.tsx+++ b/packages/quill/packages/charts/src/components/Legend/ChartLegendLayout.tsx@@ -29,10 +29,11 @@ export function ChartLegendLayout({const isRow = position === 'left' || position === 'right'const legendFirst = position === 'top' || position === 'left'// Side legends stretch to the chart height — a % max-height no-ops without an explicit ancestor height,- // which top/bottom's max-h-[40%] still needs. `justify-center-safe` keeps short side legends centered- // yet scrollable (plain center would push the top rows past the scroll origin).+ // which top/bottom's max-h-[40%] still needs. Their width caps at 45% of the chart but never more than+ // 240px, so one long label can't squeeze the plot on a wide chart. `justify-center-safe` keeps short+ // side legends centered yet scrollable (plain center would push the top rows past the scroll origin).const legendClass = isRow- ? 'flex flex-col self-stretch max-w-[45%] overflow-y-auto justify-center-safe'+ ? 'flex flex-col self-stretch max-w-[min(45%,240px)] overflow-y-auto justify-center-safe': 'self-stretch max-h-[40%] overflow-y-auto'const legendSlot = legend ? (diff --git a/packages/quill/packages/charts/src/components/Legend/Legend.stories.tsx b/packages/quill/packages/charts/src/components/Legend/Legend.stories.tsxindex a40d52a67767..be7751538132 100644--- a/packages/quill/packages/charts/src/components/Legend/Legend.stories.tsx+++ b/packages/quill/packages/charts/src/components/Legend/Legend.stories.tsx@@ -75,10 +75,28 @@ const LONG_LABELS: LegendItem[] = [{ key: 'c', label: 'Short one', color: '#f97316' },]-// Long labels clip to a max width with an ellipsis; the full text is on the row's `title` tooltip.+const LONG_SINGLE: LegendItem[] = [+ { key: 'a', label: 'pageview · Chrome · United States · organic search · returning visitor', color: '#22c55e' },+]++// Clipping is driven by available space: each horizontal row caps at an equal share of the line, floored+// at 180px, so labels show unclipped when there's room and clip into tidy columns when there isn't.+// Top-to-bottom: a lone long series in a wide box (fits, no clip), the same series in a narrow box+// (clips), a group of long labels in a wide box (each fits its share, no clip), the same group in a+// narrow box (clips to its share of the line), and a vertical legend that truncates at its column edge.+// The full text is always on the row's `title` tooltip.export const LongLabelsTruncate: Story = {render: () => (<div className="flex flex-col gap-4">+ <div className="w-[640px] border border-border rounded p-2">+ <Legend items={LONG_SINGLE} align="start" />+ </div>+ <div className="w-[240px] border border-border rounded p-2">+ <Legend items={LONG_SINGLE} align="start" />+ </div>+ <div className="w-[1100px] border border-border rounded p-2">+ <Legend items={LONG_LABELS} />+ </div><div className="w-[480px] border border-border rounded p-2"><Legend items={LONG_LABELS} /></div>diff --git a/packages/quill/packages/charts/src/components/Legend/Legend.test.tsx b/packages/quill/packages/charts/src/components/Legend/Legend.test.tsxindex 38846138bf0e..22a68d709dfe 100644--- a/packages/quill/packages/charts/src/components/Legend/Legend.test.tsx+++ b/packages/quill/packages/charts/src/components/Legend/Legend.test.tsx@@ -64,13 +64,13 @@ describe('Legend', () => {expect(onClick).toHaveBeenCalledWith('returning')})- it('truncates each label and exposes the full name via a native title tooltip', () => {+ it('keeps the full label text and exposes it via a native title tooltip', () => {+ // The visual clipping itself is covered by the LongLabelsTruncate storybook snapshot; here we+ // only guard that a clipped row still carries the whole name for hover recovery.const long = 'Breakdown value with an extremely long name that would otherwise crush the plot'const { container } = render(<Legend items={[{ key: 'a', label: long, color: '#000' }]} />)const label = container.querySelector<HTMLElement>(`[title="${long}"]`)!expect(label.textContent).toBe(long)- expect(label.className).toContain('truncate')- expect(label.style.maxWidth).toBe('180px')})it('dims only rows whose key is in hiddenKeys', () => {diff --git a/packages/quill/packages/charts/src/components/Legend/Legend.tsx b/packages/quill/packages/charts/src/components/Legend/Legend.tsxindex a98868e93e72..266f239967dc 100644--- a/packages/quill/packages/charts/src/components/Legend/Legend.tsx+++ b/packages/quill/packages/charts/src/components/Legend/Legend.tsx@@ -1,4 +1,4 @@-/* eslint-disable react/forbid-dom-props -- swatch background-color is dynamic per item */+/* eslint-disable react/forbid-dom-props -- swatch color and the per-count row cap are dynamic values */import React from 'react'export interface LegendItem {@@ -45,17 +45,31 @@ export function Legend({return null}const hidden = hiddenKeys?.length ? new Set(hiddenKeys) : null+ const isVertical = orientation === 'vertical'// A vertical legend stacks from the start edge (justify-start) so it scrolls cleanly when it overflows// its slot — vertical packing is `align-content`, untouched here. Horizontal aligns via `justify-content`.- const layout =- orientation === 'horizontal'- ? `flex-row flex-wrap gap-x-3 gap-y-1 ${JUSTIFY_CLASS[align]}`- : 'flex-col gap-1 justify-start'+ const layout = isVertical+ ? 'flex-col gap-1 justify-start'+ : `flex-row flex-wrap gap-x-3 gap-y-1 ${JUSTIFY_CLASS[align]}`+ // Truncation is driven by the space actually available, not a fixed max width — but flexbox wraps rows+ // before shrinking them, so a long label would take a whole line instead of clipping. Each horizontal+ // row is therefore capped at an equal share of the line, floored at 180px: with many series the floor+ // wins and long labels pack into tidy 180px columns; with few series and room to spare each row can use+ // its full share, so labels show unclipped whenever they fit (a lone series gets the whole line).+ const gapRem = (items.length - 1) * 0.75+ const horizontalRowMax = `max(180px, calc((100% - ${gapRem}rem) / ${items.length}))`+ const rowWidth = isVertical ? 'flex w-full' : 'inline-flex max-w-(--legend-row-max)'return (- <div className={`flex ${layout} ${className ?? ''}`} data-attr={dataAttr}>+ <div+ className={`flex ${layout} ${className ?? ''}`}+ style={isVertical ? undefined : ({ '--legend-row-max': horizontalRowMax } as React.CSSProperties)}+ data-attr={dataAttr}+ >{items.map((item) => {const dimmed = hidden?.has(item.key) ? ' opacity-40' : ''- const rowClass = `inline-flex items-center gap-1.5 text-xs leading-none${dimmed}`+ // leading-4, not leading-none: the truncating label clips its overflow, and a line box with+ // no slack cuts off descenders (the tail of a "g").+ const rowClass = `${rowWidth} min-w-0 items-center gap-1.5 text-xs leading-4${dimmed}`const inner = (<><span@@ -63,7 +77,7 @@ export function Legend({className="inline-block w-2.5 h-2.5 rounded-sm shrink-0"style={{ backgroundColor: item.color }}/>- <span className="truncate" style={{ maxWidth: 180 }} title={item.label}>+ <span className="truncate min-w-0" title={item.label}>{item.label}</span>{item.secondaryLabel != null && item.secondaryLabel !== '' && (