: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
chore(insights): retire Chart.js LineGraph in favor of quill-charts (#63877)
Sam Pennington34972ec8eecd
diff --git a/.github/workflows/ci-e2e-playwright.yml b/.github/workflows/ci-e2e-playwright.ymlindex 2c36762c5202..4725f8195fca 100644--- a/.github/workflows/ci-e2e-playwright.yml+++ b/.github/workflows/ci-e2e-playwright.yml@@ -560,7 +560,7 @@ jobs:# must be reachable from *both* tips: this job checks out HEAD at depth 1, so# deepen both histories (depth=1000 + blob:none mirrors the merge-base fetches# in the `changes` job). If the branch point is still out of reach, the script- # warns and falls back to BASE_SHA — bounded by its own file-run budget guard.+ # warns and falls back to BASE_SHA — bounded by its own test-run budget guard.git fetch --no-tags --prune --depth=1000 --filter=blob:none origin "$BASE_SHA"git fetch --no-tags --depth=1000 --filter=blob:none origin "$HEAD_SHA".github/scripts/verify-playwright-new-tests-and-snapshots.sh "$BASE_SHA" 10diff --git a/common/storybook/.storybook/decorators/withChartCanvasSnapshot.tsx b/common/storybook/.storybook/decorators/withChartCanvasSnapshot.tsxnew file mode 100644index 000000000000..3a65195f35c7--- /dev/null+++ b/common/storybook/.storybook/decorators/withChartCanvasSnapshot.tsx@@ -0,0 +1,18 @@+import type { Decorator } from '@storybook/react'++import { inStorybookTestRunner } from 'lib/utils/dom'++// Body class read by buildTheme() to set ChartTheme.skipDraw.+const SKIP_CHART_CANVAS_CLASS = 'storybook-skip-chart-canvas'++/**+ * Suppresses quill-charts canvas painting in snapshots for stories that set+ * `testOptions.skipCanvasDraw` — quill charts paint asynchronously, so full-scene snapshots can+ * race the draw and flake. Only active under the test runner; interactive Storybook always draws.+ */+export const withChartCanvasSnapshot: Decorator = (Story, { parameters }) => {+ const skip = inStorybookTestRunner() && !!parameters.testOptions?.skipCanvasDraw+ document.body.classList.toggle(SKIP_CHART_CANVAS_CLASS, skip)++ return <Story />+}diff --git a/common/storybook/.storybook/preview.tsx b/common/storybook/.storybook/preview.tsxindex 6e3594971dbc..d9a6c9220e6f 100644--- a/common/storybook/.storybook/preview.tsx+++ b/common/storybook/.storybook/preview.tsx@@ -10,6 +10,7 @@ import { worker } from '~/mocks/browser'import { defaultMocks } from '~/mocks/handlers'import { getStorybookAppContext } from './app-context'+import { withChartCanvasSnapshot } from './decorators/withChartCanvasSnapshot'import { withFeatureFlags } from './decorators/withFeatureFlags'import { withKea } from './decorators/withKea'import { withMockDate } from './decorators/withMockDate'@@ -95,6 +96,8 @@ export const decorators: Meta['decorators'] = [withTheme,// Set the page URLwithPageUrl,+ // Suppress quill-charts canvas painting for snapshot stories that opt in via testOptions.skipCanvasDraw+ withChartCanvasSnapshot,]const preview: Preview = {diff --git a/common/storybook/.storybook/test-runner.ts b/common/storybook/.storybook/test-runner.tsindex e5eba9e328ad..095fcdd55722 100644--- a/common/storybook/.storybook/test-runner.ts+++ b/common/storybook/.storybook/test-runner.ts@@ -68,6 +68,12 @@ declare module '@storybook/types' {* Skip taking a dark mode snapshot. Useful for stories that don't support dark mode or have known issues in dark mode that would cause snapshot failures.*/skipDarkMode?: boolean+ /**+ * Suppress quill-charts canvas painting for this story's snapshot, avoiding flake from+ * the charts' async paint. Handled by the `withChartCanvasSnapshot` decorator.+ * @default false+ */+ skipCanvasDraw?: boolean}msw?: {mocks?: Mocksdiff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex aea55f562cdc..9fc655367191 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -153,33 +153,33 @@ snapshots:components-cards-button-tile-card--with-more-button-placed-in-public--light:hash: v1.k794b7964.abf9c71035c10cfebfbb3dd349284934002936700797e6df35005449aa478efd.bUCyCaWRtGtwIh_uPqHhQtjJ5icRV7fM1ly1xlx0MG0components-cards-insight-card--access-control-editor-access--dark:- hash: v1.k794b7964.101eef352c9c71c7f845c3c4706893f200764716891b5c60eab84c3d5a6e77bd.UPqaatupvIpEi3kXbi8l3b9yehY9yxFc2zeeBhb3ZXk+ hash: v1.k794b7964.187bf88b2e78d58724f390afdb5afed95ae2062bcf0ac5e4196193e9f82fba1f.ijZRzUUzUPhBi_EfzS9jOzkun5dmXne9Hat6lUlemAocomponents-cards-insight-card--access-control-editor-access--light:- hash: v1.k794b7964.97a947a1d15418cb5355bd66130f825dc7f3d38dddf7d12a19a6be0e43778f1f.1okFMfJw2YwwmdqtYnNnMUeTBOLsnNf2Zo_930_DuMY+ hash: v1.k794b7964.0f0cb5a4dbbbc84568bcaeadbc20837888c33337972c4ef1f8a1d11a6fff8cdf.afWNFGbkvlIdM5cHIn0kjq4m8ehR1gb3WLPLhFBhLd4components-cards-insight-card--access-control-legacy-insight--dark:- hash: v1.k794b7964.2928cc40d82738a5123b2e1e87dfff084c32852f6f0209228ad1cc2b9ffc252f.sOo_agOEGNQdcso4dgVyUEvdRnWeZXQWAoirBYeBga8+ hash: v1.k794b7964.dd130dbd2106bff8c3fa97ac4dfc43559a6196330f30a22c0aae18e0e4a684e9.12lBu4IvMlOF8N81yW5dea_fCNTENekQO7zelenQHNQcomponents-cards-insight-card--access-control-legacy-insight--light:- hash: v1.k794b7964.073f91d32ba13438f7a23aa055e43ce6d4c1b413f7b505992ee1481373bd2fda.oe_giimQAwKxObdHRxm3legEeJsrbC1ZlToOleng030+ hash: v1.k794b7964.c357d8a2f18888737e919a7cf5facb923a597f733cd7de49727f5f7f429b7566.8LpTypG4JIQg7JVZ57UHUSBJwkI3migksT-gm7YfPsYcomponents-cards-insight-card--access-control-manager-access--dark:- hash: v1.k794b7964.f8dd54ae105112e3a2605ba8fb15de5c815326368400b6c59b40afc2c895eced.w74qiV7j4XSvJtCLqa2TSYW4Kz5a3axl1O6sQjMyKek+ hash: v1.k794b7964.687288dc02417404c9b8d49525a31c373b1fb7b06989515287e3b25ca81730a9.6KyySbC3CwqAyatLev9l-1TxjW7x59tNpW4HtbYGLaYcomponents-cards-insight-card--access-control-manager-access--light:- hash: v1.k794b7964.12fcf13ef74399eb105e5a61353ec004c6c03fe0d71abb46d211d6e8a48a9fca.k6UuLRgw78dGQrChHxT44BRByHcvjzSIxm3ybn6yxYE+ hash: v1.k794b7964.ffebe7d4c951093bb76b7251ac7ed5a2a6ba51ca9b7bbb734eb0978dc010afbc.jP26OBXRfQ_ycnMc2p9HAop2_7RS_Fu7F28IQkYZp88components-cards-insight-card--access-control-mixed-permissions--dark:- hash: v1.k794b7964.22750e58c1313e67891854c5132c8e84635a6b7fb6bc80447905c3f45aceab89.NYggjvQWDx0pVjpD4BUhXbawLkWdgMfIW-rWs_h8yvs+ hash: v1.k794b7964.8b4d66273b1eca0fe2e943a2759e3d900f4539ce13c732e703370fb78d1be97d.8sixKvtz6yjtwn6EVptz3kI3p45ugJWOFWWJakCISVAcomponents-cards-insight-card--access-control-mixed-permissions--light:- hash: v1.k794b7964.98a2cff38ea20a81c3aabcb9281881c37a7b5318014264cdbf91b21712d3074a.LtCf7xj9IX6uInfN-spFejR1T9Qej1Y9khkVnltSLVA+ hash: v1.k794b7964.4511d4d38b60d4ec4e87885cbcfae6ebdef8b6295ff9c71a78f8c3c9014c2a96.rW15TKs41AHUllPADWbJJG8CbNnBqpfaxH3fq7B9gqIcomponents-cards-insight-card--access-control-no-access--dark:hash: v1.k794b7964.2aa7dada4afabba5efa5e1b0e9b36a8be9add036ff4b67cd3f7c154a2f24e71c.IVeTit32HuunN9lnT91h39Cc_54OBU1QgFmmllCaUIUcomponents-cards-insight-card--access-control-no-access--light:hash: v1.k794b7964.c93218d9624317a0049dd749f9dfb0e46b0dcffca294fdabe98b9c636238de6a.2Ql-DUDCwIiZKvFzwwIDCZQjgf-NfrDAmEwyGAQdC0scomponents-cards-insight-card--access-control-viewer-access--dark:- hash: v1.k794b7964.feb297e006ca9c2693da83ce91bebcc0ed53479dbf2678462032dcb015c249f8.SjozAmTeqZj58KoEl8wlvQQoZAfGI5asYHLXeTQa32k+ hash: v1.k794b7964.c550ad4d32706d3e0c3d0067c29db93b84beb403cd577e74fdddde79a49dfc44.LU7DqGE2btsba067D1DaJobH0MWsa20691Ur56jd2Focomponents-cards-insight-card--access-control-viewer-access--light:- hash: v1.k794b7964.719f09cfc81ad85b29436e014a28bce58cb2d92cb52f3985452a7f244946a942.7-kQKnzPLEwmt0ASeD0jP3gHwn1l_knVYROrs7w-8G4+ hash: v1.k794b7964.385f2553db1ac44aca115ac9ff046815a68450e80d321459839b0d4f4ffcee6b.EArgipiRGDp0FnfrLv2pR5cvjnk0Wyz3kfevjOZ7WTYcomponents-cards-insight-card--insight-card--dark:- hash: v1.k794b7964.5d05028af1ff628487ea3b1c41a754ef8d7f7b42838693e2ea7894140b7ba8c8.QBkx4kg4HVbuulD8XBwdQGCt4zYT1NL_NAAjj7Y4ovU+ hash: v1.k794b7964.559ba17eb3af5356dff4c4dce3874b0b1ea432696d8a9e2515bc1449cf79268f.hPOjU-OM0rUypdy6gw-fMH-557l9gGdxVt_djVxKtM4components-cards-insight-card--insight-card--light:- hash: v1.k794b7964.83906dc2d8e2d09c97a705a7b84dee0ec3521ce2f1cf09ffab8d1a62b26641c9.8mq8WaMYFIJ_fHM2lS-YMZmJFrN3Y_pljpXTCpj9GjI+ hash: v1.k794b7964.9c4c811437c65c6dbcb5e6c57c51eb6e2adfa0a8779d4b73b5fb05e67caa73e3.YqxeouU2vQLML7U7fNQbCWhJ432Qtvvc5TiJkWIx2jgcomponents-cards-insight-details--data-table-events-query--dark:hash: v1.k794b7964.6956ffc51d0a9527e5d9a47c8ed61d34c47c7b15cfa171c634057d0eabda0dd2.pxLvJTrPbgP0Y-yg7R_SZHFQbAIrPtI5-fGMsReGRAscomponents-cards-insight-details--data-table-events-query--light:@@ -373,9 +373,9 @@ snapshots:components-editable-field--multiline-with-markdown--light:hash: v1.k794b7964.6070c64a1e7e3c8a431311ab8d368782ae31ef2708d5bc0b936556522ba4cc67.lBoSzEjBUU32Tvn8gfFS1nPnTcYEx-EsTAbD6b7BcNMcomponents-editorfilters--with-long-filter-value--dark:- hash: v1.k794b7964.110a41bf4d9ce8ef6b415f32bd6270ccf5e6db7830337dd1496e1378ef498197.5Lavk6yjLXnWBtxBGE3tTlzaJ_02CEJk14ZXdywdeWk+ hash: v1.k794b7964.56bbbf995d2227b9f4727b39b5f5b718ac5a50c6e0a736b6110a03f2be9b3225.G0tB0SgRWoh3f0C0ANuLdSuho5k3NE8Q7qvuOJ-e6YAcomponents-editorfilters--with-long-filter-value--light:- hash: v1.k794b7964.230adfa864dcb93f7e9e0afdbeba7128922a861693144f0c2844e1f634f81ca7.mQyXABhacmNy_w0rJ2bHZihVlhevkwlVURnCHXIYBLo+ hash: v1.k794b7964.27018348b16f845fab141e67d3a9e686c1e048f8c16499a8e115869fa12ceb66.uIhZht3kAtQf5JcjqNcPUhkHf92FvIOcO9aXyMjpbKMcomponents-empty-message--empty-message--dark:hash: v1.k794b7964.09d41c976a498d44a8beaaea4da27dbf92d4fdaeffd2681fdd72efa891615c16.rmLhhRKeUooa6LEOhwGjibuhcSGnRXp90A3Em7lGZVwcomponents-empty-message--empty-message--light:@@ -1873,29 +1873,29 @@ snapshots:errortracking-volumesparkline--events-before-data-range--light:hash: v1.k794b7964.683c24f2509215d174cda4a69fd2aa0f021af91d45f7ccdab742f78755c2e4ca.l0oCDgytHq-3gkB5Nza3SN1Tpmvc_LP_dsSdGCfoXxoexporter-funnels--funnel-left-to-right-breakdown-insight--dark:- hash: v1.k794b7964.7f8902b288a81a116efa0009d9e0e0a7748eb304bd82818249bd94ef7a444733.XripnDYVl7JqLBvLfXfoCx9S1R4IzlXeTopiRSFiU0o+ hash: v1.k794b7964.6a75f41f6923b14c3b49812561ea0d908c6c7e466d5288541ebde23517c15102.RJuMe_-ZWf6JEiStu-Z_HeuKx0GOPhaSLY-Cmdzg_4gexporter-funnels--funnel-left-to-right-breakdown-insight--light:- hash: v1.k794b7964.356f222b7bb0e751fb97c31194cfa581c2f8e2a20fa082c547919e4be56bd467.v_ydIqgDEzUkU7qXHZA86gtNMDzG5tKOuLVBmE92hwQ+ hash: v1.k794b7964.cf8d6138be64eb309767988932d87de419af25958b00b2abe8ecf11c28ee330e.iDBtXGRimL8eVfT7kFT3fM93v_CBxaOGcA7czx91z7cexporter-funnels--funnel-left-to-right-insight--dark:- hash: v1.k794b7964.77f4bbfacf05973cfa74be85dabf52dddc6bf7ee0e166938fd11a61d790007bf.MNcgTyREi7N9PTllc2pVkibKrSlF03e5ry7Gi2i5Azc+ hash: v1.k794b7964.0dc99817200305823a16189e604bf5c1f8b2c13465b3eb630d070843d5f99dc2.VIJVI-ufTYIFSNgRvu4diwvodFXRuRFxw6A9_LQnFWgexporter-funnels--funnel-left-to-right-insight--light:- hash: v1.k794b7964.557c7929127d2ff2d13bea0843d557abdac43752101e625a7e55783767b4d4e9.x_dm0hlgOTogGEUOAXd3-0QUcU7O5yCdrw3cA_3bYlI+ hash: v1.k794b7964.c58c741b830919a1b771d8c5ec1eca4eeccbbc138e8014ad6dc4d5c67dc64f0a.wsrA8V4-sr15vB9N7c57AfGR2E61K-HRkxVM-51XjSkexporter-funnels--funnel-left-to-right-insight-no-results--dark:hash: v1.k794b7964.5d0d328d83dd60bee58184c0c33ec821333a741e828d9912c45804c2f608a7d4.5uOR8sk7Lnfb2QWLi0nLjsSLgxj5tmHI3nGJNb8K-F8exporter-funnels--funnel-left-to-right-insight-no-results--light:hash: v1.k794b7964.9225d8fd25066264d4b17b2f2e1eaf912252f71215ef01f66375d816baa65b5b.yGj1DdorkpQ8jghwVu41iGfk8HiK4RXLIK3ZId8F4XMexporter-funnels--funnel-time-to-convert-insight--dark:- hash: v1.k794b7964.838ba9c850fb83896c4dfa295e082ed6b4289290dc3008ca1d872dabe5445db7.1H6XtX0An6bVrKcnLKzu206jH-fqLsTL-v_iyF-ndJY+ hash: v1.k794b7964.ae95e2f08e4f77fad255f664db0a893a1c15c54cf06b22b86c5720d748cc5272.flYoAn4dUHCHzE8xLzYfuZz2uZSESWzpjH-QB3dAjtkexporter-funnels--funnel-time-to-convert-insight--light:- hash: v1.k794b7964.22559d82ae7408c582a6f9cef1c9b7e5e29812c166039b5dc0e16005b3b90eb6.2KCAZXI9bOmHds47ilnrXHJU1_Dzua-SZIkH0P7ZyV8+ hash: v1.k794b7964.ba5c06bdc53233f8995560cf8b1b2e8f9a07b243407ccfc8bb58c2988aab70db.yoH2pKZi1VhDSkHtgUpcVOAU8m-TJec314YPYN4LrwUexporter-funnels--funnel-top-to-bottom-breakdown-insight--dark:- hash: v1.k794b7964.fbb89d07cfcfc95e22a0324b5ef9e16be01a7cf69cd47dfcbaca6962f08a1442.Ev6NqsoPe4X0iSC97DEIqVEXqr87LVK5gDuZIbF_zYI+ hash: v1.k794b7964.5182db968bb635e30a4cc271ac90914e6fcb3ab6c0c950f04771e28ce29fc5c0.Nnboxh2AuuQTdI6H1WlRoh3UEe0_4ACG_se-WTwTqccexporter-funnels--funnel-top-to-bottom-breakdown-insight--light:- hash: v1.k794b7964.f2d5238b023ed05951bb2337e5fb592aa4568012deaf9d544aa3df8d8d1a8cc1.12bt11UAjFgL2dqIVPqWVmV8AZ5wbysnpF_yGSfWVVI+ hash: v1.k794b7964.7dfeec8225d06084db327ac574b0cabb73e8508c5ae956f8a85c5de4ddc16bd5.ruKZzJ0Hv5da13oIPEMw6Mwle0DRVwkXUjFIhiLk1Ggexporter-funnels--funnel-top-to-bottom-insight--dark:- hash: v1.k794b7964.123b854f1da305aa667d5862a1dddaea134c719cc881b2e65c181b68645f2caa.mg3KZDs01XQvc1lRySXycxoM44bl7iW1tcQUQD4F-kc+ hash: v1.k794b7964.adf3141d44f66a52533ad831d47bf1748b1b4e8ba2d32bf82dce3b9c33bda85a.US0wjR53dp-9MVGrvUHlP2ww98XStAYmo1L4ANXAeH4exporter-funnels--funnel-top-to-bottom-insight--light:- hash: v1.k794b7964.15c77280f34b0705c1037abb364e7ccc98ff913632789ef62c7432b36ff185e5.NE8m80oUVHs0F6IlOCXW9yAdVXG7pXR7iLPcZILzDRQ+ hash: v1.k794b7964.0a96ff32d90a76be679e4cdccb42284fbbcfbf2538915ca22612ac3d20062dee.CM64YoV_hmJQd9H83vBQKh_8gOc5AbPLYrtOurAs0zEexporter-funnels--funnel-top-to-bottom-insight-no-results--dark:hash: v1.k794b7964.5d0d328d83dd60bee58184c0c33ec821333a741e828d9912c45804c2f608a7d4.fE4t8YqdB3Ohnsxul2QTfJ_too7TAUNk0rZgr7Ll1Esexporter-funnels--funnel-top-to-bottom-insight-no-results--light:@@ -1937,21 +1937,21 @@ snapshots:exporter-other--sql-insight-no-results--light:hash: v1.k794b7964.ea7aadee0085781453c5672a14fb5ec0a603f4a06b5f3731cd2083f2f9d8734a.c0cjRDa-iJE_e-oAxzjliNErIudaVy2yfaiYXXvETYIexporter-trends--trends-pie-breakdown-insight--dark:- hash: v1.k794b7964.83b6c385ae034c22a0b5c2ef62ef847489e0d952dd8635f816cc1b06fb8566a2.jtnajEyzpDZib0sZOJ7116Do6U5bBFE4tBYp4Cy_muU+ hash: v1.k794b7964.040d0fb7c305cbae453d542dc4006d8982d0b7447aff2b78fd57beda05b2a6be.7xHVE8Wn9Z-mPQrPmsykXkbbIyUpwLbxxEP8abMrA9sexporter-trends--trends-pie-breakdown-insight--light:- hash: v1.k794b7964.844c291522ba5b8a5b2026f704355070ac40cd2b958efccb48712ba8370fa44f.M_7s_QGiRp51hwmaR4jilWjHX-aj-7vhviM2vWgD__Y+ hash: v1.k794b7964.31a2e0c6d76ca26d4a25381eb9328ad6e78f1c8166dd5908c92e9fda9ebf0cb7.tN56CqGBVQ_ze-bFVFFFQdIY8kfo7sZ_dbndEUbDi9sexporter-trends--trends-pie-insight--dark:- hash: v1.k794b7964.58f2c6e4037721fd5e6b242c0698d5b122bc9926fe61edac6b26260cde804e68.P4mgQJMafyI6nFFYVQ28mNpxMZsLPa_AlJZEQZwyShc+ hash: v1.k794b7964.5567dea526a9e577eddb14ce9a5fd8d4ea7c758958362f6b0fcb986826f7af6c.BttinJQgRpIFhK_2oMdJvfPlGb3u2TuIPR9b5c3F5IAexporter-trends--trends-pie-insight--light:- hash: v1.k794b7964.df386e323e39b7614e7b6ffcc7505ba624216353ebad9123d299a7e32efe80b1.vpx-NWoqmZaAUTPaJ00qIGFzr0hITA85YtoY2g5XS5w+ hash: v1.k794b7964.49005eebac3838c7cd116d05d4437c60a37df7140109f6d2c060a5bdb4634805.qNLqShPQR3uPsDCb7JnHpl9ze8ZgGo-kXeX2jKnbBacexporter-trends--trends-pie-insight-detailed--dark:- hash: v1.k794b7964.cc72572cd6413bbbf4cae474d4bb3bff02adfdd0e5fb05a4d13fd14f8dd9d429.SVXSk6Sqmi2jMVKFl7pRDdLv9od7rkZVLqomf_iZ2mE+ hash: v1.k794b7964.7b0ea60087952b08123f941ab77e17f9094da142c85d74c28f365d3be39df60a.Gv9kPX0uHM3fSMlqMnKed3lj9bT4VmGOLZWMpen04dkexporter-trends--trends-pie-insight-detailed--light:- hash: v1.k794b7964.5e0b32d3d8dfaf80a2ad568490b1fbad7f94ff452ddb9e53018013bb6df77c7a.XfybOlnBssUIUq9zTYOFXUJaqxYAB--IZfko1lkzf7s+ hash: v1.k794b7964.f7d3aa7722b466bbb25840760927387c3f41dbde736df2cdefb94006a91bfbe6.ZTZCr0bVsj6Z1Lj4diIJBBtJyXn0paakEClTGeISThcexporter-trends--trends-pie-insight-legend--dark:- hash: v1.k794b7964.d8f6d82f3f6fb42e023b02857837bad37e5a738ab427fb579498ab3623f230fb.E1dfEUnhMJv2UrOXPrG3nJVUQ5PGAc5E4DcYqSLruTY+ hash: v1.k794b7964.feadacff7e7c0da2d0e6ac69b8e4a9f00045750fef453cbcf6ea517385e4dad3.nUi-EgSqX1UXqPXhzaTkcqFj4jc5bceX9ejfX98LU0Iexporter-trends--trends-pie-insight-legend--light:- hash: v1.k794b7964.1ee9dfcae971a531d43997b9e6cd22a2883ca52b8efb8c2e54fc5e9077815964.3mvcdSzkrEPc3dqmDYUx7tFP0v3T_HgsjB9_mkCe2BY+ hash: v1.k794b7964.98cb2e5267e4fc26990e40659030b30414bb17294addb372bb9dd977130f2037.bPeMndRVn99lBi22GJPu3kwLC6Z-4sXlMgXVMOcXmqcexporter-trends--trends-table-breakdown-insight--dark:hash: v1.k794b7964.b405c1ec4fac6926a7d94ab64146c3db056e5c5521a9e532dd2cdd663472b24c.ot1LJLLfiQQHdyUE3WZ_LUuEGzLcBYBegDMBTRYNI8sexporter-trends--trends-table-breakdown-insight--light:@@ -2313,13 +2313,13 @@ snapshots:insights-funnelpropertycorrelationtable--default--light:hash: v1.k794b7964.93b684089bf1841a469d9729f6def9de52d3c4e78c26ccd34e7b8647ae987c8a.P883wk4hR7v-ZFklyJK1eNxBfhwFq31G6RFxI3knt3sinsights-funnelstepsbarchart--breakdown--dark:- hash: v1.k794b7964.28f056919e92f43ac53bab269d7dec2eedb51ce406bb8090496238f003fcd355._h95-MRPmAZ028oZLvOcuwEOv7MpFMGSvfruoivv7Z8+ hash: v1.k794b7964.24231a6c0aa897026ddab3516709f6b5b63f78ba31cde438f8d05d48eed3f580.AhJlZ_9B4fS1-k9KjUe5Rpm5EhXFg-tDGcebGbLSaZ0insights-funnelstepsbarchart--breakdown--light:- hash: v1.k794b7964.706b6d4d7e1f8353ce4973b3a7dc48f13689ae002661ccf2e71de2b94a75dcb0.EpenDRyiFz5CS8Bx9COz-ldw9gN0G0f2o1xCIWRiDbg+ hash: v1.k794b7964.d251129665fb4a0cd45c06d2ab7186b4c5e2f70cadc2a24351f400c8b6e2d122.M4Ps9X0HSaPRWazFcYZAU9fHv56ShPenJcRtk7Bakd4insights-funnelstepsbarchart--default--dark:- hash: v1.k794b7964.818214b8cbcdf48a5e7a2f255ea6c42dfe70427e2dd1a20e850329d5dadd65bc.PJSUc2WsEHJY33hYYODoUtT6r3DfURZpebRTp-EKyxc+ hash: v1.k794b7964.7d34454430cfb4586695de29f16bfa7c93e39f3f0b3694d0b341de711b829f5f.Me8dOXwJ_ZztmRu1eL3TOOjdr_rG1UN8oU6Kd-3IPZUinsights-funnelstepsbarchart--default--light:- hash: v1.k794b7964.5194595dedee64e6f1a7b2e34fd5a57647281f5e602996c8f402454eb3b999a8.nqlR2OXM-KhgDmfF3wdsjp6dSpZ6HfwcFFc5DcTpgM8+ hash: v1.k794b7964.fe6293e80ff3014aac37a652107195613baf23e61d8612e7a2156478bce8a138.FLFOJroOGoBFApFzYil15PPT2jNF01yQtezK_StFjHUinsights-insightstable--aggregation--dark:hash: v1.k794b7964.3d30c8147df56b0a107e31782abad7b8b8de4a12eb118fd2a822b44bde0cb436.4ccbN8zl4AGJjBt8tS2X_7BBPh4do4H363_ZRY5Aticinsights-insightstable--aggregation--light:@@ -2437,17 +2437,17 @@ snapshots:insights-trendslinechart--single-series--light:hash: v1.k794b7964.d523f2e0025ac6c75e4ccd99908d3bf0ee171e17e9adac7f5e12b1b2435ecd61.cuZU1K-ITuLUvtvuDoIyJWjKumvH-TUVNT6ldn-N81Minsights-trendspiechart--breakdown--dark:- hash: v1.k794b7964.8d4c92f0a1ce19597fd52a876aaed995f28972f7f774f34690b629c5246f7a9e.AsDNdz4YP9an11dMqIiQYZ7ghQGT8PQhWuCDmn5YKi8+ hash: v1.k794b7964.889edbc09e14e53381cbb016cb220cbfb6f05a98cca0f6fa21cdc501db2e2bc4.M-fQxu_o27xCqVYgzjZmMPcTjl7RB1FFZ6f6Iq8eticinsights-trendspiechart--breakdown--light:- hash: v1.k794b7964.4bca9ede695b12d104fb11793716085771ddb03e7b470a07dab1b769ea0d966f.k_bZydZiedoBdJgAmx6X-lSLDp0XHqNsATZ5Noj8ZYQ+ hash: v1.k794b7964.b6233aadfc83aec40901c2cd6608c5d88e44eefbd25e6e7afea09d570a05de85.QCsOOc4PFPILbRhf8LY4ZGH2ORVSrMi9ybvgZs68XVsinsights-trendspiechart--breakdown-with-labels--dark:- hash: v1.k794b7964.09156814065da8b9169b6c14aedfbce8ceb3c9d5ec409149f5645cb3255f071e.VfWuHDWhnbecvPQBEBQ1ppKc8ii68SreC8lMye7M7fI+ hash: v1.k794b7964.3807e470c2f57df347079c073e649cd728770e2d20cd3ffeb06eaab62ed9c32e.YTPrVk8hLVgs5JmucgqpN5MDL_fY3he0UaPeuDbEigAinsights-trendspiechart--breakdown-with-labels--light:- hash: v1.k794b7964.cff81e11725f369f38fb6bf5b2e90097335d5983464ac520dd82fb71e8f072ca.XV3WjzjPSfvhp0eCjtYFyjU-ONfOHYpMrcSEYz2ag20+ hash: v1.k794b7964.fa244010cd93253784e50e6910d93b5891ca273544091c4f3f61c5a766fb0934.UAU28tkb9IKXd5fO4hE8OHca0PCTdn3DlFwqgJFFmcginsights-trendspiechart--default--dark:- hash: v1.k794b7964.c83882557d57eeb496f235aa70ffd103acbe7a25917412ce9f5e201d899197ef.kA_qaI1rsg2_tfZjgq015a1LXwvHL29YzImHfxFyOhI+ hash: v1.k794b7964.f48431d18162f354bc4740a7b7d83975c46e7bc154dfcbb12639434d4f372ff1.ZIxjDiGV7z8DnS5jhxryJSm88gERo__Fsa3BEnlr7cEinsights-trendspiechart--default--light:- hash: v1.k794b7964.d7826e61657fe26969b229c7c5ccd5e42da662f6e900aa0b69d381f5e3e29e24.uigApQKpO2eaMvS7VYxmHOB2Z8Ng2Mpn72wlEdWo07U+ hash: v1.k794b7964.6c1baad55ed61d997f367df06da05cc718e43e228de1b5d99916e808acf52b36.KwbeSMAFlL1HCP3UzwfguNGu79ewS5NXgFbb6KaYJpwlayout-feature-previews--basic--dark:hash: v1.k794b7964.65cb2d154c4f630bc48a9f6b45b24e641c97b4412ca5170e0c1de8bc5c7d759d.vu2XHwyh2oLXbqNS7NdZd2tABaC8nM7J0iJps6FVYl8layout-feature-previews--basic--light:@@ -4137,9 +4137,9 @@ snapshots:products-workflows-customerioimportmodal--step-4-track-not-configured--light:hash: v1.k794b7964.0c12ef544c84ec7ae9b29c8e7c42959b20804279decada2113b22c7046d1bb2c.ECoUdYcPuDZpQD3kYqA5Qb0bphPysk-W6fDWbFcDoKsqueries-webvitals--web-vitals--dark:- hash: v1.k794b7964.3dafd5bc502ee6031605a593268702506114712a79bb67dc60a2887ba0410647.a77RXLksDGGzNOn3bpI1117NdOPrICX-qm1PTpzleEs+ hash: v1.k794b7964.76c14b523a5007e6125bda34364007be7f4fd1a986c6f2561c25f929dbdaff46.P_FtjVac3TGgoWu7GGabJQheD8_fJ5vDVL4iamkfKi4queries-webvitals--web-vitals--light:- hash: v1.k794b7964.0271a3812724e4edb5f2a55c33eb692a28db1eeb7753e0876c57a44bba4d754c.qXrXArlo1uKcd8RMT7oQGqegDgW9Uk43asDbEnI4szk+ hash: v1.k794b7964.8dd2785a88a63eb34c7a0ad9c348a69b78f00af0d87ed06c9f8e2762aebfbaa5.uGi9hKpXkzHKshzlkQF0fdWJwsKa6nbEQZnyfSoZAcIqueries-webvitalspathbreakdown--web-vitals-path-breakdown--dark:hash: v1.k794b7964.b0ef436291d127e0454ce74a02c768d1f118f7e32d17271d885ac42c975b46ee.IASwEqjMsp__Bo1Cap9WhhtInKGDq9XISu718YwO9IIqueries-webvitalspathbreakdown--web-vitals-path-breakdown--light:@@ -4717,13 +4717,13 @@ snapshots:scenes-app-customer-analytics-journeys-nodes-profileflownode--optional-not-completed--light:hash: v1.k794b7964.165b884e9e737c00707811f9efa7d348927a432402c544b41495eac9722a1fca.wqLWQTzb1O7RBTeeyTR5l_hUeX0IpJXkgexpAQbuNWsscenes-app-dashboards--access-control-dashboard--dark:- hash: v1.k794b7964.12745766f50dde3e9f05439b643cf0464f8836f882da4c17eb3aaaf9cf201976.I7Q4oVL7ei0NVclXsMhj6Wq7sj88Jbj_1bbKkp8Bcsk+ hash: v1.k794b7964.f0246c64fd40a892d19450a37fdb3f12ff7c1167c553a809dba65200a9635347.p3Q0m7OSmNDRDjl_xRq5FEBLPRP_NbviSTmngKbb568scenes-app-dashboards--access-control-dashboard--light:- hash: v1.k794b7964.7f321c2ab14a4dd1db4ce4e64aae602bff0cd7612b03f96cf529ee1877758f07.VcsffTezk6l9zVqo58x3o2C2gABrfdtFlKX3ocYXJkY+ hash: v1.k794b7964.99949a6672c0e8427045e95677c5c7872494c7e5341e979c9146af4c423959ea.iBVwcBrA4JVwNZYFOdTsN5w-id81xZJ25uKiHdo2Vpcscenes-app-dashboards--edit--dark:- hash: v1.k794b7964.6d9f86e5e70c5e104354bf716741e81b21cc9335902be2ae193e056e2c99e990.uVpbwD8wdxAgDlmsHN0MnOyVL94S1R-d1LwyzWPX_HE+ hash: v1.k794b7964.c50ed8b3d4e8f05379de3a7b9aa750f954cc76e90f125a5a1e3a7873808442bd.7ASSpy1GLBsieparaxbQnbnnxIjryLBUVwXArMcbaSoscenes-app-dashboards--edit--light:- hash: v1.k794b7964.18e854e3bd5bdc19a13bb395aea436a78509a9fbf12e2d553c3df437abd5db6b.gJAzPLC4weXu0O2-ZaI0lAQouJgoeEQZT7rV4AiB2a8+ hash: v1.k794b7964.2f0ef7ae3cd8daa761598ade2c438c61f9dc4494992d85de0dbbbbe67b024960.l-9-bBOQOXiBOscFLMZf3cwMg5ZSXVV6_eXSsVzmycoscenes-app-dashboards--erroring--dark:hash: v1.k794b7964.a356bf2ce40e53018919ebc890579c0ad6e493385f546d26b1f70471bf99f726.UER3Vv5UUZ1POzJv4_TuxrLBcLfLa8WTZ_hyUX9t72sscenes-app-dashboards--erroring--light:@@ -4745,9 +4745,9 @@ snapshots:scenes-app-dashboards--not-found--light:hash: v1.k794b7964.1ce58559d0a7f0fdec75dc0cd2230c29bf6dcc25cb275a8eccd9a5c2a0a928b6.j9xKwNlmX3cJs2iIEJw1NuA6vMsMRIvFsNdfSYwmYN4scenes-app-dashboards--view-only-dashboard--dark:- hash: v1.k794b7964.ad4ee20092d75b9617f0140049a8fc66b360529971e3a7e7ec5e40eada0cf753.4Dc7xnzHyKOCv0O1Yf15um4H2DZsXqR5_jvgERn8slw+ hash: v1.k794b7964.3db6aee04e6438e793845be191d6350e24d7a35e85db216c75241f1b4f828b1d.94AM8pD_Y6CL-zQ8rZzgTJzPhTdSxbsqFpdb4dIIQAYscenes-app-dashboards--view-only-dashboard--light:- hash: v1.k794b7964.c9b7ebd8c4917275778e2211b42e533f92052ad2d73b2227bc979553361a5d7b.QoMJGJK6_1Gyeb8shtYvnWi3DcvE5kJBi0FdsgK8HMg+ hash: v1.k794b7964.7338ceaefeb3311cab11d9c1cc928625ba35fca2ff4758ab6239eae22533cc12.fItm-tytYs97B3SLGKLqjTRMC4Hg4WFRKfQCVgIFJaMscenes-app-dashboards-add-insight-to-dashboard-modal--default--dark:hash: v1.k794b7964.9e274692c8e4c207d502de8e74ecb4ad848c351a69dc19185ddc3d52616e9c6f.JXi4RnJ4pej3Q4xhfMDQUlzqxMhz31nwrjmt1U-Fwboscenes-app-dashboards-add-insight-to-dashboard-modal--default--light:@@ -5017,13 +5017,13 @@ snapshots:scenes-app-experiments--experiment-with-funnel-metric--light:hash: v1.k794b7964.5e7a0c81eb042c762c634e2c69fef02a39891d9c66b65251a1e4675031150509.fcgUg9g-plu2c8pDYTMhggw9wWTVjvIJPkH5SQBCwo8scenes-app-experiments--experiment-with-legacy-funnels-query--dark:- hash: v1.k794b7964.5d2468e37868c1f7eb92bd6194d06bb4c58ec1e67eb97f2381bb554b6a50c25c.A-5pOsMFnOdqWaayNMR2WpehMVHF6c-PZ4aGq6L4Gvg+ hash: v1.k794b7964.68460634c7871eb1b69c8e5b95a742ba3c4f8aa07ff6abf8c4a89f1d7f4f374a.23hHeldky7d2YP3A35Nj1FkuHvypokfcxQ1a_KjmoBsscenes-app-experiments--experiment-with-legacy-funnels-query--light:- hash: v1.k794b7964.b80c359241a461b8960a023867f1cc1be6cac2a54b5e4ccfdfb7b30a0d6f0aa8.5vBvNXUQlf56L4QSUNcUukLTqfG41eG38yJgOXzZ_A4+ hash: v1.k794b7964.a87934a3ce8ac04cdf333b3eb1db59984d5be132cca82055e7df81e82e48497e.9rZL2uN4t9aMq3e1fsI9NwJeQDTbW689eubQeXnoG9sscenes-app-experiments--experiment-with-legacy-trends-query--dark:- hash: v1.k794b7964.1acc9602a3d12492e72edeb70152d2f9de89949e1147ef959bee9c3575aef370.jboMbYWg2AwJStHKYLwp9y9qw_V-2RAFTmj_xWXGxh0+ hash: v1.k794b7964.2642d7f1a1cc491911c9fe3a8fe9b13c985a7916a4dc57c4aef8cb7e16cf61f5.ruDUmmq4fqb08YoFnftmcUWX98oNpv6Ed578rJMY_jYscenes-app-experiments--experiment-with-legacy-trends-query--light:- hash: v1.k794b7964.476bc34ecdbe85ef6886e553757264580dd35d0afc71b55b6bf607b88e2a0f5e.SL7IVmhf0cAXYdc1HVumK6BOfyp5v4FenuFRP3oAw4E+ hash: v1.k794b7964.5d7c6589a35a04b255c8de5fbdbbc3824e1524de8ba3879ba7de125cee7b7226.wdBm0wvQO4s3NCPvzjHyLvLb6VOANGcbKuzVA11SiqIscenes-app-experiments--experiment-with-mean-metric--dark:hash: v1.k794b7964.ae5a863f1fc38edf2644a152758144c450199cfe550f6ff386ecb57724ff180f.aTBXlu3mSnnFkZI1PKUEGW-i8MFQJW5h01geDRc4aR4scenes-app-experiments--experiment-with-mean-metric--light:@@ -5345,17 +5345,17 @@ snapshots:scenes-app-insights-error-empty-states--validation-error--light:hash: v1.k794b7964.92c8fb304c0601de4d84a18678870a40c35c564e46b77acd5d67f43106ed7c40.dRaYnRLbmYUMOvH8PMSu33em-0hXHbajbOFCw7EBVwQscenes-app-insights-funnels--funnel-historical-trends--dark:- hash: v1.k794b7964.b7b66559dccb763f858ee380c0d40d53762513df15f578847fb7d9e4d895bac8.6oo4h2VarntGAxWHNR2JnaPQL3-aBA8yjSewpfh1nK8+ hash: v1.k794b7964.a871777b2ae5fb6b3a68d8cebb2f807a7da34718be4f7bebb0d40f052e35ba30.MlRqxuvlXyysTqN8Cd2862qAI3j1NTazNjE9EkCrPdwscenes-app-insights-funnels--funnel-historical-trends--light:- hash: v1.k794b7964.9fe64ca28742cf7dfb240b6aa406aaa4a2f432c37ee9bb8f48226288a0cc211a.cBV0X_j0CpIsQmxGgG-npGLQE1GhEHECWbdfi3lrviY+ hash: v1.k794b7964.9c7d214a8f73177406bd8a3bc84abff2b24732f315d0fc3e7fc617c99df4c2d2.wQuNgBlC0zQORtV6pPL_CdnrToB58y9NGEwNCAGnxQwscenes-app-insights-funnels--funnel-historical-trends-compare--dark:- hash: v1.k794b7964.51f9e17a891ee9e734b149f3d3e0d75a17efed2739fca34b2a60303707df663a.ILben9P-htPVE30EG-LMY2AmDKjaCcboMcsAm88a5gc+ hash: v1.k794b7964.f4bc587fb60020b6ae02ba70e83ef906546bb46242a9311da5170a5496c4c976.4r4IBmlktlCH3bT-R1_MsdlzzXEn83WBkQ4OAftHzyoscenes-app-insights-funnels--funnel-historical-trends-compare--light:- hash: v1.k794b7964.0c262649d9cccd6e0db23747e5dea4d4c6482ec8c39a843f85dc3d57e353dca8.WlfMvGeOV7nIb2BT5eLjcx5gG3UhzUIXXknUZ6p5xgw+ hash: v1.k794b7964.4ca917f28dfb4848493acdcd2eddcf6c97516bf199c9b9713c6404b8729328ab.xJYgWJDpbdsumyUDSqQ6y6MuiWaQ3V8rX9xzc94-4vsscenes-app-insights-funnels--funnel-historical-trends-edit--dark:- hash: v1.k794b7964.ddf1de4101252c9ab760f84a933063eeb60ccb17365da86b45e17eb2e427f1de.XJJJZj03zYGcwzIfDinL9v1jjblvbhyoBw6vJrZ-uZk+ hash: v1.k794b7964.e8c9aad63fffa1e349da585e5cdf845c07d8c63738ce5550de645b7365a74491.AIkpjBIa3tG64wwxHAYee_4d2YQznQXkIVu7i24Miucscenes-app-insights-funnels--funnel-historical-trends-edit--light:- hash: v1.k794b7964.fa67675b6f95f0ae9c46eb0e803f9db69702419bb4ccc2d21ea973f9fe49d9cc.Zz4siV83g7nIXf96Nfvy6eN5rRtzwO3CEmv24KSztlA+ hash: v1.k794b7964.0728e9b5966dbfb4ea7723a5b7814231ac31290a09ef99991097349d15917d47.dUMdOPwc6Ax3wK4qfrDEkcfqHO2s9rUXRGZB1ahkHs0scenes-app-insights-funnels--funnel-left-to-right-breakdown-edit--dark:hash: v1.k794b7964.1df97c88a1076b096c08deccb8c4c291c13b6a4a59fb615e2d77254547381c48.gTsDByOCU_bfzNraCRF_0neMgtIfTq796QitehbRNVQscenes-app-insights-funnels--funnel-left-to-right-breakdown-edit--light:@@ -5369,41 +5369,41 @@ snapshots:scenes-app-insights-funnels--funnel-left-to-right-edit-viewports--medium--light:hash: v1.k794b7964.1dd3425e658b907855610a715527654f68a242ed0c1427803dcf4d2289806fed.xd6ZnWiKWTOAglDDiM771sUAuByJ76icZNkrOre_orAscenes-app-insights-funnels--funnel-left-to-right-edit-viewports--superwide--dark:- hash: v1.k794b7964.a5b932cb8770bae7203313301e6d82642abab2793cf1933cb2989bf9c92158b8.i2aZRg7zfr3AlQxv3uhnKZxydkU-GKdInMrfbIFfkns+ hash: v1.k794b7964.a9771cd7dc958b4b77baee5c409c2abf6ea85f3bba61aead37ae749339c0727f.XNZOfKq7d7uxBPQCnxVyVxSXp9jUPh8fIC0AlmHwK3sscenes-app-insights-funnels--funnel-left-to-right-edit-viewports--superwide--light:- hash: v1.k794b7964.5da4732d8c7b2df4c65cd0ffee2395e44d4c36c2fdf9d70ab0ac3b81452606e9.K4GEmlun9gEi2a48nQduF9re1xl4ksr-xuwueGcyQ80+ hash: v1.k794b7964.a4910e3b150c07651b9ea86c326cc7b9dd1d43f6c56127826b323d3b75c5b814.6xgvV6z4bESi2u9Jp5lxC2wGcSm2wK2OvLLTlkzRsRkscenes-app-insights-funnels--funnel-left-to-right-edit-viewports--wide--dark:hash: v1.k794b7964.293297b83994468984576e5c15fa2cbbb2c4c0a7a8234959b9deba539efa383b.O7SwG4Drfr3z02hcLNC1LsLsGWddouhybBp4xZaUE-Ascenes-app-insights-funnels--funnel-left-to-right-edit-viewports--wide--light:hash: v1.k794b7964.6c391cbc05b64230fbd8defdbb960b131fd433409817497873fb9ffc705cd360.EIwByuofuT77yP259A9ffqfjSFwW9MrUDOvsZNA_aZMscenes-app-insights-funnels--funnel-time-to-convert--dark:- hash: v1.k794b7964.cd8e1c296deca557090cea1d5b4ae8b35f73aec0ecd9230f12e7e8a0447c68d0.6AK3HUdKJb0vDaN8oC7UZrIv2U3Lm1EKu5XpDKMcoaw+ hash: v1.k794b7964.139ac2a2ba0793aebe5696b21b742d6a484206b3ce00a761f96b3be26662343d.7xj_V_9jhyg7V-3cxiuKfQBByzk8QKycBYAM8mzvfz4scenes-app-insights-funnels--funnel-time-to-convert--light:- hash: v1.k794b7964.68da8b42ca1d02295cb56a9444ff9a7002b0626c620e0ec065d42844815c6e83.tnZvKyg0BKUhLY0Cnh_j3zlxUCFY72xBGl6Ek8gbYbQ+ hash: v1.k794b7964.821fe99e32b312e8cd43847e7d3365c2eb12fe4968520785b5d83aacef94c717.WFcMUHf3bcJNPAUArjNMQLsCKc-N1PjjoD7qxJk_Kqgscenes-app-insights-funnels--funnel-time-to-convert-edit--dark:- hash: v1.k794b7964.036a872b20107a1fd67953ff9e15bd9accc6b7685155ba234d009fdf7d44a4d3.aE9hEk8WAWuuEPb5D0YtPM6tK8l258I0HmIh0LpVMvk+ hash: v1.k794b7964.1a78f31814003b5f7d8979eacacbf2cc3ef7d7c7e104f7cd57603f3566417a4d.6FXd5Xuu6HycvkSw_x8AKYDiGTfRWtpcORXEBqwSa7Qscenes-app-insights-funnels--funnel-time-to-convert-edit--light:- hash: v1.k794b7964.61e950dfdb6f72f937c311d32292dc439a9290fc1ea1f219f08edaf87222e815.BsrF9SvDR3za4p4oN8yGY4nA2pS5YJV6IqB6N-2IbD0+ hash: v1.k794b7964.30ca24224c885fda02d7fea8a1344133ce2af7ca6f8a7ec99083f5e600e78996.XQtjANNALUeWiW9BvViPdiSIyJiqVNDR1J-viuSZHHMscenes-app-insights-funnels--funnel-top-to-bottom--dark:- hash: v1.k794b7964.a4f13ee3bf53e1386348a7cb72553c4da3f63d312af992574643ef8a21fd997b.HYi1oWs4QD1y3mTu8M-rYrg7_LY4L1BFMclury2vgZM+ hash: v1.k794b7964.8db1258f34ede6ad267bc642a8bcba755e453f49fbeddba9b7be8ed9923e8bb1.A_UiEvt5CZGmM1Mb_iqjGsY-7lOKcsD_RBsdBGhpOzIscenes-app-insights-funnels--funnel-top-to-bottom--light:- hash: v1.k794b7964.99302b9a079da8ffcf0d4e2e0a7c49059f973cf20746db2c36683e54022977ac.lkqpaaItMCexbfaGbzndDNtpZp2L0q4kV9ggQWI4MV4+ hash: v1.k794b7964.6c7299d79e6b47b447ac89c59181a858642fff6d2cbe202746787ed645da695a.43An8Y9wLoEYkKi_HxPHtOZbp2l6vp-plyHsAgJ_VWAscenes-app-insights-funnels--funnel-top-to-bottom-breakdown--dark:- hash: v1.k794b7964.e706026d9eb968fb9448b0375923c3440614c754bcc9aa60b3c6801e381f66de.owQ0LZjycsvgSzI4VKYl3_ZPO03teUnL8agyZCrNn70+ hash: v1.k794b7964.19e2593b56e521ad80a40bc3db42d3fec504130f8c9a0dc5d475e10bef3f1d8a.dg6LNB92YBP6JL665lynHN21pcG7yx-lIPCMjg5_M_sscenes-app-insights-funnels--funnel-top-to-bottom-breakdown--light:- hash: v1.k794b7964.9e04d65bb1b8b6df0cbbfe194ae2f11647ac07109ec4fff4490790398f56ee72.o9PP3ui3HnBeKwbuNd6ZMzwRtqbxOdlIg4LIQyW3F3Y+ hash: v1.k794b7964.4814867d6c7efd058bdab01f85af64c31bc1a4ef1bcdd6d85089ed2db0314a3b.aiYtHieenoIr9bTqDRUzETLqIkkp-2PKa6Qvk4a2p58scenes-app-insights-funnels--funnel-top-to-bottom-breakdown-edit--dark:- hash: v1.k794b7964.cfb0f8cc130e2dc59decdec61afe6821dd4152a3a2fdba63dbee94e5ea74a7f1.KMnTbXNd1fiD0k61yX8Q5JJATI6NssqLXOs7wKNlLf4+ hash: v1.k794b7964.68dab4828cba7093dab2123f3408385346662c89e5ed0c13e259e17bfd2b3c15.Sj_jCbechXIz_aE8a1G5YXoCkMHonhuxA9STkYYzI0Yscenes-app-insights-funnels--funnel-top-to-bottom-breakdown-edit--light:- hash: v1.k794b7964.b5f422b8df2ff917f0077d684888ab1198144e67b7e419a15d7218807f67c32c.XYB6t13nK13lInrveShIx-LA3GmW1cc15ZQWPsrv4gA+ hash: v1.k794b7964.68d572b2a7e9669170d7a2717f515316670a5446ba01e112cde75ac4c1e6feab.OpPuUGo6NaNSz7gCnrLmnFuyIMMyXgaI3wP8gaUSUQ8scenes-app-insights-funnels--funnel-top-to-bottom-edit--dark:- hash: v1.k794b7964.f8578b606e057bcb2fa5395badc8238e77d9e0d4711997d531f1cfc0176f15d9.TpVLrtRGblpVKz3XMvozXmsZTFof2VFdbVcG-WexEOg+ hash: v1.k794b7964.9baae3987aec0dd18a7f7573783f202aa258afdbb16f5385013a37c0484e8934.eSvJrFgW4lffldC6mfND9UHzMTB1I_vEuRyzJyHOIfIscenes-app-insights-funnels--funnel-top-to-bottom-edit--light:- hash: v1.k794b7964.51cecf6cfba0977bbdac098e68a1c139e2f40690d5d34773f6b5d89ae67b756c.nvTISlIyGTG9hLB0r1w9pLpWwQWlyKbN2ETW_jkXYxM+ hash: v1.k794b7964.f78e24e51ece8c96efb92693d8732a68b268a83803682b8b4fedbd1d451c4ed1.xfg-TjZJTYOCnTs0aiPqTmE4j4ESXGz6SKyXLPVxrSEscenes-app-insights-funnels--funnel-with-inline-events-edit--dark:- hash: v1.k794b7964.ba0ec7fef16f9e94cdcb2f25b5ce4551352f0ad5e5affcc4c3171c951cb92379.SGhkuWwrbqyb0uAHL4NKNuofaWxCU2d0es0jEgfxqIQ+ hash: v1.k794b7964.65778076636ff8753cd578d406c10820394eab62b5a3e03b423da9846d8f7e9d.iOGZxePDMGolQrRwl3nXNaw3OWDORHG4zJMDIk35EA4scenes-app-insights-funnels--funnel-with-inline-events-edit--light:- hash: v1.k794b7964.749e0bfc08ff4447d7043183f21fe29fe12ccbbafcaaacc31e0c459f7044f2e5.INY7-3l_AoT_skoWdjDfPSz8fgpNQBK_NSNtntm6GAU+ hash: v1.k794b7964.03fa59b4d62c55775880f09d3fafcc589596e845d4df2bb9f621e81282df1e96.Ac8qcwrvDKOltwsaIuWm0ykMda6ZlpnF7NLnfUYRWSMscenes-app-insights-insight-quick-start--default--dark:hash: v1.k794b7964.e91e85b0ee937a14ef9bc524a1b98568c55a38eafdff6415d46c0e27f04a0771.LUZPkOS3UjH82ME39wve3LwP9FipEC-HrNVr6Ag8t84scenes-app-insights-insight-quick-start--default--light:@@ -5425,13 +5425,13 @@ snapshots:scenes-app-insights-side-panel-actions--saved-hog-ql-data-table--light:hash: v1.k794b7964.c80ec6844e5a33812f3b7d26d2d5573a7232bfbe723776fe4a7f1875380a026f.Q70RPE5sHeebvksCsm2OOW8xwRZ_E_kgcJqg7BxkPyQscenes-app-insights-side-panel-actions--saved-trends-insight--dark:- hash: v1.k794b7964.c53a4b9ce169610257a3f7cdd6306fa4da5136c14a3ae55a990f50a1c633c729.7e-vGvTK3GNK5CJRh910JCwUHn6DswCkD-7zqO_PDHE+ hash: v1.k794b7964.332cb8488253e6de4bbd6a666a2d475c19a41d3aba6c10e78a95d953fcc0de91.sYQLthyrEV-whVxCfGfZn3NPwEv67g0vhGuTL0zpfrUscenes-app-insights-side-panel-actions--saved-trends-insight--light:- hash: v1.k794b7964.57a7b7f15ff50fd832f1d88b637a2c9670417b20d33f48e1eacc2ba6c29c80a5.r3lxem1mbfEXPVmeQmLxWiEZCfxM-OgPNZgBV_CKkXs+ hash: v1.k794b7964.cd68d89c3442df73f7f5e5b9345daddbae832d01166153dc6cf40455b085a44d.xrIkdYs-lpwCm68rMFNcMHlVqQ4jyNKKpuW0qhsW5wEscenes-app-insights-side-panel-actions--unsaved-insight--dark:- hash: v1.k794b7964.4cd74918a5c29a41a8dfc5e0d01a4ae1881155b655357943514fc66e97ba72ce.7K_-AhwmsOeu50AR2Y4dcAtl3QhhRzmZB-WEYBJwjL4+ hash: v1.k794b7964.2cd445168d9aa69e39e065688930954c16a75b54e4bc7d394b0d2b04576c9d0b.2yS2xqN43lWt_pXMByP4HaHc-lwjaanjgI3hiwYJynEscenes-app-insights-side-panel-actions--unsaved-insight--light:- hash: v1.k794b7964.dccf699de833f6658d925dbfe65127d94b70b4e27a98eac1bd07e8583c802c5e.XcX6O4CWxckGkba435Tbuoz_xLtfYOop2WcZaPI-UD8+ hash: v1.k794b7964.7180b4983b5642a68739131ded6c6384da02a0ded7222a61b953528408c0d8da.SMleSIwURAK37u45AflJdlFC9lvQimCdvghXz4PxSF0scenes-app-insights-sqllinechart--sql-line-chart--dark:hash: v1.k794b7964.733c97d687bd48371884a604f2f767300bc2d185494e6f7ecf02faacea08a2f2.E8RDDT5TN8xSbobDRw7nQzkj55V8nBkdanQYk1Q-NYcscenes-app-insights-sqllinechart--sql-line-chart--light:@@ -5473,21 +5473,21 @@ snapshots:scenes-app-insights-trendsslopegraph--trends-slope-graph-with-legend--light:hash: v1.k794b7964.f69c8a996a7ed866d6f9c8f0eefc4db3959b1a38c4baeef46c4187c9c16a0d16.6HSKTeiFXbRGVfzwDHFKqE6GJYoLJt-if1LFCMMI10Mscenes-app-insights-trendsvalue--trends-area--dark:- hash: v1.k794b7964.3fce948481d1b3be054893a8e99508e85bdff69723c91f864e311ca498389e87.VY094hyWWNRusfn5-e_sxtQ3JZMauWFWoD9Nu0X8x4E+ hash: v1.k794b7964.203098a13129219f6c96261131cc75d6a8c64cb4afb1c0e897ffd5b599de6642.slCs4TqKRCSw9dt7mS4sDXIzpwxt111Bx7BIpU5d8s0scenes-app-insights-trendsvalue--trends-area--light:- hash: v1.k794b7964.5a0566cc7912ad27f4ee5af6679c88c9745c74bbd0eb87a2b2f0e9bbebbe1d71.HwqIlEO0D4D0bZ32or-nyiOrdOw4AlvnLw4b0y3FDdY+ hash: v1.k794b7964.da7863ecac7aa6ec076f176653b64c524314d4d161fa2b354c999d1031add198.t5XN-WpGZqYClwc2wQ7JJqOZFTRGAybayIbGTAlEcdUscenes-app-insights-trendsvalue--trends-area-breakdown--dark:- hash: v1.k794b7964.468b5f87b4f1cf10eae210b13297b44d2e613681f89fdd37290fbec48051242a.MCmzWVqbttHQY8Grhs3kyoqlYi43gsZJw6iti5ggy20+ hash: v1.k794b7964.b7eda6b37782629ca88e707b7de836dc875225bd60d606087be0880649e5db84.2FII1dVVxm7cK8Y6TKlatAewsIlL2RwndXeyb0xKa40scenes-app-insights-trendsvalue--trends-area-breakdown--light:- hash: v1.k794b7964.8bf443e65ccd60ff0e2b128b1456300fd53f5835e2bdf7824a0fcd6482e55d23.B9_O_yYJpCr0PMwgaxPb-jJ14jGAXeCc1arJ44ozb0Q+ hash: v1.k794b7964.abe4b8ac79bee7201f1cf8b84cf299cdcab01ffb4863e4867b967dbfbf767312.WeGkm9v4juuRGsH2hV-ppycwQ6jMtYLQhjfBItbUtpgscenes-app-insights-trendsvalue--trends-area-breakdown-edit--dark:- hash: v1.k794b7964.e45d219e05a7129546747bd1cb1f0cebf8084936604cba32b9c43836c0c291db.3cZYSWpMHhGhmMBwLZ9g3mUaZBwKxHhgw3owTG4Lo3M+ hash: v1.k794b7964.bda184777d4c9dbfa863efcc0f3e52e3c90ee887e88105121b14f139b9f9e3a5.d8Zw1EpP63vF4jVDxHIsEIp6dohFfUiQSLhaHoYp-e0scenes-app-insights-trendsvalue--trends-area-breakdown-edit--light:- hash: v1.k794b7964.4d26f3c58fd59276c80e351cdaf7fc30ca776907b0cf11241f3a19de4423ec8e.AXeboQJdYsIpyslKD0dRjj_HG-O0Q4Ppz4PJbq6TVtM+ hash: v1.k794b7964.98bacb8c07cbb845e0e40eb32bdeb1e49d78098a0c2bd2d149aa97a7e1a7e586.QM7gI-OyFrQmYl15SvMiJhs5lIO3mtqN3vNUn6pimU4scenes-app-insights-trendsvalue--trends-area-edit--dark:- hash: v1.k794b7964.b941031499e3fbcf416d6e7439327b42b4ad8ffd290c4b82694bd5f828364216.ODNYzVn4WUIIHVFwE3G8oSSmfT7N_ea_0fLxzeEhP7E+ hash: v1.k794b7964.4ef6f6e78c308faab0832483a9ad3fc5a779a57580f883acd6d7e5262a667967.g5B69rm6RChzW9gxld680hJ78z0i0UXqc0DaiL81FZQscenes-app-insights-trendsvalue--trends-area-edit--light:- hash: v1.k794b7964.5ddcb719e6bfe9e4c56c09164baaf3cb0bc2e4038ad3108cd284ab8953050542.6276yPMYZvb3d_QEYva4Nrec1Z2dOfvgIEVu-P4I7Mg+ hash: v1.k794b7964.bbe607825ccefaca49d3c49d7bb44c51d7b339ad9efd70700956a0d88e257d47.7eOWo5lXZmPfq4lEPRXcDc3n3qiQGi7mOi1zqzRp27sscenes-app-insights-trendsvalue--trends-number--dark:hash: v1.k794b7964.52d5a5cdd707d7a78fb3c505f004956e32f33e50953ac510d0cc932773ade3cc.QrQ3hXksznsix9wKPgq_rD43hvjoUAYF4JNBoGQxz1oscenes-app-insights-trendsvalue--trends-number--light:@@ -5513,33 +5513,33 @@ snapshots:scenes-app-insights-trendsvalue--trends-table-edit--light:hash: v1.k794b7964.13f63bcbb5c35bdba27dc92b4a0044a4164e2e3ed6ab07b771dbc308f8d078df.BirKMNAtJ4FCV8irKw110VLdLuTyCcjWTyfu-6HkLO4scenes-app-insights-trendsvalue--trends-value--dark:- hash: v1.k794b7964.7095419ccda565c47cb2e7122675bd9a4f55a7c415662eebc7c284132764b4ca.dI7_V-YzQRzM9Pkz_d_f9HogTulD_GYLhmqVMRhg_MY+ hash: v1.k794b7964.677cb28359648ba33f97b0e4fc4b71f6ea6b28c252fa6db39af528998e705e9b.lWnKYrIwb4GR_sABMJlD3ncHDnF26EDwaTLVWtivtBcscenes-app-insights-trendsvalue--trends-value--light:- hash: v1.k794b7964.7a836c4a9362680fe63fe8f093d4b17162f1fbfbddf0f33812c63db630fdf1b1.64_HGQma8ICeeA8FCsUR8xQ4eWcAc77EBgWbng3CCr4+ hash: v1.k794b7964.547db32b6c696699f5c3f840bb0a2454089af5f97c08ff514d6614b8c805f665.ZNZGefrXpfP1T9goA6kOwueOZtfFzAY_r8RkYnckxjsscenes-app-insights-trendsvalue--trends-value-breakdown--dark:- hash: v1.k794b7964.989348c0ed26c874303f42eb471fcc6628ae57e8301484282db10e419792292d.fFI21MT9IyS1RHezog4c4Uaxz62P5StrtBpRLJkb7yw+ hash: v1.k794b7964.76ffcc1cd6bf5960c8080adebfc11139b03cdab3cac394121a73ead1afcf6cf9.WlP2zZtpsCTfXquMt0D6x8ll_S9ei3u-nIecwW0e-O4scenes-app-insights-trendsvalue--trends-value-breakdown--light:- hash: v1.k794b7964.4a6ba5ef1cdba7055141d523f74c4123783b7fc09e8ff92c82bdaffe11e6bd89.92-68vvpxUwl-WP7lexog9ACE5fckUlWm4cwWAFjKSg+ hash: v1.k794b7964.285a1a56fd6ccfd738f18a7341044c73e06a62efb0aeee0c8aeee1ce92ac5fb1.feWWLBlFhXSzeDHjorrMKlt9wTTUGuNJnAA10eIhARcscenes-app-insights-trendsvalue--trends-value-breakdown-edit--dark:- hash: v1.k794b7964.93b31bd54b2b3ac9931e18b461efc9b1794674384bf9da92acefad3e5c8e79ab.5jaLXCxLQJ9c3qJMmY00A5D4nggf-hM8_xlPvYo-ZZ4+ hash: v1.k794b7964.ff30bf18beb9d8c46401be64c7a2bf12428dd4d031295cf9675294e50c9ce4a0.1j3HOkYzNDhz_DGIvme3YneKrHGjPcNsN6kqG0KA7yEscenes-app-insights-trendsvalue--trends-value-breakdown-edit--light:- hash: v1.k794b7964.91dd5381e038c65f212a31ea003b017ef6ff08765f553e5e4def53e0ab72d4a9.8WZvFTgBTsQaC1rRB-IU6wN9ao2fncJ8CcRebh33zvg+ hash: v1.k794b7964.ed25a21517e2655a227f32013c90341e58e3391f4c57e6fd4ba242436744403b.ZwjjHdgnHxiasEcjzFW1QUdHFzjE2Porpdkkzsg3XgYscenes-app-insights-trendsvalue--trends-value-edit--dark:- hash: v1.k794b7964.e9fb9d77ea4957f9f156b5de45ca71cc0e99efea9db9b641bacec10ec304ae6a.pd0UO41nRNT7A_HQ9nhTQkHuGoANfCJ88IQuX33ATco+ hash: v1.k794b7964.726de2256a56775258704a7967cbf1cc3dcd4567892073a28fd44ea14c5b3f99.eMs6I7On5pOGTsPE1IwH0X9oZ3QQT9CYpuVbP2i0zZAscenes-app-insights-trendsvalue--trends-value-edit--light:- hash: v1.k794b7964.2a8ca0bb07a50f7ebb71f0c628283a9fa37610ba5350ad29c4a5a481d2692b3b.zQ8z5OfwPZsC0t_6BEmRqbodIWCruKKwJGh7uwmTR9s+ hash: v1.k794b7964.68cbf9d2c4eee61b8eef5141e734aae405e6d105d89fb69d0c6441ce078cc5b2.qwkZFZoVvzH4SiQrsNTpLSsQx70hwOSodMuuc5RaW0cscenes-app-insights-trendsvalue--trends-value-edit-viewports--medium--dark:- hash: v1.k794b7964.150d846021110c2c28072d96bafd86a9d5a69ac9d2d91aa096ecf06fef919c65.Vs2RNoz98tV2CZiF3mBw1xQzYKIJxubbTg16ACV9Ihk+ hash: v1.k794b7964.e7044397a27dcb03b86b15758799bba8089b4d7bc2b29a7a18db59cce2b1f9a3.5yNnmZ_BVh62ArvpobPn4Z6w1aEVY_y6pAx6lLMHohIscenes-app-insights-trendsvalue--trends-value-edit-viewports--medium--light:- hash: v1.k794b7964.8129f7f1af9064b52153908259f4770702f5011886b324ef354bed71a7d65faf.F_dkm08ItyNEDJxNccFxst17cffF-5vtZCJhcKbDssk+ hash: v1.k794b7964.a246a8bb19be402db8314fb17206629963ec64918eb2a0ae50d2e1a4d8ab4369.J-mb9e0a-70yHqfKhHCObGVMC6SE9tSY2nFMcfi7Y_Qscenes-app-insights-trendsvalue--trends-value-edit-viewports--superwide--dark:- hash: v1.k794b7964.fa3bc61ad8ecb1767f4da5e6a0efe08c3f4d9a141a173d4c247626e2200c3d32.BbSIFm0HAQfrPXB6Z2Rfsw_pY-ft5WY-pwyfhVjUA_8+ hash: v1.k794b7964.f9fe737d38e849f2642d1a3113e86b01b53cde003a0ce4873d5df1517bb3ebf6.8aLI-A1icMtqIB596g_PqbTWx5H3gu3kwqF-CW1WdXoscenes-app-insights-trendsvalue--trends-value-edit-viewports--superwide--light:- hash: v1.k794b7964.40bee35e165c29ec3e6bf8f00b574a6ecfab699e1b961662e2401b5405d93ebd.9SyZcNaIW2qnqprfyAAaavQoKkJ4yaLKqlJwwkdTGY4+ hash: v1.k794b7964.0380c5cd613082533e40e0ca981f332ad2083fdf98694d7b9081b84467d326e7.0ESYwRfLXdKcMOI2BtWpDHz3_jrYHNDk6JEIZQ6AO4Mscenes-app-insights-trendsvalue--trends-value-edit-viewports--wide--dark:- hash: v1.k794b7964.e9fb9d77ea4957f9f156b5de45ca71cc0e99efea9db9b641bacec10ec304ae6a.PUIskimXXq2dIkFDWwogbPKE7DNE5ybU53xltQFKuP4+ hash: v1.k794b7964.726de2256a56775258704a7967cbf1cc3dcd4567892073a28fd44ea14c5b3f99.huRTSXRkAiH3BhfNrrH4FB6Pp90yt1cA4yFqx19mofkscenes-app-insights-trendsvalue--trends-value-edit-viewports--wide--light:- hash: v1.k794b7964.2a8ca0bb07a50f7ebb71f0c628283a9fa37610ba5350ad29c4a5a481d2692b3b.FKPig54aXHNxAXtsZPP74D8Dw42QxK8hUndtqdhgIiI+ hash: v1.k794b7964.68cbf9d2c4eee61b8eef5141e734aae405e6d105d89fb69d0c6441ce078cc5b2.8LLKevlrrLubcwVZ2fcxipRqdisU9Q4x1uPbdxb56r8scenes-app-insights-user-paths--user-paths--dark:hash: v1.k794b7964.6de0562db52b17d70d574d61eadbc16b27721788c4d7a29dd58cce2f94939b24.PohcqbSYCzy3s9OGIAFCEK-J-Dzrr_Fc6EtRb579xTUscenes-app-insights-user-paths--user-paths--light:@@ -6465,17 +6465,17 @@ snapshots:scenes-app-visual-review-run--ready-to-finalize--light:hash: v1.k794b7964.cbad9f0954e55a8a37053d4824897f00e6ce6cdfec8bcf16afcaaef887ea53b4.BtH21G_RiNOuXE6qtG9BjC0OEcbzdO5SfkUft7rL56Yscenes-app-web-analytics--web-analytics-dashboard--dark:- hash: v1.k794b7964.918e3e893e634a2ea697e21bc8a47b433261d2cd70f262bdf9f89a4cfbc8c89f.UVILZaS1DVrMHZKjXeu9IdpDmNRizwe9RpXAWfYaWq0+ hash: v1.k794b7964.e25a818b0ffdb3f8ce23e74b145500851bec3cb1a413282b6fe8748e33bb97d4.rQ7r3LELEifqwLSEximUj5oTBpTtbFwJLFYx0DynTwMscenes-app-web-analytics--web-analytics-dashboard--light:- hash: v1.k794b7964.42878a671a1ecca009f500fad2669161133889d745a2acb7c5a203a2ae8c893e.xLG9ATWmprvvRIk7t41FJJtZlhdUr0scvjijzRIOc7U+ hash: v1.k794b7964.bd04edd79ba02d406697f5047aaa604c2e06538e9266c6987de51c8356c7590c.ds6vJlbmXbrvUNLgFQ2U2oGRbt_1Z1MqBhHE7LxkOpMscenes-app-web-analytics--web-analytics-dashboard-loading--dark:hash: v1.k794b7964.7b4434236a2118c3a34540cf8245f4f9f08f1d209f868d5323462332160275d0.wUzGBcvTbECroCJ6uEjdcozJUJq1uniLxVkSYMaEvAwscenes-app-web-analytics--web-analytics-dashboard-loading--light:hash: v1.k794b7964.86d2e5319eeddd603f5ca5b3da1fe1156d198f9d543dc5e5ad9cf0068faeb521.4i-CGLH6Jyfjj_hg-B6BtjyrJRQScB1RHuMy0Av-MgUscenes-app-web-analytics--web-analytics-dashboard-metric-cards--dark:- hash: v1.k794b7964.a57cc69f41eeba38ce0d9c16808cdc7d24931406bcad89c37f4d0cb301139714.IP-A5Q2EQ8BQCoKz5qxWQoMW7O68rWW-35rEf739uQ8+ hash: v1.k794b7964.b2210eb784cb5147f6f15bc8f440f17e66a062363ef45d0ae4f94857ea08dfea.XMKNym0xY2ewM4NRdUqwBUIay9GNgMCVKCyaV_Ec6yEscenes-app-web-analytics--web-analytics-dashboard-metric-cards--light:- hash: v1.k794b7964.f93eaa7cef4cefb54ea4eb0ae632e77b95ad2c651cb383c479c231cef702f536.AuCTvG5Bk1P7Ju6VmVPTCtPvh_5qHa8lft-mGXoEf8A+ hash: v1.k794b7964.9bf4b15241d6ad9dd5ff8351d0e406eae90ed3b90bf0d27898ad71fcac75c3cf.JHdneVs_9-GeN4mCAGsHiqOOb54zrfYevPNJ-Hf-DQsscenes-other-account-connected--github-integration-connected--dark:hash: v1.k794b7964.2db4cfed52e63c42b2f38f5b2c03f5a1c4229b916c32f0bd1ca6144f9cc3b88b._Q3jfpO6l_D6KZCh8fuoqhxFI6589TxijWK93C2uPyIscenes-other-account-connected--github-integration-connected--light:diff --git a/frontend/src/lib/charts/types.ts b/frontend/src/lib/charts/types.tsindex 15d40f3b748d..2a423b88f7ce 100644--- a/frontend/src/lib/charts/types.ts+++ b/frontend/src/lib/charts/types.ts@@ -10,4 +10,6 @@ export interface ChartTheme {tooltipBackground?: stringtooltipColor?: stringtooltipZIndex?: number | string+ /** Skip canvas painting while still mounting the canvas. For deterministic visual-snapshot tests. */+ skipDraw?: boolean}diff --git a/frontend/src/lib/charts/utils/theme.ts b/frontend/src/lib/charts/utils/theme.tsindex da93686acf83..8b438b6af42f 100644--- a/frontend/src/lib/charts/utils/theme.ts+++ b/frontend/src/lib/charts/utils/theme.ts@@ -15,6 +15,8 @@ export function buildTheme(overrides?: Partial<ChartTheme>): ChartTheme {tooltipBackground: graphColors.tooltipBackground ?? undefined,tooltipColor: graphColors.tooltipTitle ?? undefined,tooltipZIndex: 'var(--z-chart-tooltip)',+ // Set by the withChartCanvasSnapshot decorator to keep flaky stories' snapshots deterministic.+ skipDraw: document.body.classList.contains('storybook-skip-chart-canvas'),}if (!overrides) {diff --git a/frontend/src/lib/components/Cards/InsightCard/legendToggle.test.ts b/frontend/src/lib/components/Cards/InsightCard/legendToggle.test.tsindex ac63b2d2fb6b..dbc2426f666b 100644--- a/frontend/src/lib/components/Cards/InsightCard/legendToggle.test.ts+++ b/frontend/src/lib/components/Cards/InsightCard/legendToggle.test.ts@@ -20,7 +20,6 @@ describe('legendToggle', () => {trendsFilter: { display: ChartDisplayType.ActionsLineGraph },},},- hogChartsFunnelEnabled: false,expected: true,},{@@ -32,7 +31,6 @@ describe('legendToggle', () => {trendsFilter: { display: ChartDisplayType.WorldMap },},},- hogChartsFunnelEnabled: false,expected: false,},{@@ -44,11 +42,10 @@ describe('legendToggle', () => {funnelsFilter: { funnelVizType: 'steps' },},},- hogChartsFunnelEnabled: false,expected: false,},{- title: 'funnels historical trends with breakdown and hog charts enabled',+ title: 'funnels historical trends with breakdown',query: {kind: NodeKind.InsightVizNode,source: {@@ -57,22 +54,8 @@ describe('legendToggle', () => {breakdownFilter: { breakdown: '$browser', breakdown_type: 'event' },},},- hogChartsFunnelEnabled: true,expected: true,},- {- title: 'funnels historical trends with breakdown but hog charts disabled',- query: {- kind: NodeKind.InsightVizNode,- source: {- kind: NodeKind.FunnelsQuery,- funnelsFilter: { funnelVizType: 'trends' },- breakdownFilter: { breakdown: '$browser', breakdown_type: 'event' },- },- },- hogChartsFunnelEnabled: false,- expected: false,- },{title: 'funnels historical trends without breakdown',query: {@@ -82,7 +65,6 @@ describe('legendToggle', () => {funnelsFilter: { funnelVizType: 'trends' },},},- hogChartsFunnelEnabled: true,expected: false,},{@@ -91,7 +73,6 @@ describe('legendToggle', () => {kind: NodeKind.InsightVizNode,source: { kind: NodeKind.LifecycleQuery },},- hogChartsFunnelEnabled: false,expected: true,},{@@ -103,17 +84,15 @@ describe('legendToggle', () => {trendsFilter: { display: ChartDisplayType.ActionsTable },},},- hogChartsFunnelEnabled: false,expected: false,},{title: 'non-insight-viz (SQL)',query: { kind: NodeKind.DataVisualizationNode },- hogChartsFunnelEnabled: false,expected: false,},- ])('returns $expected for $title', ({ query, expected, hogChartsFunnelEnabled }) => {- expect(canToggleLegendInInsightQuery(query as any, hogChartsFunnelEnabled)).toBe(expected)+ ])('returns $expected for $title', ({ query, expected }) => {+ expect(canToggleLegendInInsightQuery(query as any)).toBe(expected)})})@@ -196,7 +175,7 @@ describe('legendToggle', () => {expect(getLegendToggleText(query)).toBe('Show legend')})- it('reflects toggle state for funnels historical trends when hog charts are enabled', () => {+ it('reflects toggle state for funnels historical trends', () => {const query = {kind: NodeKind.InsightVizNode,source: {@@ -206,11 +185,11 @@ describe('legendToggle', () => {},} as any- expect(getLegendToggleText(query, true)).toBe('Show legend')+ expect(getLegendToggleText(query)).toBe('Show legend')const next = toggleLegendInInsightQuery(query) as anyexpect(next.source.funnelsFilter?.showLegend).toBe(true)- expect(getLegendToggleText(next, true)).toBe('Hide legend')+ expect(getLegendToggleText(next)).toBe('Hide legend')})it('after toggling unset legend, label reads hide', () => {diff --git a/frontend/src/lib/components/Cards/InsightCard/legendToggle.ts b/frontend/src/lib/components/Cards/InsightCard/legendToggle.tsindex da41f3d74758..545902919022 100644--- a/frontend/src/lib/components/Cards/InsightCard/legendToggle.ts+++ b/frontend/src/lib/components/Cards/InsightCard/legendToggle.ts@@ -14,10 +14,7 @@ import { FunnelVizType, QueryBasedInsightModel } from '~/types'// Eligibility matches insightVizDataLogic `hasLegend` (trends / stickiness / lifecycle, excluding DISPLAY_TYPES_WITHOUT_LEGEND).-export function canToggleLegendInInsightQuery(- query: QueryBasedInsightModel['query'],- hogChartsFunnelEnabled: boolean = false-): boolean {+export function canToggleLegendInInsightQuery(query: QueryBasedInsightModel['query']): boolean {if (!isInsightVizNode(query)) {return false}@@ -26,9 +23,7 @@ export function canToggleLegendInInsightQuery(if (isFunnelsQuery(source)) {return (- hogChartsFunnelEnabled &&- source.funnelsFilter?.funnelVizType === FunnelVizType.Trends &&- hasBreakdownFilter(source.breakdownFilter)+ source.funnelsFilter?.funnelVizType === FunnelVizType.Trends && hasBreakdownFilter(source.breakdownFilter))}@@ -48,22 +43,16 @@ export function canToggleLegendInInsightQuery(return !(display && DISPLAY_TYPES_WITHOUT_LEGEND.includes(display))}-export function isLegendEnabledInInsightQuery(- query: QueryBasedInsightModel['query'],- hogChartsFunnelEnabled: boolean = false-): boolean {- if (!canToggleLegendInInsightQuery(query, hogChartsFunnelEnabled) || !isInsightVizNode(query)) {+export function isLegendEnabledInInsightQuery(query: QueryBasedInsightModel['query']): boolean {+ if (!canToggleLegendInInsightQuery(query) || !isInsightVizNode(query)) {return false}return !!getShowLegend(query.source)}-export function getLegendToggleText(- query: QueryBasedInsightModel['query'],- hogChartsFunnelEnabled: boolean = false-): string {- return isLegendEnabledInInsightQuery(query, hogChartsFunnelEnabled) ? 'Hide legend' : 'Show legend'+export function getLegendToggleText(query: QueryBasedInsightModel['query']): string {+ return isLegendEnabledInInsightQuery(query) ? 'Hide legend' : 'Show legend'}export function toggleLegendInInsightQuery(query: QueryBasedInsightModel['query']): QueryBasedInsightModel['query'] {diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsxindex ed03e905e595..e8d8be65f0b3 100644--- a/frontend/src/lib/constants.tsx+++ b/frontend/src/lib/constants.tsx@@ -420,11 +420,6 @@ export const FEATURE_FLAGS = {PRODUCT_ANALYTICS_DASHBOARD_MODAL_SMART_DEFAULTS: 'product-analytics-dashboard-modal-smart-defaults', // owner: @sam #team-product-analyticsPRODUCT_ANALYTICS_FUNNELS_COMPARE: 'product-analytics-funnels-compare', // owner: @thmsobrmlr #team-product-analytics, gates "Compare to previous" toggle on funnel insightsPRODUCT_ANALYTICS_HIDE_WEEKENDS: 'product-analytics-hide-weekends', // owner: @kliment-slice #team-irl-events- PRODUCT_ANALYTICS_HOG_CHARTS_FUNNEL: 'product-analytics-hog-charts-funnel', // owner: @sampennington #team-product-analytics- PRODUCT_ANALYTICS_HOG_CHARTS_LIFECYCLE: 'product-analytics-hog-charts-lifecycle', // owner: @sampennington #team-product-analytics- PRODUCT_ANALYTICS_HOG_CHARTS_RETENTION: 'product-analytics-hog-charts-retention', // owner: @sampennington #team-product-analytics- PRODUCT_ANALYTICS_HOG_CHARTS_STICKINESS: 'product-analytics-hog-charts-stickiness', // owner: @sampennington #team-product-analytics- PRODUCT_ANALYTICS_HOG_CHARTS_TRENDS: 'product-analytics-hog-charts-trends', // owner: @sampennington #team-product-analyticsPRODUCT_ANALYTICS_INSIGHT_HORIZONTAL_CONTROLS: 'insight-horizontal-controls', // owner: #team-product-analyticsPRODUCT_ANALYTICS_PATHS_V2: 'paths-v2', // owner: @thmsobrmlr #team-product-analyticsPRODUCT_ANALYTICS_RETENTION_AGGREGATION: 'retention-aggregation', // owner: @anirudhpillai #team-product-analyticsdiff --git a/frontend/src/queries/nodes/InsightViz/InsightDisplayConfig.test.tsx b/frontend/src/queries/nodes/InsightViz/InsightDisplayConfig.test.tsxindex 3c1e8d2c3784..b9424d496fd1 100644--- a/frontend/src/queries/nodes/InsightViz/InsightDisplayConfig.test.tsx+++ b/frontend/src/queries/nodes/InsightViz/InsightDisplayConfig.test.tsx@@ -4,7 +4,6 @@ import { cleanup, fireEvent, render, screen, waitFor, within } from '@testing-liimport userEvent from '@testing-library/user-event'import { BindLogic, Provider } from 'kea'-import { FEATURE_FLAGS } from 'lib/constants'import { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { insightDataLogic } from 'scenes/insights/insightDataLogic'import { insightLogic } from 'scenes/insights/insightLogic'@@ -161,9 +160,6 @@ describe('InsightDisplayConfig', () => {})it('removes axis label option count after clearing a committed label', async () => {- featureFlagLogic.actions.setFeatureFlags([FEATURE_FLAGS.PRODUCT_ANALYTICS_HOG_CHARTS_TRENDS], {- [FEATURE_FLAGS.PRODUCT_ANALYTICS_HOG_CHARTS_TRENDS]: true,- })setupAndRender(makeTrendsQuery(ChartDisplayType.ActionsLineGraph, { xAxisLabel: 'Signup date' }))const optionsButton = screen.getAllByRole('button', { name: /Options/ })[0]diff --git a/frontend/src/queries/nodes/InsightViz/InsightDisplayConfig.tsx b/frontend/src/queries/nodes/InsightViz/InsightDisplayConfig.tsxindex 27736bb602f7..f12ec598a4f8 100644--- a/frontend/src/queries/nodes/InsightViz/InsightDisplayConfig.tsx+++ b/frontend/src/queries/nodes/InsightViz/InsightDisplayConfig.tsx@@ -146,12 +146,8 @@ export function InsightDisplayConfig(): JSX.Element {const isLineDisplay = isDefaultTrendsLineDisplay(display, querySource) || displayMatches(display, LINE_DISPLAYS)const isBarDisplay = displayMatches(display, BAR_DISPLAYS)const isCumulativeLineDisplay = display === ChartDisplayType.ActionsLineGraphCumulative- const showAxisLabelsConfig =- isTrends && (isLineDisplay || isBarDisplay) && featureFlags[FEATURE_FLAGS.PRODUCT_ANALYTICS_HOG_CHARTS_TRENDS]- const showFunnelLegendConfig =- isTrendsFunnel &&- hasBreakdownFilter(breakdownFilter) &&- !!featureFlags[FEATURE_FLAGS.PRODUCT_ANALYTICS_HOG_CHARTS_FUNNEL]+ const showAxisLabelsConfig = isTrends && (isLineDisplay || isBarDisplay)+ const showFunnelLegendConfig = isTrendsFunnel && hasBreakdownFilter(breakdownFilter)const isLineGraph = isLineDisplay && !isCumulativeLineDisplayconst isLinearScale = !yAxisScaleType || yAxisScaleType === 'linear'diff --git a/frontend/src/scenes/dashboard/Dashboards.stories.tsx b/frontend/src/scenes/dashboard/Dashboards.stories.tsxindex 50b116b5f798..7a5234c72e6b 100644--- a/frontend/src/scenes/dashboard/Dashboards.stories.tsx+++ b/frontend/src/scenes/dashboard/Dashboards.stories.tsx@@ -106,6 +106,8 @@ const meta: Meta = {viewMode: 'story',mockDate: '2023-02-01',pageUrl: urls.dashboards(),+ // Suppress async chart canvas painting so these dashboard snapshots are deterministic.+ testOptions: { skipCanvasDraw: true },},}export default metadiff --git a/frontend/src/scenes/funnels/Funnel.tsx b/frontend/src/scenes/funnels/Funnel.tsxindex b8e757b560c7..088efa8f97d3 100644--- a/frontend/src/scenes/funnels/Funnel.tsx+++ b/frontend/src/scenes/funnels/Funnel.tsx@@ -3,8 +3,6 @@ import './Funnel.scss'import { useValues } from 'kea'import { FunnelLayout } from 'lib/constants'-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'-import { FunnelLineGraph } from 'scenes/funnels/FunnelLineGraph'import { insightLogic } from 'scenes/insights/insightLogic'import { ChartParams, FunnelVizType } from '~/types'@@ -14,29 +12,25 @@ import { FunnelHistogramChart } from 'products/product_analytics/frontend/insighimport { FunnelLineChart } from 'products/product_analytics/frontend/insights/funnels/FunnelLineChart/FunnelLineChart'import { FunnelStepsBarChart } from 'products/product_analytics/frontend/insights/funnels/FunnelStepsBarChart/FunnelStepsBarChart'-import { FunnelBarHorizontal } from './FunnelBarHorizontal/FunnelBarHorizontal'-import { FunnelBarVertical } from './FunnelBarVertical/FunnelBarVertical'import { funnelDataLogic } from './funnelDataLogic'import { FunnelFlowGraph } from './FunnelFlowGraph/FunnelFlowGraph'-import { FunnelHistogram } from './FunnelHistogram'export function Funnel(props: ChartParams): JSX.Element {const { insightProps } = useValues(insightLogic)const { funnelsFilter } = useValues(funnelDataLogic(insightProps))- const hogChartsFunnelEnabled = useFeatureFlag('PRODUCT_ANALYTICS_HOG_CHARTS_FUNNEL')const { funnelVizType, layout } = funnelsFilter || {}let viz: JSX.Element | null = nullif (funnelVizType == FunnelVizType.Trends) {- viz = hogChartsFunnelEnabled ? <FunnelLineChart {...props} /> : <FunnelLineGraph {...props} />+ viz = <FunnelLineChart {...props} />} else if (funnelVizType == FunnelVizType.TimeToConvert) {- viz = hogChartsFunnelEnabled ? <FunnelHistogramChart /> : <FunnelHistogram />+ viz = <FunnelHistogramChart />} else if (funnelVizType === FunnelVizType.Flow) {viz = <FunnelFlowGraph />} else if ((layout || FunnelLayout.vertical) === FunnelLayout.vertical) {- viz = hogChartsFunnelEnabled ? <FunnelStepsBarChart {...props} /> : <FunnelBarVertical {...props} />+ viz = <FunnelStepsBarChart {...props} />} else {- viz = hogChartsFunnelEnabled ? <FunnelBarHorizontalChart {...props} /> : <FunnelBarHorizontal {...props} />+ viz = <FunnelBarHorizontalChart {...props} />}return (diff --git a/frontend/src/scenes/funnels/FunnelBarHorizontal/Bar.tsx b/frontend/src/scenes/funnels/FunnelBarHorizontal/Bar.tsxdeleted file mode 100644index 909caccebd41..000000000000--- a/frontend/src/scenes/funnels/FunnelBarHorizontal/Bar.tsx+++ /dev/null@@ -1,105 +0,0 @@-import { useValues } from 'kea'--import { LemonDropdown } from '@posthog/lemon-ui'--import { percentage } from 'lib/utils/numbers'-import { capitalizeFirstLetter } from 'lib/utils/strings'-import { insightLogic } from 'scenes/insights/insightLogic'--import { Noun } from '~/models/groupsModel'-import { BreakdownFilter } from '~/queries/schema/schema-general'-import { FunnelStepWithConversionMetrics } from '~/types'--import { funnelDataLogic } from '../funnelDataLogic'-import { FunnelTooltip } from '../FunnelTooltip'-import { getSeriesPositionName } from '../funnelUtils'--interface BarProps {- percentage: number- name?: string- onBarClick?: () => void- disabled?: boolean- isBreakdown?: boolean- breakdownIndex?: number- breakdownMaxIndex?: number- step: FunnelStepWithConversionMetrics- stepIndex: number- breakdownFilter: BreakdownFilter | null | undefined- aggregationTargetLabel: Noun-}--export function Bar({- percentage: conversionPercentage,- name,- onBarClick,- disabled,- isBreakdown = false,- breakdownIndex,- breakdownMaxIndex,- step,- stepIndex,- breakdownFilter,- aggregationTargetLabel,-}: BarProps): JSX.Element | null {- const { insightProps } = useValues(insightLogic)- const { getFunnelsColor } = useValues(funnelDataLogic(insightProps))-- const cursorType = !disabled ? 'pointer' : ''-- // Labels are handled differently for breakdown vs non-breakdown funnels:- // - Non-breakdown: Show labels on bars (CSS positions inside/outside based on width)- // - Breakdown: Hide bar labels (CSS), summary shown in empty space instead- const shouldShowLabel = !isBreakdown-- if (!conversionPercentage) {- return null- }-- return (- <LemonDropdown- trigger="hover"- placement="right"- showArrow- overlay={- <FunnelTooltip- showPersonsModal={!disabled}- stepIndex={stepIndex}- series={step}- groupTypeLabel={aggregationTargetLabel.plural}- breakdownFilter={breakdownFilter}- embedded- />- }- >- <div- className={`funnel-bar ${getSeriesPositionName(breakdownIndex, breakdownMaxIndex)}`}- // eslint-disable-next-line react/forbid-dom-props- style={{- flex: `${conversionPercentage} 1 0`,- cursor: cursorType,- backgroundColor: getFunnelsColor(step),- }}- onClick={() => {- if (!disabled && onBarClick) {- onBarClick()- }- }}- >- {shouldShowLabel && (- <div- className="funnel-bar-percentage"- title={- name ? `${capitalizeFirstLetter(aggregationTargetLabel.plural)} who did ${name}` : undefined- }- role="progressbar"- aria-valuemin={0}- aria-valuemax={100}- aria-valuenow={conversionPercentage * 100}- >- {percentage(conversionPercentage, 2, true)}- </div>- )}- </div>- </LemonDropdown>- )-}diff --git a/frontend/src/scenes/funnels/FunnelBarHorizontal/FunnelBarHorizontal.scss b/frontend/src/scenes/funnels/FunnelBarHorizontal/FunnelBarHorizontal.scssdeleted file mode 100644index d1c29cecd47e..000000000000--- a/frontend/src/scenes/funnels/FunnelBarHorizontal/FunnelBarHorizontal.scss+++ /dev/null@@ -1,243 +0,0 @@-@import '../../../styles/mixins';--$label_position_offset: 8px;-$series_container_width: 1.5rem;-$glyph_height: 23px; // Based on .funnel-step-glyph--.FunnelBarHorizontal {- min-height: 100%;- padding: 1rem;-- .InsightCard & {- padding-right: 1rem;- padding-left: 1rem;- }-- // When there are optional steps, indent all content to make room for the layout- &.FunnelBarHorizontal--has-optional-steps {- .funnel-step {- padding-left: $series_container_width + 2rem; // Extra space for optional step positioning- }- }-- .funnel-step {- position: relative;- padding-left: $series_container_width + 0.5rem;-- &:not(:first-child) {- &,- .funnel-series-container {- padding-top: 0.75rem;- }- }-- // Optional step styling - make it translucent to indicate it's not a real funnel step- &.funnel-step--optional {- // Don't apply opacity to the whole step, target specific elements instead- header,- .funnel-bar-wrapper,- .funnel-conversion-metadata {- opacity: 0.6;- }-- .graph-series-glyph {- opacity: 0.7;- }- }-- .graph-series-glyph {- z-index: 2;- }-- .funnel-conversion-metadata {- display: flex;- align-items: center;- justify-content: space-between;-- .funnel-inspect-button {- line-height: 1.5rem;-- .value-inspector-button-icon {- margin-right: 0.25rem;- font-size: 1.5rem;- vertical-align: bottom;- }- }- }-- .funnel-series-container {- position: absolute;- top: 0;- left: 0;- display: flex;- flex-direction: column;- align-items: center;- width: $series_container_width;- height: 100%;-- .graph-series-glyph {- user-select: none;- }-- // Optional step positioning- &.optional-step {- // Move the step number to the right to align with end of connector- .graph-series-glyph {- margin-left: 3rem;- }-- // Create the branching path using multiple pseudo-elements- &::before {- position: absolute;- top: calc(#{$glyph_height} / 2 - 2rem);- left: calc(#{$series_container_width} / 2 - 1px);- z-index: 1;- width: 1.5rem;- height: 2px;- content: '';- background: var(--border-primary);- opacity: 0.5;- }- }-- .optional-connector {- position: absolute;- top: calc(#{$glyph_height} / 2 - 2rem);- left: calc(#{$series_container_width} / 2 + 1.5rem - 1px);- z-index: 1;- width: 2px;- height: calc(1rem + #{$glyph_height});- content: '';- background: var(--border-primary);- opacity: 0.5;- }-- .funnel-series-linebox {- position: absolute;- left: 0;- box-sizing: border-box;- width: calc(#{$series_container_width} / 2 + 1px);- border-right: 2px solid var(--color-border-primary);- opacity: 0.5;-- &.before {- top: 0;- height: calc(#{$glyph_height} / 2);- }-- &.after {- top: calc(#{$glyph_height} / 2);- bottom: 0;- height: calc(100% - #{$glyph_height} / 2);- }- }- }-- .funnel-step-metadata {- // .funnel-step-metadata reusable class for components that contain metadata for the funnel (e.g. time to convert or conversion steps)- display: flex;- flex-wrap: wrap;- }-- header,- footer {- display: flex;- align-items: center;- line-height: $glyph_height;- }-- header {- position: relative;- display: flex;- flex-wrap: wrap;- justify-content: space-between;-- .funnel-step-title {- font-weight: bold;- }-- button {- margin-left: 0.375rem;- }- }- }-- .funnel-bar-wrapper {- display: flex;- flex-direction: row;- height: 32px;- margin: 4px 0;- background-color: var(--color-border-primary);- border-radius: var(--radius);-- .funnel-bar {- container-type: inline-size;- position: relative;- height: 100%;- background: var(--color-accent);- transition:- width 0.2s ease,- height 0.2s ease;-- &.first {- border-radius: var(--radius) 0 0 4px;- }-- &.last {- border-radius: 0 4px 4px 0;- }-- &.only {- border-radius: var(--radius);- }-- .funnel-bar-percentage {- position: absolute;- top: 8px;- left: calc(100% + #{$label_position_offset});- font-weight: bold;- line-height: 16px;- color: var(--text-3000);- white-space: nowrap;-- // When individual bar is wide enough, position label inside- @container (min-width: 60px) {- right: $label_position_offset;- left: auto;- color: #fff;- }- }- }-- .funnel-bar-empty-space {- container-type: inline-size;- position: relative;-- .funnel-bar-percentage {- position: absolute;- top: 8px;- left: 8px;- display: none;- font-weight: bold;- line-height: 16px;- color: var(--text-3000);- white-space: nowrap;-- // Show breakdown summary label when empty space is wide enough- @container (min-width: 60px) {- display: block;- }- }- }-- // For breakdown funnels: hide individual bar labels, show summary in empty space- &.breakdown .funnel-bar .funnel-bar-percentage {- display: none;- }- }-}--// Hide .funnel-bar within InsightCards for snapshots, due to flakiness-.storybook-test-runner .InsightCard .funnel-bar {- display: none;-}diff --git a/frontend/src/scenes/funnels/FunnelBarHorizontal/FunnelBarHorizontal.tsx b/frontend/src/scenes/funnels/FunnelBarHorizontal/FunnelBarHorizontal.tsxdeleted file mode 100644index 6e750c97fb94..000000000000--- a/frontend/src/scenes/funnels/FunnelBarHorizontal/FunnelBarHorizontal.tsx+++ /dev/null@@ -1,253 +0,0 @@-import './FunnelBarHorizontal.scss'--import clsx from 'clsx'-import { useActions, useValues } from 'kea'--import { IconInfinity } from '@posthog/icons'--import { EntityFilterInfo } from 'lib/components/EntityFilterInfo'-import { SeriesGlyph } from 'lib/components/SeriesGlyph'-import { IconTrendingFlat, IconTrendingFlatDown } from 'lib/lemon-ui/icons'-import { Tooltip } from 'lib/lemon-ui/Tooltip'-import { humanFriendlyDuration } from 'lib/utils/durations'-import { percentage } from 'lib/utils/numbers'-import { insightLogic } from 'scenes/insights/insightLogic'-import { getActionFilterFromFunnelStep } from 'scenes/insights/views/Funnels/funnelStepTableUtils'--import { ChartParams, FunnelStepReference, StepOrderValue } from '~/types'--import { funnelDataLogic } from '../funnelDataLogic'-import { funnelPersonsModalLogic } from '../funnelPersonsModalLogic'-import { FunnelStepMore } from '../FunnelStepMore'-import {- formatConvertedCount,- formatConvertedPercentage,- formatDroppedOffCount,- formatDroppedOffPercentage,- getBreakdownMaxIndex,- getReferenceStep,- getStepBreakdownSeries,- getTooltipTitleForConverted,- getTooltipTitleForDroppedOff,-} from '../funnelUtils'-import { ValueInspectorButton } from '../ValueInspectorButton'-import { Bar } from './Bar'-import { DuplicateStepIndicator } from './DuplicateStepIndicator'--export function FunnelBarHorizontal({- inCardView,- showPersonsModal: showPersonsModalProp = true,-}: ChartParams): JSX.Element {- const { insightProps } = useValues(insightLogic)- const {- visibleStepsWithConversionMetrics,- aggregationTargetLabel,- funnelsFilter,- breakdownFilter,- isStepOptional,- } = useValues(funnelDataLogic(insightProps))-- const { canOpenPersonModal } = useValues(funnelPersonsModalLogic(insightProps))- const { openPersonsModalForStep, openPersonsModalForSeries } = useActions(funnelPersonsModalLogic(insightProps))-- const steps = visibleStepsWithConversionMetrics- const stepReference = funnelsFilter?.funnelStepReference || FunnelStepReference.total-- const showPersonsModal = canOpenPersonModal && showPersonsModalProp-- // Check if any steps are optional- const hasOptionalSteps = steps.some((_, stepIndex) => isStepOptional(stepIndex + 1))-- // Everything rendered after is a funnel in top-to-bottom mode.- return (- <div- data-attr="funnel-bar-horizontal"- className={clsx('FunnelBarHorizontal', { 'FunnelBarHorizontal--has-optional-steps': hasOptionalSteps })}- >- {steps.map((step, stepIndex) => {- const basisStep = getReferenceStep(steps, stepReference, stepIndex)- const isOptionalStep = isStepOptional(stepIndex + 1)- const isFirstStep = stepIndex === 0- const showLineBefore = stepIndex > 0- const showLineAfter = stepIndex < steps.length - 1- const breakdownMaxIndex = getBreakdownMaxIndex(- Array.isArray(step.nested_breakdown) ? step.nested_breakdown : undefined- )- const breakdownSum =- (Array.isArray(step.nested_breakdown) &&- step.nested_breakdown?.reduce((sum, item) => sum + item.count, 0)) ||- 0-- const isBreakdown =- Array.isArray(step.nested_breakdown) &&- step.nested_breakdown?.length !== undefined &&- !(step.nested_breakdown.length === 1)-- // For single-visible-breakdown steps, use the series' counts / rates for display- // and scope clicks through openPersonsModalForSeries. Null otherwise.- const stepBreakdownSeries = getStepBreakdownSeries(step, breakdownFilter)- const displayStep = stepBreakdownSeries ?? step- const openStep = (converted: boolean): void => {- if (stepBreakdownSeries) {- openPersonsModalForSeries({ step, series: stepBreakdownSeries, converted })- } else {- openPersonsModalForStep({ step, converted })- }- }-- return (- <section- key={step.order}- className={clsx('funnel-step', { 'funnel-step--optional': isOptionalStep })}- >- <div className={clsx('funnel-series-container', { 'optional-step': isOptionalStep })}>- <div className={`funnel-series-linebox ${showLineBefore ? 'before' : ''}`} />- {isOptionalStep && hasOptionalSteps && <div className="optional-connector" />}- {funnelsFilter?.funnelOrderType === StepOrderValue.UNORDERED ? (- <SeriesGlyph variant="funnel-step-glyph">- <IconInfinity style={{ fill: 'var(--primary_alt)', width: 14 }} />- </SeriesGlyph>- ) : (- <SeriesGlyph variant="funnel-step-glyph">{step.order + 1}</SeriesGlyph>- )}- <div className={`funnel-series-linebox ${showLineAfter ? 'after' : ''}`} />- </div>- <header>- <div className="flex items-center max-w-full grow">- <div className="funnel-step-title overflow-hidden break-words whitespace-normal">- {funnelsFilter?.funnelOrderType === StepOrderValue.UNORDERED ? (- <span>Completed {step.order + 1} steps</span>- ) : (- <EntityFilterInfo filter={getActionFilterFromFunnelStep(step)} allowWrap />- )}- </div>- {isOptionalStep ? <div className="ml-1 text-xs">(optional)</div> : null}- {funnelsFilter?.funnelOrderType !== StepOrderValue.UNORDERED &&- stepIndex > 0 &&- step.action_id === steps[stepIndex - 1].action_id && <DuplicateStepIndicator />}- <FunnelStepMore stepIndex={stepIndex} />- </div>- {step.average_conversion_time && step.average_conversion_time >= Number.EPSILON ? (- <div className="text-secondary" title="Average time of conversion from previous step">- Average time to convert:{' '}- <b>{humanFriendlyDuration(step.average_conversion_time, { maxUnits: 2 })}</b>- </div>- ) : null}- </header>- <div className={clsx('funnel-bar-wrapper', { breakdown: isBreakdown })}>- {isBreakdown ? (- <>- {step?.nested_breakdown?.map((breakdown, index) => {- return (- <Bar- name={breakdown.name}- percentage={breakdown.count / basisStep.count}- key={`${breakdown.action_id}-${step.breakdown_value}-${index}`}- isBreakdown={true}- breakdownIndex={index}- breakdownMaxIndex={breakdownMaxIndex}- onBarClick={() =>- openPersonsModalForSeries({- step,- series: breakdown,- converted: true,- })- }- step={breakdown}- stepIndex={stepIndex}- breakdownFilter={breakdownFilter}- disabled={!showPersonsModal}- aggregationTargetLabel={aggregationTargetLabel}- />- )- })}- <div- className="funnel-bar-empty-space"- onClick={- showPersonsModal- ? () => openPersonsModalForStep({ step, converted: false }) // dropoff value for steps is negative- : undefined- }- // eslint-disable-next-line react/forbid-dom-props- style={{- flex: `${1 - breakdownSum / basisStep.count} 1 0`,- cursor: `${showPersonsModal && !inCardView ? 'pointer' : ''}`,- }}- >- {isBreakdown && (- <div className="funnel-bar-percentage">- {percentage(breakdownSum / basisStep.count, 2, true)}- </div>- )}- </div>- </>- ) : (- <>- <Bar- name={displayStep.name}- percentage={displayStep.conversionRates.fromBasisStep}- onBarClick={() => openStep(true)}- step={step.nested_breakdown![0]}- stepIndex={stepIndex}- breakdownFilter={breakdownFilter}- disabled={!showPersonsModal}- aggregationTargetLabel={aggregationTargetLabel}- />- <div- className="funnel-bar-empty-space"- onClick={showPersonsModal ? () => openStep(false) : undefined}- // eslint-disable-next-line react/forbid-dom-props- style={{- flex: `${1 - displayStep.conversionRates.fromBasisStep} 1 0`,- cursor: `${showPersonsModal && !inCardView ? 'pointer' : ''}`,- }}- />- </>- )}- </div>- <div className="funnel-conversion-metadata funnel-step-metadata">- <Tooltip- title={getTooltipTitleForConverted(funnelsFilter, aggregationTargetLabel, stepIndex)}- placement="bottom"- >- <ValueInspectorButton onClick={showPersonsModal ? () => openStep(true) : undefined}>- <IconTrendingFlat- style={{ color: 'var(--success)' }}- className="value-inspector-button-icon"- />- <b>{formatConvertedCount(displayStep, aggregationTargetLabel)}</b>- </ValueInspectorButton>{' '}- {!isFirstStep && (- <span className="text-secondary grow">- {`(${formatConvertedPercentage(displayStep)}) completed step`}- </span>- )}- </Tooltip>- {!isFirstStep && (- <div>- <Tooltip- title={getTooltipTitleForDroppedOff(funnelsFilter, aggregationTargetLabel)}- placement="bottom"- >- <ValueInspectorButton- onClick={showPersonsModal ? () => openStep(false) : undefined}- >- <IconTrendingFlatDown- style={{ color: 'var(--danger)' }}- className="value-inspector-button-icon"- />- <b>{formatDroppedOffCount(displayStep, aggregationTargetLabel)}</b>- </ValueInspectorButton>{' '}- <span className="text-secondary">- {`(${formatDroppedOffPercentage(displayStep)}) dropped off`}- </span>- </Tooltip>- </div>- )}- </div>- </section>- )- })}- </div>- )-}diff --git a/frontend/src/scenes/funnels/FunnelBarVertical/FunnelBarVertical.tsx b/frontend/src/scenes/funnels/FunnelBarVertical/FunnelBarVertical.tsxdeleted file mode 100644index 1487e5f6de22..000000000000--- a/frontend/src/scenes/funnels/FunnelBarVertical/FunnelBarVertical.tsx+++ /dev/null@@ -1,135 +0,0 @@-import './FunnelBarVertical.scss'--import { useValues } from 'kea'-import { useLayoutEffect, useRef, useState } from 'react'--import { ScrollableShadows } from 'lib/components/ScrollableShadows/ScrollableShadows'-import { useResizeObserver } from 'lib/hooks/useResizeObserver'-import { insightLogic } from 'scenes/insights/insightLogic'--import { ChartParams } from '~/types'--import { funnelDataLogic } from '../funnelDataLogic'-import { funnelPersonsModalLogic } from '../funnelPersonsModalLogic'-import { useFunnelTooltip } from '../FunnelTooltip'-import { StepBarLabels } from './StepBarLabels'-import { StepBars } from './StepBars'-import { StepLegend } from './StepLegend'--interface FunnelBarVerticalCSSProperties extends React.CSSProperties {- '--bar-width': string- '--bar-row-height': string-}--export function FunnelBarVertical({- showPersonsModal: showPersonsModalProp = true,- inCardView,-}: ChartParams): JSX.Element {- const { insightProps } = useValues(insightLogic)- const { visibleStepsWithConversionMetrics } = useValues(funnelDataLogic(insightProps))- const { canOpenPersonModal } = useValues(funnelPersonsModalLogic(insightProps))- const showPersonsModal = canOpenPersonModal && showPersonsModalProp- const vizRef = useFunnelTooltip(showPersonsModal)-- const { height: availableHeight } = useResizeObserver({ ref: vizRef })- const [scrollbarHeightPx, setScrollbarHeightPx] = useState(0)- const [stepLegendRowHeightPx, setStepLegendRowHeightPx] = useState(0)-- const seriesCount = visibleStepsWithConversionMetrics[0]?.nested_breakdown?.length ?? 0- const barWidthPx =- seriesCount >= 60- ? 4- : seriesCount >= 20- ? 8- : seriesCount >= 12- ? 16- : seriesCount >= 10- ? 20- : seriesCount >= 8- ? 24- : seriesCount >= 6- ? 32- : seriesCount >= 5- ? 40- : seriesCount >= 4- ? 48- : seriesCount >= 3- ? 64- : seriesCount >= 2- ? 96- : 192-- const scrollRef = useRef<HTMLDivElement | null>(null)- const stepLegendRowRef = useRef<HTMLTableRowElement | null>(null)-- useLayoutEffect(() => {- if (scrollRef.current) {- setScrollbarHeightPx(scrollRef.current.offsetHeight - scrollRef.current.clientHeight)- }- }, [availableHeight])- useLayoutEffect(() => {- if (stepLegendRowRef.current) {- setStepLegendRowHeightPx(stepLegendRowRef.current.clientHeight)- }- }, [availableHeight])-- /** Average conversion time is only shown if it's known for at least one step. */- // != is intentional to catch undefined too- const showTime = visibleStepsWithConversionMetrics.some((step) => step.average_conversion_time != null)-- const minimumBarHeightPx = 150- const borderHeightPx = 1-- // available height - border - legend - (maybe) scrollbar- const barRowHeight = `max(${minimumBarHeightPx}px, calc(${availableHeight}px - ${borderHeightPx}px - ${stepLegendRowHeightPx}px - ${scrollbarHeightPx}px))`-- return (- <div className="FunnelBarVertical" ref={vizRef} data-attr="funnel-bar-vertical">- <ScrollableShadows scrollRef={scrollRef} direction="horizontal">- <table- /* eslint-disable-next-line react/forbid-dom-props */- style={- {- '--bar-width': `${barWidthPx}px`,- '--bar-row-height': barRowHeight,- } as FunnelBarVerticalCSSProperties- }- >- <colgroup>- {visibleStepsWithConversionMetrics.map((_, i) => (- <col key={i} width={0} />- ))}- <col width="100%" />- {/* The last column is meant to fill up leftover space. */}- </colgroup>- <tbody>- <tr>- <td>- <StepBarLabels />- </td>- {visibleStepsWithConversionMetrics.map((step, stepIndex) => (- <td key={stepIndex}>- <StepBars step={step} stepIndex={stepIndex} showPersonsModal={showPersonsModal} />- </td>- ))}- </tr>- <tr ref={stepLegendRowRef}>- <td />- {visibleStepsWithConversionMetrics.map((step, stepIndex) => (- <td key={stepIndex}>- <StepLegend- step={step}- stepIndex={stepIndex}- showTime={showTime}- showPersonsModal={showPersonsModal}- inCardView={inCardView}- />- </td>- ))}- </tr>- </tbody>- </table>- </ScrollableShadows>- </div>- )-}diff --git a/frontend/src/scenes/funnels/FunnelBarVertical/StepBar.tsx b/frontend/src/scenes/funnels/FunnelBarVertical/StepBar.tsxdeleted file mode 100644index 68d58220491b..000000000000--- a/frontend/src/scenes/funnels/FunnelBarVertical/StepBar.tsx+++ /dev/null@@ -1,66 +0,0 @@-import clsx from 'clsx'-import { useActions, useValues } from 'kea'-import { useRef } from 'react'--import { percentage } from 'lib/utils/numbers'-import { insightLogic } from 'scenes/insights/insightLogic'--import { FunnelStepWithConversionMetrics } from '~/types'--import { funnelDataLogic } from '../funnelDataLogic'-import { funnelPersonsModalLogic } from '../funnelPersonsModalLogic'-import { funnelTooltipLogic } from '../funnelTooltipLogic'--export interface StepBarProps {- step: FunnelStepWithConversionMetrics- series: FunnelStepWithConversionMetrics- stepIndex: number- showPersonsModal: boolean-}-interface StepBarCSSProperties extends React.CSSProperties {- '--series-color': string- '--conversion-rate': string-}-export function StepBar({ step, stepIndex, series, showPersonsModal }: StepBarProps): JSX.Element {- const { insightProps } = useValues(insightLogic)- const { getFunnelsColor } = useValues(funnelDataLogic(insightProps))- const { showTooltip, hideTooltip } = useActions(funnelTooltipLogic(insightProps))- const { openPersonsModalForSeries } = useActions(funnelPersonsModalLogic(insightProps))-- const ref = useRef<HTMLDivElement | null>(null)-- return (- <div- className={clsx('StepBar', !showPersonsModal && 'StepBar__unclickable')}- data-attr="funnel-step-bar"- /* eslint-disable-next-line react/forbid-dom-props */- style={- {- '--series-color': getFunnelsColor(series),- '--conversion-rate': percentage(series.conversionRates.fromBasisStep, 1, true),- } as StepBarCSSProperties- }- ref={ref}- onMouseEnter={() => {- if (ref.current) {- const rect = ref.current.getBoundingClientRect()- showTooltip([rect.x, rect.y, rect.width], stepIndex, series)- }- }}- onMouseLeave={() => hideTooltip()}- >- <div- className="StepBar__backdrop"- onClick={- showPersonsModal ? () => openPersonsModalForSeries({ step, series, converted: false }) : undefined- }- />- <div- className="StepBar__fill"- onClick={- showPersonsModal ? () => openPersonsModalForSeries({ step, series, converted: true }) : undefined- }- />- </div>- )-}diff --git a/frontend/src/scenes/funnels/FunnelBarVertical/StepBars.tsx b/frontend/src/scenes/funnels/FunnelBarVertical/StepBars.tsxdeleted file mode 100644index 506f7d06e472..000000000000--- a/frontend/src/scenes/funnels/FunnelBarVertical/StepBars.tsx+++ /dev/null@@ -1,40 +0,0 @@-import clsx from 'clsx'-import { useValues } from 'kea'--import { insightLogic } from 'scenes/insights/insightLogic'--import { funnelDataLogic } from '../funnelDataLogic'-import { StepBar, StepBarProps } from './StepBar'--export function StepBars({ step, stepIndex, showPersonsModal }: Omit<StepBarProps, 'series'>): JSX.Element {- const { insightProps } = useValues(insightLogic)- const { isStepOptional } = useValues(funnelDataLogic(insightProps))-- const isOptional = isStepOptional(stepIndex + 1)- return (- <div- className={clsx('StepBars', stepIndex === 0 && 'StepBars--first')}- style={{ opacity: isOptional ? 0.6 : 1 }}- >- <div className="StepBars__grid">- {Array(5)- .fill(null)- .map((_, i) => (- <div- key={`gridline-${stepIndex}-${i}`}- className="StepBars__gridline StepBars__gridline--horizontal"- />- ))}- </div>- {step.nested_breakdown?.map((series) => (- <StepBar- key={`bar-${stepIndex}-${series.order}`}- step={step}- stepIndex={stepIndex}- series={series}- showPersonsModal={showPersonsModal}- />- ))}- </div>- )-}diff --git a/frontend/src/scenes/funnels/FunnelHistogram.scss b/frontend/src/scenes/funnels/FunnelHistogram.scssdeleted file mode 100644index 14c95b6cd994..000000000000--- a/frontend/src/scenes/funnels/FunnelHistogram.scss+++ /dev/null@@ -1,3 +0,0 @@-.FunnelHistogram {- flex: 1;-}diff --git a/frontend/src/scenes/funnels/FunnelHistogram.tsx b/frontend/src/scenes/funnels/FunnelHistogram.tsxdeleted file mode 100644index c684dc30c95c..000000000000--- a/frontend/src/scenes/funnels/FunnelHistogram.tsx+++ /dev/null@@ -1,50 +0,0 @@-import './FunnelHistogram.scss'--import useSize from '@react-hook/size'-import clsx from 'clsx'-import { useValues } from 'kea'-import { useRef } from 'react'--import { humanFriendlyDuration } from 'lib/utils/durations'-import { hashCodeForString } from 'lib/utils/strings'-import { insightLogic } from 'scenes/insights/insightLogic'-import { Histogram } from 'scenes/insights/views/Histogram'--import { funnelDataLogic } from './funnelDataLogic'--export function FunnelHistogram(): JSX.Element | null {- const { insightProps, isInDashboardContext } = useValues(insightLogic)- const { histogramGraphData } = useValues(funnelDataLogic(insightProps))-- const ref = useRef(null)- const [width, height] = useSize(ref)-- // Must reload the entire graph on a dashboard when values change, otherwise will run into random d3 bugs- // See: https://github.com/PostHog/posthog/pull/5259- const key = isInDashboardContext ? hashCodeForString(JSON.stringify(histogramGraphData)) : 'staticGraph'-- if (!histogramGraphData) {- return null- }-- return (- <div- className={clsx('FunnelHistogram', {- scrollable: !isInDashboardContext,- 'overflow-hidden': isInDashboardContext,- 'dashboard-wrapper': isInDashboardContext,- })}- ref={ref}- data-attr="funnel-histogram"- >- <Histogram- key={key}- data={histogramGraphData}- width={width}- isDashboardItem={isInDashboardContext}- height={height}- formatXTickLabel={(v) => humanFriendlyDuration(v, { maxUnits: 2 })}- />- </div>- )-}diff --git a/frontend/src/scenes/funnels/FunnelLineGraph.tsx b/frontend/src/scenes/funnels/FunnelLineGraph.tsxdeleted file mode 100644index 2d283f3e38d2..000000000000--- a/frontend/src/scenes/funnels/FunnelLineGraph.tsx+++ /dev/null@@ -1,140 +0,0 @@-import { useValues } from 'kea'--import { DateDisplay } from 'lib/components/DateDisplay'-import { dayjs } from 'lib/dayjs'-import { capitalizeFirstLetter } from 'lib/utils/strings'-import { insightLogic } from 'scenes/insights/insightLogic'-import { getDatumTitle } from 'scenes/insights/InsightTooltip/insightTooltipUtils'-import { formatBreakdownLabel } from 'scenes/insights/utils'-import { LineGraph } from 'scenes/insights/views/LineGraph/LineGraph'-import { teamLogic } from 'scenes/teamLogic'-import { openPersonsModal } from 'scenes/trends/persons-modal/PersonsModal'--import { cohortsModel } from '~/models/cohortsModel'-import { propertyDefinitionsModel } from '~/models/propertyDefinitionsModel'-import { FunnelsActorsQuery, NodeKind, TrendsFilter } from '~/queries/schema/schema-general'-import { isInsightQueryNode } from '~/queries/utils'-import { BreakdownKeyType, ChartParams, GraphDataset, GraphType } from '~/types'--import { funnelDataLogic } from './funnelDataLogic'-import { funnelPersonsModalLogic } from './funnelPersonsModalLogic'-import { hasBreakdown } from './funnelUtils'--const LineGraphWrapper = ({ inCardView, children }: { inCardView?: boolean; children: JSX.Element }): JSX.Element => {- if (inCardView) {- return <>{children}</>- }-- return <div className="TrendsInsight">{children}</div>-}--export function FunnelLineGraph({- inCardView,- inSharedMode,- showPersonsModal: showPersonsModalProp = true,-}: Omit<ChartParams, 'filters'>): JSX.Element | null {- const { insightProps } = useValues(insightLogic)- const {- indexedSteps,- goalLines,- aggregationTargetLabel,- incompletenessOffsetFromEnd,- querySource,- interval,- insightData,- showValuesOnSeries,- funnelsFilter,- breakdownFilter,- labelGroupType,- } = useValues(funnelDataLogic(insightProps))- const { weekStartDay, timezone } = useValues(teamLogic)- const { canOpenPersonModal } = useValues(funnelPersonsModalLogic(insightProps))- const { allCohorts } = useValues(cohortsModel)- const { formatPropertyValueForDisplay } = useValues(propertyDefinitionsModel)-- if (!isInsightQueryNode(querySource)) {- return null- }-- const showPersonsModal = canOpenPersonModal && showPersonsModalProp-- return (- <LineGraphWrapper inCardView={inCardView}>- <LineGraph- data-attr="trend-line-graph-funnel"- type={GraphType.Line}- datasets={indexedSteps as unknown as GraphDataset[] /* TODO: better typing */}- labels={indexedSteps?.[0]?.labels ?? ([] as string[])}- isInProgress={incompletenessOffsetFromEnd < 0}- inSharedMode={!!inSharedMode}- showPersonsModal={showPersonsModal}- showValuesOnSeries={showValuesOnSeries}- showTrendLines={funnelsFilter?.showTrendLines ?? false}- goalLines={goalLines ?? []}- tooltip={{- renderSeries: (_, datum) => {- if (hasBreakdown(datum.breakdown_value)) {- return <div className="datum-label-column">{getDatumTitle(datum, breakdownFilter)}</div>- }- return <div className="datum-label-column">Conversion</div>- },- renderCount: (count) => {- return `${count}%`- },- }}- trendsFilter={{ aggregationAxisFormat: 'percentage' } as TrendsFilter}- labelGroupType={labelGroupType}- incompletenessOffsetFromEnd={incompletenessOffsetFromEnd}- onClick={- !showPersonsModal- ? undefined- : (payload) => {- const { points, index } = payload- const dataset = points.clickedPointNotLine- ? points.pointsIntersectingClick[0].dataset- : points.pointsIntersectingLine[0].dataset- const day = dataset?.days?.[index] ?? ''- const breakdownValue = (dataset as { breakdown_value?: BreakdownKeyType })- ?.breakdown_value- const breakdownLabel = hasBreakdown(breakdownValue)- ? formatBreakdownLabel(- breakdownValue,- breakdownFilter,- allCohorts.results,- formatPropertyValueForDisplay- )- : null-- const title = (- <>- {capitalizeFirstLetter(aggregationTargetLabel.plural)} converted on{' '}- <DateDisplay- interval={interval || 'day'}- resolvedDateRange={insightData?.resolved_date_range}- timezone={timezone}- weekStartDay={weekStartDay}- date={day?.toString() || ''}- />- {breakdownLabel ? <> • {breakdownLabel}</> : null}- </>- )-- const query: FunnelsActorsQuery = {- kind: NodeKind.FunnelsActorsQuery,- source: querySource,- funnelTrendsDropOff: false,- includeRecordings: true,- funnelTrendsEntrancePeriodStart: dayjs(day).format('YYYY-MM-DD HH:mm:ss'),- ...(hasBreakdown(breakdownValue) ? { funnelStepBreakdown: breakdownValue } : {}),- }- openPersonsModal({- title,- query,- })- }- }- hideAnnotations={inSharedMode || funnelsFilter?.showAnnotations === false}- />- </LineGraphWrapper>- )-}diff --git a/frontend/src/scenes/insights/Funnels.stories.tsx b/frontend/src/scenes/insights/Funnels.stories.tsxindex 26881097f712..dd282c4ea1c7 100644--- a/frontend/src/scenes/insights/Funnels.stories.tsx+++ b/frontend/src/scenes/insights/Funnels.stories.tsx@@ -47,7 +47,7 @@ const waitForFunnelToStabilize: NonNullable<Story['play']> = async ({ canvasElemlet lastHeight = 0await waitFor(() => {- const funnelContainer = canvasElement.querySelector('[data-attr=funnel-bar-vertical]')+ const funnelContainer = canvasElement.querySelector('[data-attr=funnel-steps-bar-chart]')const currentHeight = funnelContainer ? funnelContainer.getBoundingClientRect().height : 0if (currentHeight === 0 || currentHeight !== lastHeight) {lastHeight = currentHeight@@ -63,14 +63,14 @@ const waitForFunnelToStabilize: NonNullable<Story['play']> = async ({ canvasElem// require('../../mocks/fixtures/api/projects/team_id/insights/funnelLeftToRight.json')// )// FunnelLeftToRight.parameters = {-// testOptions: { waitForSelector: ['[data-attr=funnel-bar-vertical] .StepBar', '.PayGateMini'] },+// testOptions: { waitForSelector: ['[data-attr=funnel-steps-bar-chart] canvas[role="img"]', '.PayGateMini'] },// }export const FunnelLeftToRightEdit: Story = createInsightStory(require('../../mocks/fixtures/api/projects/team_id/insights/funnelLeftToRight.json'),'edit')FunnelLeftToRightEdit.parameters = {- testOptions: { waitForSelector: ['[data-attr=funnel-bar-vertical] .StepBar', '.PayGateMini'] },+ testOptions: { waitForSelector: ['[data-attr=funnel-steps-bar-chart] canvas[role="img"]', '.PayGateMini'] },}export const FunnelLeftToRightBreakdown: Story = createInsightStory(@@ -78,7 +78,7 @@ export const FunnelLeftToRightBreakdown: Story = createInsightStory()FunnelLeftToRightBreakdown.parameters = {testOptions: {- waitForSelector: ['[data-attr=funnel-bar-vertical] .StepBar', '.PayGateMini'],+ waitForSelector: ['[data-attr=funnel-steps-bar-chart] canvas[role="img"]', '.PayGateMini'],snapshotBrowsers: [],},}@@ -87,34 +87,34 @@ export const FunnelLeftToRightBreakdownEdit: Story = createInsightStory('edit')FunnelLeftToRightBreakdownEdit.parameters = {- testOptions: { waitForSelector: ['[data-attr=funnel-bar-vertical] .StepBar', '.PayGateMini'] },+ testOptions: { waitForSelector: ['[data-attr=funnel-steps-bar-chart] canvas[role="img"]', '.PayGateMini'] },}FunnelLeftToRightBreakdownEdit.play = waitForFunnelToStabilizeexport const FunnelTopToBottom: Story = createInsightStory(require('../../mocks/fixtures/api/projects/team_id/insights/funnelTopToBottom.json'))FunnelTopToBottom.parameters = {- testOptions: { waitForSelector: ['[data-attr=funnel-bar-horizontal] > .funnel-step'] },+ testOptions: { waitForSelector: ['[data-attr=funnel-bar-horizontal] canvas[role="img"]'] },}export const FunnelTopToBottomEdit: Story = createInsightStory(require('../../mocks/fixtures/api/projects/team_id/insights/funnelTopToBottom.json'),'edit')FunnelTopToBottomEdit.parameters = {- testOptions: { waitForSelector: ['[data-attr=funnel-bar-horizontal] > .funnel-step'] },+ testOptions: { waitForSelector: ['[data-attr=funnel-bar-horizontal] canvas[role="img"]'] },}export const FunnelTopToBottomBreakdown: Story = createInsightStory(require('../../mocks/fixtures/api/projects/team_id/insights/funnelTopToBottomBreakdown.json'))FunnelTopToBottomBreakdown.parameters = {- testOptions: { waitForSelector: ['[data-attr=funnel-bar-horizontal] > .funnel-step'] },+ testOptions: { waitForSelector: ['[data-attr=funnel-bar-horizontal] canvas[role="img"]'] },}export const FunnelTopToBottomBreakdownEdit: Story = createInsightStory(require('../../mocks/fixtures/api/projects/team_id/insights/funnelTopToBottomBreakdown.json'),'edit')FunnelTopToBottomBreakdownEdit.parameters = {- testOptions: { waitForSelector: ['[data-attr=funnel-bar-horizontal] > .funnel-step'] },+ testOptions: { waitForSelector: ['[data-attr=funnel-bar-horizontal] canvas[role="img"]'] },}export const FunnelHistoricalTrends: Story = createInsightStory(require('../../mocks/fixtures/api/projects/team_id/insights/funnelHistoricalTrends.json')@@ -142,19 +142,21 @@ FunnelHistoricalTrendsCompare.parameters = {export const FunnelTimeToConvert: Story = createInsightStory(require('../../mocks/fixtures/api/projects/team_id/insights/funnelTimeToConvert.json'))-FunnelTimeToConvert.parameters = { testOptions: { waitForSelector: '[data-attr=funnel-histogram] svg' } }+FunnelTimeToConvert.parameters = { testOptions: { waitForSelector: '[data-attr=funnel-histogram] canvas[role="img"]' } }export const FunnelTimeToConvertEdit: Story = createInsightStory(require('../../mocks/fixtures/api/projects/team_id/insights/funnelTimeToConvert.json'),'edit')-FunnelTimeToConvertEdit.parameters = { testOptions: { waitForSelector: '[data-attr=funnel-histogram] svg' } }+FunnelTimeToConvertEdit.parameters = {+ testOptions: { waitForSelector: '[data-attr=funnel-histogram] canvas[role="img"]' },+}export const FunnelWithInlineEventsEdit: Story = createInsightStory(require('../../mocks/fixtures/api/projects/team_id/insights/funnelLeftToRightWithInlineEvents.json'),'edit')FunnelWithInlineEventsEdit.parameters = {- testOptions: { waitForSelector: ['[data-attr=funnel-bar-vertical] .StepBar', '.PayGateMini'] },+ testOptions: { waitForSelector: ['[data-attr=funnel-steps-bar-chart] canvas[role="img"]', '.PayGateMini'] },}FunnelWithInlineEventsEdit.play = async ({ canvasElement }) => {const expandFiltersButton = await waitFor(@@ -176,7 +178,7 @@ export const FunnelLeftToRightEditViewports: Story = createInsightStory()FunnelLeftToRightEditViewports.parameters = {testOptions: {- waitForSelector: ['[data-attr=funnel-bar-vertical] .StepBar', '.PayGateMini'],+ waitForSelector: ['[data-attr=funnel-steps-bar-chart] canvas[role="img"]', '.PayGateMini'],viewportWidths: ['medium', 'wide', 'superwide'],},}diff --git a/frontend/src/scenes/insights/insightLogic.tsx b/frontend/src/scenes/insights/insightLogic.tsxindex 24ab01048344..18f58480b263 100644--- a/frontend/src/scenes/insights/insightLogic.tsx+++ b/frontend/src/scenes/insights/insightLogic.tsx@@ -475,12 +475,7 @@ export const insightLogic: LogicWrapper<insightLogicType> = kea<insightLogicType(s) => [s.query],(query) => !!query && canToggleDisplayLabelsInInsightQuery(query),],- canToggleLegendForInsight: [- (s) => [s.query, s.featureFlags],- (query, featureFlags) =>- !!query &&- canToggleLegendInInsightQuery(query, !!featureFlags[FEATURE_FLAGS.PRODUCT_ANALYTICS_HOG_CHARTS_FUNNEL]),- ],+ canToggleLegendForInsight: [(s) => [s.query], (query) => !!query && canToggleLegendInInsightQuery(query)],canToggleAnnotationsForInsight: [(s) => [s.query],(query) => !!query && canToggleAnnotationsInInsightQuery(query),@@ -493,13 +488,7 @@ export const insightLogic: LogicWrapper<insightLogicType> = kea<insightLogicType(s) => [s.query],(query) => (query ? getDisplayLabelsToggleText(query) : 'Show values on series'),],- legendToggleTextForInsight: [- (s) => [s.query, s.featureFlags],- (query, featureFlags) =>- query- ? getLegendToggleText(query, !!featureFlags[FEATURE_FLAGS.PRODUCT_ANALYTICS_HOG_CHARTS_FUNNEL])- : 'Show legend',- ],+ legendToggleTextForInsight: [(s) => [s.query], (query) => (query ? getLegendToggleText(query) : 'Show legend')],annotationsToggleTextForInsight: [(s) => [s.query],(query) => (query ? getAnnotationsToggleText(query) : 'Hide annotations'),diff --git a/frontend/src/scenes/insights/views/Histogram/Histogram.scss b/frontend/src/scenes/insights/views/Histogram/Histogram.scssdeleted file mode 100644index e56e74228761..000000000000--- a/frontend/src/scenes/insights/views/Histogram/Histogram.scss+++ /dev/null@@ -1,83 +0,0 @@-.dashboard-wrapper {- width: 100%;- height: calc(100% - 2rem);-}--.histogram-container {- display: flex;-- svg {- margin-right: 1rem;- margin-left: 1rem;-- /*- * Axis- */- g#y-axis {- // Vertical line axis- .domain {- stroke: var(--color-graph-axis-line);- }- }-- g#x-axis {- // Horizontal line axis- .domain {- stroke: var(--color-graph-axis-line);- }-- // Ticks at each interval- .tick {- color: var(--color-text-secondary);- }- }-- g#x-axis,- g#y-axis {- text {- font-family: var(--font-sans);- font-size: 0.75rem;- font-weight: 500;- fill: var(--color-text-tertiary);- }- }-- /*- * Grid- */- g#y-gridlines {- stroke-dasharray: 4, 2;-- g.tick:not(:first-child) {- color: var(--color-graph-axis-line);- }-- .domain,- g.tick:nth-of-type(1) {- display: none; // hide axis line- }- }-- /*- * Bars- */- g#bars {- fill: var(--histogram-fill);- }-- g#labels {- text.bar-label {- font-family: 'Emoji Flags Polyfill', 'Helvetica Neue', Helvetica, Arial, sans-serif;-- // same as chart-js- font-size: 12px;- font-weight: normal;- fill: var(--color-white);-- &.outside {- fill: var(--color-text-secondary);- }- }- }- }-}diff --git a/frontend/src/scenes/insights/views/Histogram/Histogram.tsx b/frontend/src/scenes/insights/views/Histogram/Histogram.tsxdeleted file mode 100644index 86de3af9c554..000000000000--- a/frontend/src/scenes/insights/views/Histogram/Histogram.tsx+++ /dev/null@@ -1,281 +0,0 @@-import './Histogram.scss'--import * as d3 from 'd3'-import { useActions, useValues } from 'kea'-import { useEffect } from 'react'--import { FunnelLayout } from 'lib/constants'-import { D3Selector, D3Transition, useD3 } from 'lib/hooks/useD3'-import { insightLogic } from 'scenes/insights/insightLogic'-import { insightVizDataLogic } from 'scenes/insights/insightVizDataLogic'-import { histogramLogic } from 'scenes/insights/views/Histogram/histogramLogic'--import {- D3HistogramDatum,- INITIAL_CONFIG,- createRoundedRectPath,- getConfig,- animate,- getOrCreateEl,- wrap,-} from './histogramUtils'-import { HistogramDatum } from './types'--interface HistogramProps {- data: HistogramDatum[]- layout?: FunnelLayout- isAnimated?: boolean- isDashboardItem?: boolean- width?: number- height?: number- formatXTickLabel?: (value: number) => number | string- formatYTickLabel?: (value: number) => number-}--export function Histogram({- data,- layout = FunnelLayout.vertical,- width = INITIAL_CONFIG.width,- height = INITIAL_CONFIG.height,- isAnimated = false,- isDashboardItem = false,- formatXTickLabel = (value: number) => value,- formatYTickLabel = (value: number) => value,-}: HistogramProps): JSX.Element {- const { config } = useValues(histogramLogic)- const { setConfig } = useActions(histogramLogic)- const { insightProps } = useValues(insightLogic)- const { theme } = useValues(insightVizDataLogic(insightProps))-- const backgroundColor = theme?.['preset-1'] || '#000000' // Default to black if no color found-- const isEmpty = data.length === 0 || d3.sum(data.map((d) => d.count)) === 0-- // Initialize x-axis and y-axis scales- const xMin = data?.[0]?.bin0 || 0- const xMax = data?.[data.length - 1]?.bin1 || 1- const x = d3.scaleLinear().domain([xMin, xMax]).range(config.ranges.x).nice()- const xAxis = config.axisFn- .x(x)- .tickValues([...data.map((d) => d.bin0), xMax])- // v === -2 || v === -1 represent bins that catch grouped outliers.- // TODO: (-2, -1) are temporary placeholders for (-inf, +inf) and should be changed when backend specs are finalized- .tickFormat((v: number) => {- const label = formatXTickLabel(v)- if (v === -2) {- return `<${label}`- }- if (v === -1) {- return `>=${label}`- }- return label- })-- // y-axis scale- const yMax = d3.max(data, (d: HistogramDatum) => d.count) as number- const y = d3.scaleLinear().domain([0, yMax]).range(config.ranges.y).nice()- const yAxis = config.axisFn- .y(y)- .tickValues(y.ticks().filter((tick) => Number.isInteger(tick)))- .tickSize(0)- .tickFormat((v: number) => {- const count = formatYTickLabel(v)- // SI-prefix with trailing zeroes trimmed off- return d3.format('~s')(count)- })-- // y-axis gridline scale- const yAxisGrid = config.axisFn.y(y).tickSize(-config.gridlineTickSize).tickFormat('').ticks(y.ticks().length)-- // Update config to new values if dimensions change- useEffect(() => {- const minWidth = Math.max(- width,- data.length * (config.spacing.minBarWidth + config.spacing.btwnBins) +- config.margin.left +- config.margin.right- )- setConfig(getConfig(layout, isDashboardItem ? width : minWidth, height))- }, [data.length, layout, width, height]) // oxlint-disable-line react-hooks/exhaustive-deps-- const ref = useD3(- (container) => {- const isVertical = config.layout === FunnelLayout.vertical-- const renderCanvas = (parentNode: D3Selector): D3Selector => {- // Update config to reflect dimension changes- x.range(config.ranges.x)- y.range(config.ranges.y)- yAxisGrid.tickSize(-config.gridlineTickSize)-- // Get or create svg > g- const _svg = getOrCreateEl(parentNode, 'svg > g', () =>- parentNode- .append('svg:svg')- .attr('viewBox', `0 0 ${config.inner.width} ${config.inner.height}`)- .attr('width', '100%')- .append('svg:g')- .classed(config.layout, true)- )- // update dimensions- parentNode.select('svg').attr('viewBox', `0 0 ${config.width} ${config.height}`)-- // if class doesn't exist on svg>g, layout has changed. after we learn this, reset- // the layout- const layoutChanged = !_svg.classed(config.layout)- _svg.attr('class', null).classed(config.layout, true)-- // if layout changes, redraw axes from scratch- if (layoutChanged) {- _svg.selectAll('#x-axis,#y-axis,#y-gridlines').remove()- }-- // x-axis- const _xAxis = getOrCreateEl(_svg, 'g#x-axis', () =>- _svg.append('svg:g').attr('id', 'x-axis').attr('transform', config.transforms.x)- )- _xAxis.call(animate, !layoutChanged ? config.transitionDuration : 0, isAnimated, (it: D3Transition) =>- it.call(xAxis).attr('transform', config.transforms.x)- )- const binWidth = x(data?.[0]?.bin1 || data?.[data.length - 1]?.bin1 || 1) - x(data?.[0]?.bin0 || 0)- _xAxis- .selectAll('.tick text')- .call(- wrap,- isVertical ? binWidth : config.margin.left,- config.spacing.labelLineHeight,- isVertical,- config.spacing.xLabel- )-- // Don't draw y-axis or y-gridline if the data is empty- if (!isEmpty) {- // y-axis- const _yAxis = getOrCreateEl(_svg, 'g#y-axis', () =>- _svg.append('svg:g').attr('id', 'y-axis').attr('transform', config.transforms.y)- )- _yAxis.call(- animate,- !layoutChanged ? config.transitionDuration : 0,- isAnimated,- (it: D3Transition) =>- it- .call(yAxis)- .attr('transform', config.transforms.y)- .call((g) =>- g.selectAll('.tick text').attr('dx', isVertical ? `-${config.spacing.yLabel}` : 0)- )- )-- // y-gridlines- const _yGridlines = getOrCreateEl(_svg, 'g#y-gridlines', () =>- _svg.append('svg:g').attr('id', 'y-gridlines').attr('transform', config.transforms.yGrid)- )- _yGridlines.call(- animate,- !layoutChanged ? config.transitionDuration : 0,- isAnimated,- (it: D3Transition) => it.call(yAxisGrid).attr('transform', config.transforms.yGrid)- )- }-- const d3Data = data as D3HistogramDatum[]-- // bars- const _bars = getOrCreateEl(_svg, 'g#bars', () => _svg.append('svg:g').attr('id', 'bars'))- _bars- .selectAll('path')- .data(d3Data)- .join('path')- .call(animate, config.transitionDuration, isAnimated, (it: D3Transition) => {- return it.attr('d', (d: HistogramDatum) => {- if (!isVertical) {- // is horizontal- return createRoundedRectPath(- y(0),- x(d.bin0) + config.spacing.btwnBins / 2,- y(d.count) - y(0),- Math.max(0, x(d.bin1) - x(d.bin0) - config.spacing.btwnBins),- config.borderRadius,- 'right'- )- }- return createRoundedRectPath(- x(d.bin0) + config.spacing.btwnBins / 2,- y(d.count),- Math.max(0, x(d.bin1) - x(d.bin0) - config.spacing.btwnBins),- y(0) - y(d.count),- config.borderRadius,- 'top'- )- })- })-- // Always move bar above everything else- _svg.node().appendChild(_bars.node())-- // text labels- const _labels = getOrCreateEl(_svg, 'g#labels', () => _svg.append('svg:g').attr('id', 'labels'))- _labels- .selectAll('text')- .data(d3Data)- .join('text')- .text((d) => d.label)- .classed('bar-label', true)- .each(function (this: any, d) {- const { width: labelWidth, height: labelHeight } = this.getBBox()- d.labelWidth = labelWidth- d.labelHeight = labelHeight- d.shouldShowInBar = false- })- .attr('x', (d) => {- if (!isVertical) {- const labelWidth = (d.labelWidth || 0) + 2 * config.spacing.barLabelPadding- const shouldShowInBar = labelWidth <= y(d.count) - y(0)- const labelDx = shouldShowInBar- ? -(labelWidth - config.spacing.barLabelPadding)- : config.spacing.barLabelPadding- d.shouldShowInBar = shouldShowInBar- return y(d.count) + labelDx- }- // x + bin width + dx + dy- return x(d.bin0) + binWidth / 2 - (d.labelWidth || 0) / 2- })- .attr('y', (d) => {- if (!isVertical) {- return x(d.bin0) + binWidth / 2- }- // determine if label should be in the bar or above it.- const labelHeight = (d.labelHeight || 0) + 2 * config.spacing.barLabelPadding- const shouldShowInBar = labelHeight <= y(0) - y(d.count)- const labelDy = shouldShowInBar- ? labelHeight - config.spacing.barLabelPadding- : -config.spacing.barLabelPadding- d.shouldShowInBar = shouldShowInBar- return y(d.count) + labelDy- })- .classed('outside', (d) => !d.shouldShowInBar)-- // Always move labels to top- _svg.node().appendChild(_labels.node())-- return _svg- }-- renderCanvas(container)- },- [data, config]- )-- /* minWidth required to enforce d3's width calculations on the div wrapping the svg- so that scrolling horizontally works */-- return (- <div- className="histogram-container"- ref={ref}- // eslint-disable-next-line react/forbid-dom-props- style={{ minWidth: config.width, '--histogram-fill': backgroundColor } as React.CSSProperties}- />- )-}diff --git a/frontend/src/scenes/insights/views/Histogram/__snapshots__/histogramLogic.test.ts.snap b/frontend/src/scenes/insights/views/Histogram/__snapshots__/histogramLogic.test.ts.snapdeleted file mode 100644index 9ff309bf7e28..000000000000--- a/frontend/src/scenes/insights/views/Histogram/__snapshots__/histogramLogic.test.ts.snap+++ /dev/null@@ -1,51 +0,0 @@-// Jest Snapshot v1, https://goo.gl/fbAQLP--exports[`histogramLogic values has proper defaults 1`] = `-{- "config": {- "axisFn": {- "x": [Function],- "y": [Function],- },- "borderRadius": 4,- "gridlineTickSize": 445,- "height": 352,- "inner": {- "height": 312,- "width": 440,- },- "layout": "vertical",- "margin": {- "bottom": 20,- "left": 40,- "right": 20,- "top": 20,- },- "ranges": {- "x": [- 40,- 480,- ],- "y": [- 332,- 20,- ],- },- "spacing": {- "barLabelPadding": 8,- "btwnBins": 6,- "labelLineHeight": 1.2,- "minBarWidth": 90,- "xLabel": 8,- "yLabel": 5,- },- "transforms": {- "x": "translate(0,332)",- "y": "translate(40,0)",- "yGrid": "translate(35,0)",- },- "transitionDuration": 200,- "width": 500,- },-}-`;diff --git a/frontend/src/scenes/insights/views/Histogram/histogramLogic.test.ts b/frontend/src/scenes/insights/views/Histogram/histogramLogic.test.tsdeleted file mode 100644index 254d7ad4e5dd..000000000000--- a/frontend/src/scenes/insights/views/Histogram/histogramLogic.test.ts+++ /dev/null@@ -1,33 +0,0 @@-import { FunnelLayout } from 'lib/constants'-import { getConfig } from 'scenes/insights/views/Histogram/histogramUtils'--import { initKeaTests } from '~/test/init'--import { histogramLogic } from './histogramLogic'--describe('histogramLogic', () => {- let logic: ReturnType<typeof histogramLogic.build>-- beforeEach(() => {- initKeaTests()- logic = histogramLogic()- logic.mount()- })-- describe('values', () => {- it('has proper defaults', () => {- expect(logic.values).toMatchSnapshot()- })- })-- describe('reducers', () => {- describe('config', () => {- it('is set via setConfig', async () => {- const newConfig = getConfig(FunnelLayout.vertical, 1000, 3000)- expect(logic.values.config).toEqual(getConfig(FunnelLayout.vertical))- logic.actions.setConfig(newConfig)- expect(logic.values.config).toEqual(newConfig)- })- })- })-})diff --git a/frontend/src/scenes/insights/views/Histogram/histogramLogic.ts b/frontend/src/scenes/insights/views/Histogram/histogramLogic.tsdeleted file mode 100644index 7b9289a37fdc..000000000000--- a/frontend/src/scenes/insights/views/Histogram/histogramLogic.ts+++ /dev/null@@ -1,22 +0,0 @@-import { actions, kea, path, reducers } from 'kea'--import { FunnelLayout } from 'lib/constants'-// eslint-disable-next-line import/no-cycle-import { HistogramConfig, getConfig } from 'scenes/insights/views/Histogram/histogramUtils'--import type { histogramLogicType } from './histogramLogicType'--export const histogramLogic = kea<histogramLogicType>([- path(['scenes', 'insights', 'Histogram', 'histogramLogic']),- actions({- setConfig: (config: HistogramConfig) => ({ config }),- }),- reducers({- config: [- getConfig(FunnelLayout.vertical),- {- setConfig: (state, { config }) => ({ ...state, ...config }),- },- ],- }),-])diff --git a/frontend/src/scenes/insights/views/Histogram/histogramUtils.ts b/frontend/src/scenes/insights/views/Histogram/histogramUtils.tsdeleted file mode 100644index b80f00190e65..000000000000--- a/frontend/src/scenes/insights/views/Histogram/histogramUtils.ts+++ /dev/null@@ -1,237 +0,0 @@-import * as d3 from 'd3'--import { FunnelLayout } from 'lib/constants'-import { D3Selector, D3Transition } from 'lib/hooks/useD3'--import { HistogramDatum } from './types'--export interface D3HistogramDatum extends HistogramDatum {- labelWidth?: number- labelHeight?: number- shouldShowInBar?: boolean-}--export interface HistogramConfig {- layout: FunnelLayout- height: number- width: number- inner: { height: number; width: number }- margin: { top: number; right: number; bottom: number; left: number }- borderRadius: number- ranges: { x: number[]; y: number[] }- gridlineTickSize: number- transforms: { x: string; y: string; yGrid: string }- axisFn: { x: any; y: any }- transitionDuration: number- spacing: {- btwnBins: number- yLabel: number- xLabel: number- labelLineHeight: number- barLabelPadding: number- minBarWidth: number- }-}--export const INITIAL_CONFIG = {- layout: FunnelLayout.vertical,- height: 352,- width: 500,- margin: { top: 20, right: 20, bottom: 20, left: 40 },- borderRadius: 4, // same as funnel bar graph,- transitionDuration: 200, // in ms; same as in funnel bar graph- spacing: {- btwnBins: 6, // spacing between bins- yLabel: 5, // y-axis label xOffset in vertical position- xLabel: 8, // x-axis label xOffset in horizontal position- labelLineHeight: 1.2, // line height of wrapped label text in em's,- barLabelPadding: 8, // padding between bar and bar label,- minBarWidth: 90, // minimum bar width- },-}--export const getConfig = (layout: FunnelLayout, width?: number, height?: number): HistogramConfig => {- const _width = width || INITIAL_CONFIG.width,- _height = height || INITIAL_CONFIG.height- const isVertical = layout === FunnelLayout.vertical-- return {- ...INITIAL_CONFIG,- layout,- height: _height,- width: _width,- inner: {- height: _height - INITIAL_CONFIG.margin.bottom - INITIAL_CONFIG.margin.top,- width: _width - INITIAL_CONFIG.margin.left - INITIAL_CONFIG.margin.right,- },- ranges: {- x: isVertical- ? [INITIAL_CONFIG.margin.left, _width - INITIAL_CONFIG.margin.right]- : [INITIAL_CONFIG.margin.top, _height - INITIAL_CONFIG.margin.bottom],- y: isVertical- ? [_height - INITIAL_CONFIG.margin.bottom, INITIAL_CONFIG.margin.top]- : [INITIAL_CONFIG.margin.left, _width - INITIAL_CONFIG.margin.right],- },- gridlineTickSize: isVertical- ? _width - INITIAL_CONFIG.margin.left + INITIAL_CONFIG.spacing.yLabel - INITIAL_CONFIG.margin.right- : _height - INITIAL_CONFIG.margin.bottom - INITIAL_CONFIG.margin.top,- transforms: {- x: isVertical- ? `translate(0,${_height - INITIAL_CONFIG.margin.bottom})`- : `translate(${INITIAL_CONFIG.margin.left},0)`,- y: isVertical ? `translate(${INITIAL_CONFIG.margin.left},0)` : `translate(0,${INITIAL_CONFIG.margin.top})`,- yGrid: isVertical- ? `translate(${INITIAL_CONFIG.margin.left - INITIAL_CONFIG.spacing.yLabel},0)`- : `translate(0,${INITIAL_CONFIG.margin.top})`,- },- axisFn: {- x: isVertical ? d3.axisBottom : d3.axisLeft,- y: isVertical ? d3.axisLeft : d3.axisTop,- },- }-}-// Shamelessly inspired by https://gist.github.com/skokenes/6fa266f4f50c86f77ceabcd6dfca9e42-export const createRoundedRectPath = (- x: number,- y: number,- width: number,- height: number,- radius: number,- position: 'top' | 'right' | 'bottom' | 'left'-): string => {- // if empty width/height- const isEmpty =- (height === 0 && ['top', 'bottom'].includes(position)) || (width === 0 && ['left', 'right'].includes(position))-- const radii = {- tl: !isEmpty && ['top', 'left'].includes(position) ? radius : 0,- tr: !isEmpty && ['top', 'right'].includes(position) ? radius : 0,- bl: !isEmpty && ['bottom', 'left'].includes(position) ? radius : 0,- br: !isEmpty && ['bottom', 'right'].includes(position) ? radius : 0,- }-- return (- // Move to position, offset by radius in x direction- 'M' +- (x + radii.tl + ',' + y) +- // Draw a horizontal line to the top right curve start- 'h' +- (width - radii.tl - radii.tr) +- // Draw the top right corner curve- 'a' +- radii.tr +- ',' +- radii.tr +- ' 0 0 1 ' +- radii.tr +- ',' +- radii.tr +- // Draw a vertical line to the bottom right corner- 'v' +- (height - radii.tr - radii.br) +- // Draw the bottom right corner curve- 'a' +- radii.br +- ',' +- radii.br +- ' 0 0 1 ' +- -radii.br +- ',' +- radii.br +- // Draw a horizontal line to the bottom left corner- 'h' +- (radii.br + radii.bl - width) +- // Draw the bottom left corner- 'a' +- -radii.bl +- ',' +- -radii.bl +- ' 0 0 1 ' +- -radii.bl +- ',' +- -radii.bl +- // Draw a vertical line to the top left corner- 'v' +- (radii.bl + radii.tl - height) +- // Draw the top left corner- 'a' +- radii.tl +- ',' +- -radii.tl +- ' 0 0 1 ' +- radii.tl +- ',' +- -radii.tl +- // Close the shape- 'z'- )-}--export const getOrCreateEl = (- container: D3Selector,- selector: string,- createCallback: () => D3Selector-): D3Selector => {- const el = container.select(selector)- if (el.empty()) {- return createCallback()- }- return el-}--export const animate = (- it: D3Selector,- transitionDuration: number,- isAnimated: boolean,- toAnimate: (_it: D3Transition | D3Selector) => D3Transition | D3Selector = (_it) => _it // everything you want to animate goes here-): D3Transition | D3Selector => {- if (isAnimated) {- return it.transition().duration(transitionDuration).call(toAnimate)- }- return it.call(toAnimate)-}--export const wrap = (- text: D3Selector,- width: number,- lineHeight: number = INITIAL_CONFIG.spacing.labelLineHeight,- isVertical: boolean = true,- dx: number = INITIAL_CONFIG.spacing.xLabel-): D3Selector => {- const maxWidth = width - 6 // same as padding-{left|right}: 3px;- text.each(function () {- const _text = d3.select(this)- const words: string[] = _text.text().split(/\s+/)- const y = _text.attr('y'),- dy = parseFloat(_text.attr('dy'))-- let line: string[] = [],- lineNumber = 0,- tspan = _text- .text(null)- .append('tspan')- .attr('x', 0)- .attr('y', y)- .attr('dx', isVertical ? 0 : -dx + 'px')- .attr('dy', dy + 'em')-- words.forEach((word) => {- // try appending text. revert and break onto new line if it's just too long- line.push(word)- tspan.text(line.join(' '))- if ((tspan.node()?.getComputedTextLength() || 0) > maxWidth) {- line.pop()- tspan.text(line.join(' '))- line = [word]- tspan = _text- .append('tspan')- .attr('x', 0)- .attr('y', y)- .attr('dx', isVertical ? 0 : -dx + 'px')- .attr('dy', ++lineNumber * lineHeight + dy + 'em')- .text(word)- }- })- })- return text-}diff --git a/frontend/src/scenes/insights/views/Histogram/index.tsx b/frontend/src/scenes/insights/views/Histogram/index.tsxdeleted file mode 100644index be9d7ffc620d..000000000000--- a/frontend/src/scenes/insights/views/Histogram/index.tsx+++ /dev/null@@ -1 +0,0 @@-export * from './Histogram'diff --git a/frontend/src/scenes/insights/views/Histogram/types.ts b/frontend/src/scenes/insights/views/Histogram/types.tsdeleted file mode 100644index 2d41b8afcd9f..000000000000--- a/frontend/src/scenes/insights/views/Histogram/types.ts+++ /dev/null@@ -1,7 +0,0 @@-export interface HistogramDatum {- id: string | number- bin0: number- bin1: number- count: number- label: string | number-}diff --git a/frontend/src/scenes/insights/views/LineGraph/LineGraph.test.tsx b/frontend/src/scenes/insights/views/LineGraph/LineGraph.test.tsxindex 2285c4ddb3fd..53131b7a1398 100644--- a/frontend/src/scenes/insights/views/LineGraph/LineGraph.test.tsx+++ b/frontend/src/scenes/insights/views/LineGraph/LineGraph.test.tsx@@ -2,161 +2,13 @@ import { cleanup } from '@testing-library/react'import { ChartEvent, InteractionItem } from 'lib/Chart'-import { NodeKind, TrendsQueryResponse } from '~/queries/schema/schema-general'-import {- buildTrendsQuery,- type MockResponse,- type QueryBody,- renderInsight,- waitForChart,-} from '~/test/insight-testing'-import { ChartDisplayType, GraphDataset, GraphPointPayload } from '~/types'+import { GraphDataset, GraphPointPayload } from '~/types'import { onChartClick } from './LineGraph'-jest.mock('lib/components/AutoSizer', () => ({- AutoSizer: ({ renderProp }: { renderProp: (size: { height: number; width: number }) => React.ReactNode }) =>- renderProp({ height: 400, width: 400 }),-}))--// Current period: Jun 10-14, Previous period: Jun 3-7-// Deliberately different date ranges so we can detect which one is used for x-axis labels-const CURRENT_DAYS = ['2024-06-10', '2024-06-11', '2024-06-12', '2024-06-13', '2024-06-14']-const PREVIOUS_DAYS = ['2024-06-03', '2024-06-04', '2024-06-05', '2024-06-06', '2024-06-07']--function compareResponse(): TrendsQueryResponse {- return {- results: [- {- action: { id: '$pageview', type: 'events', name: '$pageview' },- label: '$pageview',- count: 100,- data: [10, 20, 30, 25, 15],- labels: ['10-Jun-2024', '11-Jun-2024', '12-Jun-2024', '13-Jun-2024', '14-Jun-2024'],- days: CURRENT_DAYS,- compare: true,- compare_label: 'current',- },- {- action: { id: '$pageview', type: 'events', name: '$pageview' },- label: '$pageview',- count: 80,- data: [8, 15, 25, 20, 12],- labels: ['3-Jun-2024', '4-Jun-2024', '5-Jun-2024', '6-Jun-2024', '7-Jun-2024'],- days: PREVIOUS_DAYS,- compare: true,- compare_label: 'previous',- },- ],- } as TrendsQueryResponse-}--const compareMock: MockResponse = {- match: (query: QueryBody) => query.kind === NodeKind.TrendsQuery,- response: compareResponse,-}-describe('LineGraph', () => {afterEach(cleanup)- describe('Incomplete current day', () => {- beforeEach(() => {- // Set "now" to midday on the last day of the default test data (Mon-Fri, Jun 10-14 2024)- jest.useFakeTimers({ advanceTimers: true })- jest.setSystemTime(new Date('2024-06-14T12:00:00Z'))- })-- afterEach(() => {- jest.useRealTimers()- })-- it('renders the last data point with a dashed line when it falls on the current day', async () => {- renderInsight({- query: buildTrendsQuery(),- })-- const chart = await waitForChart()- const dataset = chart.config.data?.datasets?.[0]- const borderDashFn = (dataset as any)?.segment?.borderDash-- expect(typeof borderDashFn).toBe('function')-- // Thu (index 3) is in the past — should be solid (no dash)- expect(borderDashFn({ p1DataIndex: 3 })).toBeUndefined()-- // Fri (index 4) is "today" — should be dashed- expect(borderDashFn({ p1DataIndex: 4 })).toEqual([10, 10])- })-- it('does not render dashed lines when all data is from past days', async () => {- // Move "now" to the day after the data range- jest.setSystemTime(new Date('2024-06-15T12:00:00Z'))-- renderInsight({- query: buildTrendsQuery(),- })-- const chart = await waitForChart()- const dataset = chart.config.data?.datasets?.[0]- const borderDashFn = (dataset as any)?.segment?.borderDash-- // No incomplete points — borderDash should not be a function- expect(borderDashFn).toBeUndefined()- })-- it('excludes incomplete day from trend line regression', async () => {- renderInsight({- query: buildTrendsQuery({- trendsFilter: { showTrendLines: true },- }),- })-- const chart = await waitForChart()- const dataset = chart.config.data?.datasets?.[0] as any-- // The trendline config should exclude the incomplete last point- expect(dataset.trendlineLinear).toBeTruthy()- expect(dataset.trendlineLinear.trendoffset).toBe(-1)- })-- it('does not set trendoffset when all data is complete', async () => {- jest.setSystemTime(new Date('2024-06-15T12:00:00Z'))-- renderInsight({- query: buildTrendsQuery({- trendsFilter: { showTrendLines: true },- }),- })-- const chart = await waitForChart()- const dataset = chart.config.data?.datasets?.[0] as any-- // No incomplete points — trendoffset should be 0- expect(dataset.trendlineLinear).toBeTruthy()- expect(dataset.trendlineLinear.trendoffset).toBe(0)- })- })-- describe('Compare to previous', () => {- it('uses current period dates on x-axis for unstacked bar chart with compare', async () => {- renderInsight({- query: buildTrendsQuery({- trendsFilter: { display: ChartDisplayType.ActionsUnstackedBar },- compareFilter: { compare: true },- }),- mocks: { mockResponses: [compareMock] },- })-- const chart = await waitForChart()-- // trendsDataLogic sorts "previous" first for unstacked bar charts- expect(chart.series(0).compareLabel).toBe('previous')-- const firstTickLabel = chart.axes.x.tickLabel(0)- expect(firstTickLabel).toBe('Jun 10')- })- })-describe('onChartClick', () => {// Stacked bar geometry (canvas coords, y=0 at top):// Email (dataset 2): top=50, base=150, center=100diff --git a/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx b/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsxindex e112b9d62f48..a74aa51d089e 100644--- a/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx+++ b/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx@@ -1,120 +1,10 @@-import annotationPlugin from 'chartjs-plugin-annotation'-import ChartDataLabels from 'chartjs-plugin-datalabels'-import ChartjsPluginStacked100, { ExtendedChartData } from 'chartjs-plugin-stacked100'-import chartTrendline from 'chartjs-plugin-trendline'-import clsx from 'clsx'-import { useActions, useValues } from 'kea'-import posthog from 'posthog-js'-import { useEffect, useMemo, useRef } from 'react'--import { createXAxisTickCallback } from '@posthog/quill-charts'--import {- ActiveElement,- Chart,- ChartDataset,- ChartEvent,- ChartOptions,- ChartType,- Color,- DeepPartial,- GridLineOptions,- InteractionItem,- LegendOptions,- ScaleOptions,- ScriptableLineSegmentContext,- TickOptions,- TooltipModel,- TooltipOptions,-} from 'lib/Chart'-import { resolveVariableColor } from 'lib/charts/utils/color'-import { getBarColorFromStatus, getGraphColors } from 'lib/colors'+import { Chart, ChartEvent, ChartType, DeepPartial, InteractionItem, LegendOptions } from 'lib/Chart'import { AnomalyPoint } from 'lib/components/Alerts/types'-import { AnnotationsOverlay } from 'lib/components/AnnotationsOverlay'-import { SeriesLetter } from 'lib/components/SeriesGlyph'-import { useChart } from 'lib/hooks/useChart'-import { useKeyHeld } from 'lib/hooks/useKeyHeld'-import { useOnMountEffect } from 'lib/hooks/useOnMountEffect'-import { useResizeObserver } from 'lib/hooks/useResizeObserver'-import { hexToRGBA, lightenDarkenColor } from 'lib/utils/colors'-import { formatAggregationAxisValue, formatPercentStackAxisValue } from 'scenes/insights/aggregationAxisFormat'-import { insightLogic } from 'scenes/insights/insightLogic'-import { InsightTooltip } from 'scenes/insights/InsightTooltip/InsightTooltip'-import { getDatumTitle, TooltipConfig } from 'scenes/insights/InsightTooltip/insightTooltipUtils'-import { insightVizDataLogic } from 'scenes/insights/insightVizDataLogic'-import { unpinTooltip, useInsightTooltip } from 'scenes/insights/useInsightTooltip'-import { PieChart } from 'scenes/insights/views/LineGraph/PieChart'-import { createTooltipData } from 'scenes/insights/views/LineGraph/tooltip-data'-import { teamLogic } from 'scenes/teamLogic'-import { trendsDataLogic } from 'scenes/trends/trendsDataLogic'-import { IndexedTrendResult } from 'scenes/trends/types'-import { useChartZoom } from 'scenes/web-analytics/hooks/useChartZoom'+import { TooltipConfig } from 'scenes/insights/InsightTooltip/insightTooltipUtils'-import { ErrorBoundary } from '~/layout/ErrorBoundary'-import { themeLogic } from '~/layout/navigation-3000/themeLogic'-import { groupsModel } from '~/models/groupsModel'import { GoalLine, TrendsFilter } from '~/queries/schema/schema-general'import { GraphDataset, GraphPoint, GraphPointPayload, GraphType } from '~/types'-function truncateString(str: string, num: number): string {- if (str.length > num) {- return str.slice(0, num) + ' ...'- }- return str-}--/** Generate per-bucket labels for stickiness ("Day 0", "Day 1", …). The API's own labels include- * a "X day(s)" suffix that's redundant when paired with the interval prefix, so we use the index. */-function formatIntervalLabels(labels: string[], interval: string | null | undefined): string[] {- const unit = interval ?? 'day'- const prefix = `${unit.slice(0, 1).toUpperCase()}${unit.slice(1)}`- return labels.map((_, i) => `${prefix} ${i}`)-}--const INCOMPLETE_SEGMENT_BORDER_DASH = [10, 10]-// Chart.js locks up the main thread when rendering too many series, effectively-// freezing the browser. Cap the dataset count to keep the UI responsive.-const MAX_CHART_DATASETS = 150--export function onTooltipClick(- datasetIndex: number,- dataIndex: number,- datasets: GraphDataset[],- onClick?: (payload: GraphPointPayload) => void-): void {- const dataset = datasets[datasetIndex]- if (!dataset) {- return- }-- const referencePoint: GraphPoint = {- datasetIndex,- index: dataIndex,- element: {} as any,- dataset,- }-- const crossDataset = datasets- .filter((_dt) => !_dt.dotted)- .map((_dt) => ({- ..._dt,- personUrl: _dt.persons_urls?.[dataIndex]?.url,- pointValue: _dt.data[dataIndex],- }))-- onClick?.({- points: {- pointsIntersectingLine: [],- pointsIntersectingClick: [referencePoint],- clickedPointNotLine: true,- referencePoint,- },- index: dataIndex,- crossDataset,- seriesId: dataset.id,- })-}-export function onChartClick(event: ChartEvent,chart: Chart,@@ -209,52 +99,6 @@ export function onChartClick(})}-export function onChartHover(- event: ChartEvent,- chart: Chart,- onClick?: ((payload: GraphPointPayload) => void) | undefined-): void {- const nativeEvent = event.native- if (!nativeEvent) {- return- }-- const target = nativeEvent?.target as HTMLDivElement- const point = chart.getElementsAtEventForMode(nativeEvent, 'index', {}, true)-- // Give the chart `cursor: pointer` only when hovering over a clickable area- target.style.cursor = onClick && point.length ? 'pointer' : 'default'-}--function createPinstripePattern(color: string, isDarkMode: boolean): CanvasPattern {- const stripeWidth = 8 // 0.5rem- const stripeAngle = -22.5-- // create the canvas and context- const canvas = document.createElement('canvas')- canvas.width = 1- canvas.height = stripeWidth * 2-- const ctx = canvas.getContext('2d')!-- // fill the canvas with given color- ctx.fillStyle = color- ctx.fillRect(0, 0, canvas.width, canvas.height)-- // overlay half-transparent black / white stripes- ctx.fillStyle = isDarkMode ? 'rgba(35, 36, 41, 0.5)' : 'rgba(255, 255, 255, 0.5)'- ctx.fillRect(0, stripeWidth, 1, 2 * stripeWidth)-- // create a canvas pattern and rotate it-- const pattern = ctx.createPattern(canvas, 'repeat')!- const xAx = Math.cos(stripeAngle)- const xAy = Math.sin(stripeAngle)- pattern.setTransform(new DOMMatrix([xAx, xAy, -xAy, xAx, 0, 0]))-- return pattern-}-export interface LineGraphProps {datasets: GraphDataset[]labels: string[]@@ -290,1038 +134,3 @@ export interface LineGraphProps {datalabelFormatter?: (value: number, datasetIndex: number) => stringonDateRangeZoom?: (dateFrom: string, dateTo: string) => void}--export const LineGraph = (props: LineGraphProps): JSX.Element => {- return (- <ErrorBoundary exceptionProps={{ feature: 'LineGraph' }}>- {props.type === GraphType.Pie ? <PieChart {...props} /> : <LineGraph_ {...props} />}- </ErrorBoundary>- )-}--/**- * Chart.js in log scale refuses to render points that are 0 - as log(0) is undefined - hence a special value for that case.- */-const LOG_ZERO = 1e-10-const EMPTY_DATES: string[] = []--export function LineGraph_({- datasets: _datasets,- labels,- type,- isInProgress = false,- onClick,- ['data-attr']: dataAttr,- showPersonsModal = true,- inSurveyView,- isArea = false,- incompletenessOffsetFromEnd = -1,- tooltip: tooltipConfig,- labelGroupType,- trendsFilter,- formula,- showValuesOnSeries,- showPercentStackView,- supportsPercentStackView,- showPercentView,- hideAnnotations,- hideXAxis,- hideYAxis,- inCardView,- yAxisScaleType,- showMultipleYAxes = false,- legend = { display: false },- goalLines: _goalLines,- isStacked = true,- showTrendLines = false,- anomalyPoints,- ignoreActionsInSeriesLabels = false,- datalabelFormatter,- onDateRangeZoom,-}: LineGraphProps): JSX.Element {- const originalDatasets = _datasets- let datasets = _datasets-- const { aggregationLabel } = useValues(groupsModel)- const { isDarkModeOn } = useValues(themeLogic)- const { baseCurrency } = useValues(teamLogic)-- const { insightProps, insight } = useValues(insightLogic)- const { timezone, isTrends, isStickiness, isFunnels, breakdownFilter, interval, insightData } = useValues(- insightVizDataLogic(insightProps)- )-- const displayLabels = isStickiness ? formatIntervalLabels(labels, interval) : labels- const { theme, getTrendsColor, getTrendsHidden, hoveredDatasetIndex, currentPeriodResult } = useValues(- trendsDataLogic(insightProps)- )- const { setHoveredDatasetIndex } = useActions(trendsDataLogic(insightProps))-- const { tooltipId, hideTooltip, showTooltip, getTooltip, positionTooltip, pinTooltip } = useInsightTooltip({- isPinnable: true,- })-- const colors = getGraphColors()- const isHorizontal = type === GraphType.HorizontalBar- const isPie = type === GraphType.Pie- if (isPie) {- throw new Error('Use PieChart not LineGraph for this `GraphType`')- }-- const isShiftPressed = useKeyHeld('Shift')- const isBar = [GraphType.Bar, GraphType.HorizontalBar, GraphType.Histogram].includes(type)- const isBackgroundBasedGraphType = [GraphType.Bar].includes(type)- const isPercentStackView = !!supportsPercentStackView && !!showPercentStackView- const showAnnotations = ((isTrends && !isHorizontal) || isFunnels) && !hideAnnotations- const isLog10 = yAxisScaleType === 'log10' // Currently log10 is the only logarithmic scale supported- const isHighlightBarMode = isBar && isStacked && isShiftPressed- const hasMultipleSeries = new Set(_datasets.map((d) => d.action?.order).filter((o) => o !== undefined)).size > 1- const effectiveZoomCallback = !isBar && !isHorizontal ? onDateRangeZoom : undefined- const visibleDatasets = useMemo(- () => (!isHorizontal ? datasets.filter((data) => !getTrendsHidden(data as IndexedTrendResult)) : datasets),- [datasets, getTrendsHidden, isHorizontal]- )- const chartDatasets = useMemo(- () =>- visibleDatasets.length > MAX_CHART_DATASETS- ? visibleDatasets.slice(0, MAX_CHART_DATASETS)- : visibleDatasets,- [visibleDatasets]- )- const currentPeriodDatasetIndex = chartDatasets.findIndex(- (dataset) => dataset.compare && dataset.compare_label === 'current'- )- const annotationDatasetIndex = isBar && currentPeriodDatasetIndex >= 0 ? currentPeriodDatasetIndex : 0- const zoomPluginOptions = useChartZoom({- datasets,- onDateRangeZoom: effectiveZoomCallback,- enabled: !!effectiveZoomCallback,- })-- useEffect(() => {- if (!isShiftPressed) {- setHoveredDatasetIndex(null)- }- }, [isShiftPressed, setHoveredDatasetIndex])-- // Add event listeners to canvas- useOnMountEffect(() => {- const canvas = canvasRef.current-- if (canvas) {- const handleEvent = (event: Event): void => {- if ((window.performance as any)?.memory) {- console.error(event, {- usedJSHeapSize:- ((window.performance as any)?.memory.usedJSHeapSize / 1024 / 1024).toFixed(2) + ' MB',- totalJSHeapSize:- ((window.performance as any)?.memory.totalJSHeapSize / 1024 / 1024).toFixed(2) + ' MB',- jsHeapSizeLimit:- ((window.performance as any)?.memory.jsHeapSizeLimit / 1024 / 1024).toFixed(2) + ' MB',- })- } else {- console.error(event)- }-- posthog.captureException(event)- }-- canvas.addEventListener('contextlost', handleEvent)- canvas.addEventListener('webglcontextcreationerror', handleEvent)- canvas.addEventListener('webglcontextlost', handleEvent)-- return () => {- canvas.removeEventListener('contextlost', handleEvent)- canvas.removeEventListener('webglcontextcreationerror', handleEvent)- canvas.removeEventListener('webglcontextlost', handleEvent)- }- }- })-- function processDataset(dataset: ChartDataset<any>, index: number): ChartDataset<any> {- const isPrevious = !!dataset.compare && dataset.compare_label === 'previous'- const isActiveSeries = !dataset.compare || dataset.compare_label !== 'previous'- const incompleteStartIndex = dataset.data.length + incompletenessOffsetFromEnd-- const themeColor = dataset?.status- ? getBarColorFromStatus(dataset.status)- : isHorizontal- ? dataset.backgroundColor- : getTrendsColor(dataset) || '#000000' // Default to black if no color found- const mainColor = isPrevious ? `${themeColor}80` : themeColor-- const hoverColor = dataset?.status ? getBarColorFromStatus(dataset.status, true) : mainColor-- let backgroundColor: string | undefined = undefined- if (isBackgroundBasedGraphType) {- // Dim non-hovered bars in stacked bar charts when shift is pressed- if (isHighlightBarMode && hoveredDatasetIndex !== null && index !== hoveredDatasetIndex) {- backgroundColor = hexToRGBA(mainColor, 0.2)- } else {- backgroundColor = mainColor- }- } else if (isArea) {- const alpha = isPercentStackView ? 1 : 0.5- backgroundColor = hexToRGBA(mainColor, alpha)- }-- let adjustedData = dataset.data- if (isLog10 && Array.isArray(adjustedData)) {- // In log scale, transform zeros to our special value- adjustedData = adjustedData.map((value) => (value === 0 ? LOG_ZERO : value))- }-- // Transform data to percentages if showPercentView is enabled- if (showPercentView && Array.isArray(adjustedData)) {- const count = dataset.count- adjustedData = adjustedData.map((value) => (typeof value === 'number' ? (value / count) * 100 : value))- }-- const shouldShowIncompleteLineSegment = type === GraphType.Line && isInProgress && isActiveSeries- const shouldShowIncompleteAreaSegment = shouldShowIncompleteLineSegment && isArea- const areaIncompletePattern = shouldShowIncompleteAreaSegment- ? createPinstripePattern(hexToRGBA(mainColor, 0.5), isDarkModeOn)- : undefined- const incompleteSegmentBorderDash = shouldShowIncompleteLineSegment- ? (ctx: ScriptableLineSegmentContext) =>- ctx.p1DataIndex >= incompleteStartIndex ? INCOMPLETE_SEGMENT_BORDER_DASH : undefined- : undefined- const incompleteSegmentBackgroundColor = shouldShowIncompleteAreaSegment- ? (ctx: ScriptableLineSegmentContext) =>- ctx.p1DataIndex >= incompleteStartIndex ? areaIncompletePattern : undefined- : undefined-- // Build anomaly point styling if this series has anomaly points.- // Match by date (not index) since the alert check data range may differ from the chart range.- const seriesAnomalyPoints = (anomalyPoints ?? []).filter(- (ap) => ap.seriesIndex === (dataset.seriesIndex ?? index)- )- const chartDays: string[] = dataset.days ?? dataset.labels ?? []- const anomalyDateSet = new Set(seriesAnomalyPoints.map((ap) => ap.date))- const anomalyScoreByDate: Record<string, number | null> = {}- for (const ap of seriesAnomalyPoints) {- anomalyScoreByDate[ap.date] = ap.score- }- // Resolve to chart indices by matching dates- const seriesAnomalyIndices = new Set<number>()- const anomalyScoresMap: Record<number, number | null> = {}- for (let i = 0; i < chartDays.length; i++) {- if (anomalyDateSet.has(chartDays[i])) {- seriesAnomalyIndices.add(i)- anomalyScoresMap[i] = anomalyScoreByDate[chartDays[i]] ?? null- }- }- const hasAnomalyPoints = seriesAnomalyIndices.size > 0-- const anomalyPointRadius = hasAnomalyPoints- ? (ctx: any) => (seriesAnomalyIndices.has(ctx.dataIndex) ? 3 : 0)- : undefined- const anomalyPointBackgroundColor = hasAnomalyPoints- ? (ctx: any) => (seriesAnomalyIndices.has(ctx.dataIndex) ? mainColor : 'transparent')- : undefined- const anomalyPointBorderColor = hasAnomalyPoints- ? (ctx: any) => (seriesAnomalyIndices.has(ctx.dataIndex) ? mainColor : 'transparent')- : undefined- const anomalyPointBorderWidth = hasAnomalyPoints- ? (ctx: any) => (seriesAnomalyIndices.has(ctx.dataIndex) ? 2 : 0)- : undefined-- const defaultPointRadius = Array.isArray(adjustedData) && adjustedData.length === 1 ? 4 : 0- const defaultHitRadius = Array.isArray(adjustedData) && adjustedData.length === 1 ? 8 : 0-- // `horizontalBar` colors are set in `ActionsHorizontalBar.tsx` and overridden in spread of `dataset` below- return {- borderColor: mainColor,- hoverBorderColor: isBackgroundBasedGraphType ? lightenDarkenColor(mainColor, -20) : hoverColor,- hoverBackgroundColor: isBackgroundBasedGraphType ? lightenDarkenColor(mainColor, -20) : undefined,- fill: isArea ? 'origin' : false,- backgroundColor,- segment: {- borderDash: incompleteSegmentBorderDash,- backgroundColor: incompleteSegmentBackgroundColor,- },- borderWidth: isBar ? 0 : 2,- pointRadius: anomalyPointRadius ?? defaultPointRadius,- pointBackgroundColor: anomalyPointBackgroundColor,- pointBorderColor: anomalyPointBorderColor,- pointBorderWidth: anomalyPointBorderWidth,- hitRadius: hasAnomalyPoints ? 8 : defaultHitRadius,- order: 1,- ...(type === GraphType.Histogram ? { barPercentage: 1 } : {}),- ...dataset,- anomalyScores: hasAnomalyPoints ? anomalyScoresMap : undefined,- data: adjustedData,- hoverBorderWidth: isBar ? 0 : 2,- hoverBorderRadius: isBar ? 0 : 2,- type: (isHorizontal ? GraphType.Bar : type) as ChartType,- yAxisID:- type === GraphType.Line && showMultipleYAxes && index > 0 && !dataset.yAxisID- ? `y${index}`- : dataset.yAxisID- ? dataset.yAxisID- : 'y',- ...(showTrendLines- ? {- trendlineLinear: {- colorMin: mainColor,- colorMax: mainColor,- lineStyle: 'dotted',- width: 2,- trendoffset: incompletenessOffsetFromEnd,- },- }- : {}),- }- }-- function formatYAxisTick(value: number | string): string {- if (showPercentView) {- return `${Number(value).toFixed(1)}%`- }- return formatPercentStackAxisValue(trendsFilter, value, isPercentStackView, baseCurrency)- }-- function generateYaxesForLineGraph(- dataSetCount: number,- seriesNonZeroMin: number,- goalLineColorByValue: Map<number | string, string | undefined>,- tickOptions: Partial<TickOptions>,- precision: number,- gridOptions: Partial<GridLineOptions>- ): Record<string, ScaleOptions<'linear' | 'logarithmic'>> {- const defaultYAxisConfig = {- display: !hideYAxis,- ...(isLog10- ? { type: 'logarithmic' as const, min: Math.pow(10, Math.ceil(Math.log10(seriesNonZeroMin)) - 1) }- : { type: 'linear' as const }),- beginAtZero: true,- stacked: showPercentStackView || isArea,- ticks: {- ...tickOptions,- display: !hideYAxis,- ...(yAxisScaleType !== 'log10' && { precision }), // Precision is not supported for the log scale- callback: formatYAxisTick,- color: (context: any) => {- const tickValue = context.tick?.value- if (tickValue !== undefined) {- const goalLineColor = goalLineColorByValue.get(tickValue)- if (goalLineColor) {- return goalLineColor- }- }-- return colors.axisLabel as Color- },- },- grid: gridOptions,- }-- type YAxisConfig = typeof defaultYAxisConfig & {- position: 'left' | 'right'- }-- const axes: Record<string, YAxisConfig> = {- y: {- ...defaultYAxisConfig,- position: 'left',- },- }-- if (showMultipleYAxes) {- for (let i = 1; i < dataSetCount; i++) {- axes[`y${i}`] = {- ...defaultYAxisConfig,- position: i % 2 === 0 ? 'left' : 'right',- }- }- }-- return axes- }-- Chart.register(ChartjsPluginStacked100)- Chart.register(annotationPlugin)- Chart.register(chartTrendline)-- const { canvasRef, chartRef } = useChart({- getConfig: () => {- const processedDatasets = chartDatasets.map(processDataset)- let seriesNonZeroMax = Number.NEGATIVE_INFINITY- let seriesNonZeroMin = Number.POSITIVE_INFINITY- for (const dataset of processedDatasets) {- if (!Array.isArray(dataset.data)) {- continue- }- for (const rawValue of dataset.data) {- const value = Number(rawValue)- if (!value || value === LOG_ZERO || Number.isNaN(value)) {- continue- }- if (value > seriesNonZeroMax) {- seriesNonZeroMax = value- }- if (value < seriesNonZeroMin) {- seriesNonZeroMin = value- }- }- }- const precision = seriesNonZeroMax < 2 ? 2 : seriesNonZeroMax < 5 ? 1 : 0- const goalLines = (_goalLines || []).filter(- (goalLine) => goalLine.displayIfCrossed !== false || goalLine.value >= seriesNonZeroMax- )- const goalLineValueSet = new Set<number | string>(goalLines.map((goalLine) => goalLine.value))- const goalLinesWithColor = goalLines.filter((goalLine) => Boolean(goalLine.borderColor))- const goalLineColorByValue = new Map<number | string, string | undefined>()- for (const goalLine of goalLinesWithColor) {- if (!goalLineColorByValue.has(goalLine.value)) {- goalLineColorByValue.set(goalLine.value, resolveVariableColor(goalLine.borderColor))- }- }- const hasAnyDottedDataset = processedDatasets.some((dataset) => dataset.dotted)- const datalabelTotalsByDatasetIndex = processedDatasets.map((dataset) =>- Array.isArray(dataset.data)- ? dataset.data.reduce(- (sum: number, value: unknown) => sum + (typeof value === 'number' ? value : 0),- 0- )- : 0- )-- const tickOptions: Partial<TickOptions> = {- color: colors.axisLabel as Color,- font: {- family: '"Emoji Flags Polyfill", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',- size: 12,- weight: 'normal',- },- }- const xAxisTickCallback = createXAxisTickCallback({- interval: interval ?? 'day',- allDays: currentPeriodResult?.days ?? [],- timezone,- })-- const gridOptions: Partial<GridLineOptions> = {- color: (context) => {- if (goalLineValueSet.has(context.tick?.value) || showMultipleYAxes) {- return 'transparent'- }-- return colors.axisLine as Color- },- tickColor: (context) => {- if (goalLineValueSet.has(context.tick?.value)) {- return 'transparent'- }-- return colors.axisLine as Color- },- tickBorderDash: [4, 2],- }-- const tooltipOptions: Partial<TooltipOptions> = {- enabled: false,- mode: isHighlightBarMode ? 'point' : 'nearest',- axis: isHorizontal ? 'y' : 'x',- intersect: isHighlightBarMode,- itemSort: (a, b) => a.label.localeCompare(b.label),- }-- const options: ChartOptions = {- responsive: true,- maintainAspectRatio: false,- elements: {- line: {- tension: 0,- },- },- interaction: {- includeInvisible: true,- },- plugins: {- stacked100: { enable: isPercentStackView, precision: 1 },- datalabels: {- color: 'white',- anchor: (context) => {- const datum = context.dataset?.data[context.dataIndex]- return typeof datum !== 'number' ? 'end' : datum > 0 ? 'end' : 'start'- },- backgroundColor: (context) => {- return (context.dataset?.borderColor as string) || 'black'- },- display: (context) => {- const datum = context.dataset?.data[context.dataIndex]- if (- typeof datum === 'number' &&- datum !== 0 &&- (datalabelFormatter || (showValuesOnSeries && inSurveyView))- ) {- return 'auto'- }- return showValuesOnSeries === true && typeof datum === 'number' && datum !== 0- ? 'auto'- : false- },- formatter: (value: number, context) => {- if (typeof value === 'number' && value !== 0 && datalabelFormatter) {- return datalabelFormatter(value, context.datasetIndex)- }-- if (typeof value === 'number' && value !== 0 && inSurveyView && showValuesOnSeries) {- const total = datalabelTotalsByDatasetIndex[context.datasetIndex] ?? 1- const percentage = ((value / total) * 100).toFixed(1)- return `${value} (${percentage}%)`- }-- const data = context.chart?.data as ExtendedChartData- if (!data) {- return ''- }- const { datasetIndex, dataIndex } = context- const percentageValue = data.calculatedData?.[datasetIndex][dataIndex]- return formatPercentStackAxisValue(- trendsFilter,- percentageValue || value,- isPercentStackView,- baseCurrency- )- },- borderWidth: 2,- borderRadius: 4,- borderColor: 'white',- clamp: true,- },- legend: legend,- annotation: {- annotations: goalLines.reduce((acc: Record<string, any>, annotation, idx) => {- acc[`line-${idx}`] = {- type: 'line',- yMin: annotation.value,- yMax: annotation.value,- borderWidth: 2,- borderDash: [6, 6],- borderColor: resolveVariableColor(annotation.borderColor),- label: {- content: annotation.label,- display: annotation.displayLabel ?? true,- position: annotation.position ?? 'end',- },- enter: () => {- const tooltipEl = document.getElementById('InsightTooltipWrapper-hover')- if (tooltipEl) {- tooltipEl.classList.add('opacity-0', 'invisible')- }- },- leave: () => {- const tooltipEl = document.getElementById('InsightTooltipWrapper-hover')- if (tooltipEl) {- tooltipEl.classList.remove('opacity-0', 'invisible')- }- },- }-- return acc- }, {}),- },- tooltip: {- ...tooltipOptions,- external({ chart, tooltip }: { chart: Chart; tooltip: TooltipModel<ChartType> }) {- const canvas = chart.canvas- if (!canvas) {- return- }-- if (effectiveZoomCallback && chart.isZoomingOrPanning?.()) {- hideTooltip()- return- }-- const [tooltipRoot, tooltipEl] = getTooltip()- if (tooltip.opacity === 0) {- hideTooltip()- return- }-- tooltipEl.classList.remove('above', 'below', 'no-transform', 'opacity-0', 'invisible')- tooltipEl.classList.add(tooltip.yAlign || 'no-transform')- showTooltip()-- if (tooltip.body) {- const referenceDataPoint = tooltip.dataPoints[0]- const dataset = processedDatasets[referenceDataPoint.datasetIndex]- const date = dataset?.days?.[referenceDataPoint.dataIndex]- const seriesData = createTooltipData(tooltip.dataPoints, (dp) => {- // For stacked bar charts when shift is pressed, show only the hovered bar- if (isHighlightBarMode) {- return dp.datasetIndex === referenceDataPoint.datasetIndex- }-- if (tooltipConfig?.filter) {- return tooltipConfig.filter(dp)- }-- const hasDotted =- hasAnyDottedDataset &&- dp.dataIndex - processedDatasets?.[dp.datasetIndex]?.data?.length >=- incompletenessOffsetFromEnd- return (- dp.datasetIndex >= (hasDotted ? _datasets.length : 0) &&- dp.datasetIndex < (hasDotted ? _datasets.length * 2 : _datasets.length)- )- })- const referenceSeriesDatum = seriesData.find(- (datum) =>- datum.datasetIndex === referenceDataPoint.datasetIndex &&- datum.dataIndex === referenceDataPoint.dataIndex- )- const {- getInspectLabel,- inspectLabel: staticInspectLabel,- ...tooltipProps- } = tooltipConfig || {}- const inspectLabel = getInspectLabel?.(referenceSeriesDatum) ?? staticInspectLabel-- tooltipRoot.render(- <InsightTooltip- date={date}- altTitle={() =>- typeof date === 'number'- ? dataset?.labels?.[referenceDataPoint.dataIndex]- : null- }- timezone={timezone}- seriesData={seriesData}- breakdownFilter={breakdownFilter}- interval={interval}- dateRange={insightData?.resolved_date_range}- showShiftKeyHint={isBar && isStacked && !isHighlightBarMode && !inSurveyView}- formatCompareLabel={tooltipConfig?.formatCompareLabel}- onClose={pinTooltip ? () => unpinTooltip(tooltipId) : undefined}- onRowClick={- onClick- ? (datum) => {- onTooltipClick(- datum.datasetIndex,- datum.dataIndex,- processedDatasets,- onClick- )- unpinTooltip(tooltipId)- }- : undefined- }- renderSeries={(value, datum) => {- const hasBreakdown =- datum.breakdown_value !== undefined && !!datum.breakdown_value-- if (hasBreakdown && !hasMultipleSeries) {- const title = getDatumTitle(- datum,- breakdownFilter,- tooltipConfig?.formatCompareLabel- )-- return <div className="datum-label-column">{title}</div>- }-- return (- <div className="datum-label-column">- {!formula && (- <SeriesLetter- className="mr-2"- hasBreakdown={hasBreakdown}- seriesIndex={datum.action?.order ?? datum.id}- seriesColor={datum.color}- />- )}- {value}- </div>- )- }}- renderCount={- tooltipConfig?.renderCount ||- ((value: number): string => {- if (showPercentView) {- const series = seriesData.find((s) => s.count === value)- const datasetIndex = series?.datasetIndex- const dataIndex = series?.dataIndex- if (datasetIndex !== undefined && dataIndex !== undefined) {- const originalDataset = originalDatasets[datasetIndex]- const originalValue = originalDataset.data?.[dataIndex]-- if (originalValue !== undefined && originalValue !== null) {- return `${value.toFixed(1)}% (${formatAggregationAxisValue(- trendsFilter,- originalValue,- baseCurrency- )})`- }- }- }-- if (!isPercentStackView) {- return formatAggregationAxisValue(trendsFilter, value, baseCurrency)- }-- const total = seriesData.reduce((a, b) => a + b.count, 0)- const percentageLabel: number = parseFloat(- ((value / total) * 100).toFixed(1)- )-- const isNaN = Number.isNaN(percentageLabel)-- if (isNaN) {- return formatAggregationAxisValue(trendsFilter, value, baseCurrency)- }-- return `${formatAggregationAxisValue(- trendsFilter,- value,- baseCurrency- )} (${percentageLabel}%)`- })- }- hideInspectActorsSection={!onClick || !showPersonsModal}- inspectLabel={inspectLabel}- {...tooltipProps}- groupTypeLabel={- tooltipProps.groupTypeLabel ??- (labelGroupType === 'people'- ? 'people'- : labelGroupType === 'none'- ? ''- : aggregationLabel(labelGroupType).plural)- }- />- )- }-- const bounds = canvas.getBoundingClientRect()- const centerVertically = isHighlightBarMode || isHorizontal- const caretY = centerVertically ? tooltip.caretY : 0- positionTooltip(tooltipEl, bounds, tooltip.caretX, caretY, centerVertically)- },- },- ...(!isBar- ? {- crosshair: {- snap: {- enabled: true,- },- sync: {- enabled: false,- },- zoom: {- enabled: false,- },- line: {- color: colors.crosshair ?? undefined,- width: 1,- },- },- }- : {- crosshair: false,- }),- ...(zoomPluginOptions ? { zoom: zoomPluginOptions } : {}),- },- hover: {- mode: isBar ? 'point' : 'nearest',- axis: isHorizontal ? 'y' : 'x',- intersect: false,- },- onHover(event: ChartEvent, elements: ActiveElement[], chart: Chart) {- onChartHover(event, chart, onClick)-- if (effectiveZoomCallback) {- const target = event.native?.target as HTMLElement | undefined- if (target && target.style.cursor !== 'pointer') {- target.style.cursor = 'crosshair'- }- }-- // For stacked bar charts when shift is pressed, track hovered dataset to highlight only that bar- if (isHighlightBarMode) {- const newHoveredIdx = elements.length > 0 ? elements[0].datasetIndex : null- if (hoveredDatasetIndex !== newHoveredIdx) {- setHoveredDatasetIndex(newHoveredIdx)- }- }- },- onClick: (event: ChartEvent, _: ActiveElement[], chart: Chart) => {- if (!pinTooltip) {- onChartClick(event, chart, processedDatasets, onClick)- return- }-- // Only pin if the tooltip has multiple data points to choose from- const tooltipBody = chart.tooltip?.body- if (!tooltipBody || tooltipBody.length <= 1) {- onChartClick(event, chart, processedDatasets, onClick)- return- }-- // Show the crosshair on click if it was enabled initially- if ((chart as any).crosshair) {- ;(chart as any).crosshair.enabled = true- }-- const events = [...(chart.options.events ?? [])]- chart.options.events = []- chart.update('none')- showTooltip()-- pinTooltip(() => {- // Hide crosshair on tooltip unpin- if ((chart as any).crosshair) {- ;(chart as any).crosshair.enabled = false- }-- // Reset chart back to initial events- chart.options.events = events- chart.setActiveElements([])- chart.update('none')- })- },- }-- const truncateRows = !inSurveyView && !!inCardView-- if (type === GraphType.Bar) {- if (hideXAxis || hideYAxis) {- options.layout = { padding: 20 }- }- options.scales = {- x: {- display: !hideXAxis,- beginAtZero: true,- stacked: isStacked,- ticks: {- ...tickOptions,- precision,- ...(!inSurveyView && xAxisTickCallback- ? { callback: xAxisTickCallback, maxRotation: 0, autoSkipPadding: 20 }- : {}),- ...(inSurveyView- ? {- padding: 10,- font: {- size: 14,- weight: 'bold',- },- }- : {}),- },- grid: inSurveyView ? { display: false } : gridOptions,- },- y: {- display: !hideYAxis,- beginAtZero: true,- stacked: isStacked,- ticks: {- ...tickOptions,- display: !hideYAxis,- precision,- callback: (value) => {- return formatPercentStackAxisValue(- trendsFilter,- value,- isPercentStackView,- baseCurrency- )- },- },- grid: gridOptions,- },- }- } else if (type === GraphType.Line) {- if (hideXAxis || hideYAxis) {- options.layout = { padding: 20 }- } else if (showValuesOnSeries) {- options.layout = { padding: { right: 30 } }- }- const allDatasetsHaveSingleDataPoint =- processedDatasets.length > 0 &&- processedDatasets.every((d) => Array.isArray(d.data) && d.data.length === 1)- options.scales = {- x: {- display: !hideXAxis,- beginAtZero: true,- offset: allDatasetsHaveSingleDataPoint,- ticks: {- ...tickOptions,- ...(xAxisTickCallback- ? { callback: xAxisTickCallback, maxRotation: 0, autoSkipPadding: 20 }- : {}),- },- grid: {- ...gridOptions,- drawOnChartArea: false,- tickLength: 12,- },- },- ...generateYaxesForLineGraph(- (showMultipleYAxes && new Set(processedDatasets.map((d) => d.yAxisID)).size) ||- processedDatasets.length,- seriesNonZeroMin,- goalLineColorByValue,- tickOptions,- precision,- gridOptions- ),- }- } else if (isHorizontal) {- if (hideXAxis || hideYAxis) {- options.layout = { padding: inSurveyView ? { top: 20, bottom: 20, left: 20, right: 60 } : 20 }- } else if (inSurveyView) {- options.layout = { padding: { right: 60 } }- }- options.scales = {- x: {- display: !hideXAxis,- beginAtZero: true,- ticks: {- display: !hideXAxis,- ...tickOptions,- precision,- callback: (value) => {- return formatPercentStackAxisValue(- trendsFilter,- value,- isPercentStackView,- baseCurrency- )- },- },- grid: gridOptions,- },- y: {- display: true,- beforeFit: (scale) => {- scale.ticks = scale.ticks.map((tick) => {- if (typeof tick.label === 'string') {- return { ...tick, label: truncateString(tick.label, 50) }- }- return tick- })-- const ROW_HEIGHT = inSurveyView ? (isHorizontal ? 48 : 30) : 20- const height = scale.ticks.length * ROW_HEIGHT- const parentNode: any = scale.chart?.canvas?.parentNode- parentNode.style.height = `${height}px`-- if (truncateRows) {- scale.max = scale.ticks.length- }- },- beginAtZero: true,- ticks: {- ...tickOptions,- precision,- stepSize: !truncateRows ? 1 : undefined,- autoSkip: !truncateRows ? false : undefined,- ...(inSurveyView- ? {- padding: 10,- font: {- size: 14,- },- }- : {}),- callback: function _renderYLabel(_, i) {- const d = processedDatasets?.[0]- if (!d) {- return ''- }- let labelDescriptors: (string | number | undefined | null)[]- if (d.actions?.[i]?.custom_name) {- labelDescriptors = [- d.actions?.[i]?.custom_name,- d.breakdownLabels?.[i],- d.compareLabels?.[i],- ]- } else if (d.breakdownLabels?.[i]) {- labelDescriptors = [- ignoreActionsInSeriesLabels ? null : d.actions?.[i]?.name,- d.breakdownLabels[i],- d.compareLabels?.[i],- ]- } else if (d.labels?.[i]) {- labelDescriptors = [d.labels[i], d.compareLabels?.[i]]- } else {- labelDescriptors = [- ignoreActionsInSeriesLabels ? null : d.actions?.[i]?.name,- d.breakdownLabels?.[i],- d.compareLabels?.[i],- ]- }- return labelDescriptors.filter((l) => !!l).join(' - ')- },- },- grid: {- ...gridOptions,- display: !inSurveyView,- },- },- }- options.indexAxis = 'y'- }-- return {- type: (isBar ? GraphType.Bar : type) as ChartType,- data: { labels: displayLabels, datasets: processedDatasets },- options,- plugins: [ChartDataLabels, ...(showTrendLines ? [chartTrendline as any] : [])],- }- },- deps: [- chartDatasets,- isDarkModeOn,- trendsFilter,- formula,- showValuesOnSeries,- showPercentStackView,- showMultipleYAxes,- _goalLines,- theme,- type,- isArea,- showTrendLines,- displayLabels,- legend?.display,- hideTooltip,- showTooltip,- getTooltip,- pinTooltip,- hoveredDatasetIndex,- setHoveredDatasetIndex,- isHighlightBarMode,- interval,- timezone,- effectiveZoomCallback,- zoomPluginOptions,- anomalyPoints,- ],- })-- // Only observe canvas size when annotations are shown — avoids unnecessary ResizeObservers on dashboards.- // When showAnnotations is false, noRef.current is null so the observer disconnects (verified in use-resize-observer v9.1.0 source).- const noRef = useRef<HTMLCanvasElement>(null)- const { width: chartWidth, height: chartHeight } = useResizeObserver({ ref: showAnnotations ? canvasRef : noRef })-- return (- <div className={clsx('LineGraph w-full grow relative overflow-hidden')} data-attr={dataAttr}>- <canvas ref={canvasRef} />- {showAnnotations && chartRef.current && chartWidth && chartHeight ? (- <AnnotationsOverlay- chart={chartRef.current}- dates={currentPeriodResult?.days || datasets[0]?.days || EMPTY_DATES}- chartWidth={chartWidth}- chartHeight={chartHeight}- insightNumericId={insight.id || 'new'}- datasetIndex={annotationDatasetIndex}- />- ) : null}- </div>- )-}diff --git a/frontend/src/scenes/retention/RetentionGraph.tsx b/frontend/src/scenes/retention/RetentionGraph.tsxindex 549596563cc2..3d61cf6060ab 100644--- a/frontend/src/scenes/retention/RetentionGraph.tsx+++ b/frontend/src/scenes/retention/RetentionGraph.tsx@@ -1,130 +1,25 @@-import { useActions, useValues } from 'kea'+import { useValues } from 'kea'-import { FEATURE_FLAGS } from 'lib/constants'-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'-import { roundToDecimal } from 'lib/utils/numbers'import { insightLogic } from 'scenes/insights/insightLogic'-import { TrendsFilter } from '~/queries/schema/schema-general'-import { ChartDisplayType, GraphDataset, GraphType } from '~/types'+import { ChartDisplayType } from '~/types'import { RetentionBarChart } from 'products/product_analytics/frontend/insights/retention/RetentionBarChart/RetentionBarChart'import { RetentionLineChart } from 'products/product_analytics/frontend/insights/retention/RetentionLineChart/RetentionLineChart'-import { InsightEmptyState } from '../insights/EmptyStates'-import { LineGraph } from '../insights/views/LineGraph/LineGraph'import { retentionGraphLogic } from './retentionGraphLogic'-import { retentionModalLogic } from './retentionModalLogic'interface RetentionGraphProps {inSharedMode?: boolean- chartType?: 'line' | 'bar'-}--function displayTypeToGraphType(displayType: ChartDisplayType): GraphType {- switch (displayType) {- case ChartDisplayType.ActionsBar:- return GraphType.Bar- default:- return GraphType.Line- }}export function RetentionGraph({ inSharedMode = false }: RetentionGraphProps): JSX.Element | null {const { insightProps } = useValues(insightLogic)- const { featureFlags } = useValues(featureFlagLogic)- const {- hasValidBreakdown,- retentionFilter,- filteredTrendSeries,- incompletenessOffsetFromEnd,- labelGroupType,- shouldShowMeanPerBreakdown,- showTrendLines,- xAxisLabels,- } = useValues(retentionGraphLogic(insightProps))- const { openModal } = useActions(retentionModalLogic(insightProps))-- const selectedInterval = retentionFilter?.selectedInterval ?? null-- const isPercentage = !retentionFilter?.aggregationType || retentionFilter.aggregationType === 'count'+ const { retentionFilter } = useValues(retentionGraphLogic(insightProps))const isBarDisplay = retentionFilter?.display === ChartDisplayType.ActionsBar- if (featureFlags[FEATURE_FLAGS.PRODUCT_ANALYTICS_HOG_CHARTS_RETENTION]) {- if (isBarDisplay) {- return <RetentionBarChart inSharedMode={inSharedMode} />- }- return <RetentionLineChart inSharedMode={inSharedMode} />+ if (isBarDisplay) {+ return <RetentionBarChart inSharedMode={inSharedMode} />}-- if (filteredTrendSeries.length === 0 && hasValidBreakdown) {- return (- <p className="w-full m-0 text-center text-sm text-gray-500">- Select a breakdown to see the retention graph- </p>- )- }-- return filteredTrendSeries ? (- <LineGraph- data-attr="trend-line-graph"- type={displayTypeToGraphType(retentionFilter?.display || ChartDisplayType.ActionsLineGraph)}- datasets={filteredTrendSeries as GraphDataset[]}- labels={xAxisLabels}- isInProgress={incompletenessOffsetFromEnd < 0}- inSharedMode={!!inSharedMode}- showPersonsModal={false}- labelGroupType={labelGroupType}- // in retention graph, we want the bars side by side so it's easier- // to see the retention trend change for each cohort- isStacked={retentionFilter?.display !== ChartDisplayType.ActionsBar}- trendsFilter={{ aggregationAxisFormat: isPercentage ? 'percentage' : 'numeric' } as TrendsFilter}- tooltip={{- altTitle:- selectedInterval !== null- ? `${retentionFilter?.period} ${selectedInterval}`- : (seriesData) => xAxisLabels[seriesData[0]?.dataIndex] ?? '',- renderSeries: function _renderCohortPrefix(value) {- // If we're showing an interval view, show "Cohort: <date>"- if (selectedInterval !== null) {- return <>Cohort {value}</>- }- // If we're showing mean values per breakdown, show the breakdown value directly- if (shouldShowMeanPerBreakdown) {- return <>{value}</>- }- // Otherwise prefix with "Cohort" for normal cohort view- return <>Cohort {value}</>- },- renderCount: (count) => {- return isPercentage ? `${roundToDecimal(count)}%` : `${roundToDecimal(count)}`- },- }}- onClick={(payload) => {- // Only open the modal if we're not showing mean values (which don't map to specific cohorts)- if (shouldShowMeanPerBreakdown) {- return- }-- const { points } = payload- const referencePoint = points.clickedPointNotLine- ? points.pointsIntersectingClick[0]- : points.pointsIntersectingLine[0]-- // In the interval view, each data point represents a different cohort at the same interval,- // so use the point index (cohort) rather than the dataset index (breakdown series)- const rowIndex = selectedInterval !== null ? referencePoint.index : referencePoint.dataset.index-- // we should always have a rowIndex, but adding a guard nonetheless- if (rowIndex !== undefined) {- openModal(rowIndex)- }- }}- incompletenessOffsetFromEnd={incompletenessOffsetFromEnd}- showTrendLines={showTrendLines}- goalLines={retentionFilter?.goalLines ?? []}- />- ) : (- <InsightEmptyState />- )+ return <RetentionLineChart inSharedMode={inSharedMode} />}diff --git a/frontend/src/scenes/trends/Trends.tsx b/frontend/src/scenes/trends/Trends.tsxindex ba57aafa0c20..c9a079782b5c 100644--- a/frontend/src/scenes/trends/Trends.tsx+++ b/frontend/src/scenes/trends/Trends.tsx@@ -3,8 +3,6 @@ import { Suspense, lazy } from 'react'import { LemonButton } from '@posthog/lemon-ui'-import { FEATURE_FLAGS } from 'lib/constants'-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { WrappingLoadingSkeleton } from 'lib/ui/WrappingLoadingSkeleton/WrappingLoadingSkeleton'import { insightLogic } from 'scenes/insights/insightLogic'import { BoldNumber } from 'scenes/insights/views/BoldNumber'@@ -15,7 +13,6 @@ import { QueryContext } from '~/queries/types'import { ChartDisplayType, InsightType } from '~/types'import { trendsDataLogic } from './trendsDataLogic'-import { ActionsHorizontalBar, ActionsLineGraph, ActionsPie } from './viz'// Lazy-loaded viz types that are rarely used on dashboardsconst WorldMap = lazy(() => import('scenes/insights/views/WorldMap').then((m) => ({ default: m.WorldMap })))const RegionMap = lazy(() => import('scenes/insights/views/RegionMap').then((m) => ({ default: m.RegionMap })))@@ -23,13 +20,13 @@ const TrendsCalendarHeatMap = lazy(() =>import('scenes/insights/views/CalendarHeatMap').then((m) => ({ default: m.TrendsCalendarHeatMap })))const BoxPlotChart = lazy(() => import('scenes/insights/views/BoxPlot').then((m) => ({ default: m.BoxPlotChart })))-// Flag-gated — keep the quill/d3 slope chart out of the eager Trends/Dashboard bundle+// Lazy-loaded — keep the quill/d3 slope chart out of the eager Trends/Dashboard bundleconst TrendsSlopeChart = lazy(() =>import('products/product_analytics/frontend/insights/trends/TrendsSlopeChart/TrendsSlopeChart').then((m) => ({default: m.TrendsSlopeChart,})))-// Flag-gated — keep full d3 out of the eager Trends/Dashboard bundle+// Lazy-loaded — keep full d3 out of the eager Trends/Dashboard bundleconst TrendsLineChart = lazy(() =>import('products/product_analytics/frontend/insights/trends/TrendsLineChart/TrendsLineChart').then((m) => ({default: m.TrendsLineChart,@@ -78,7 +75,6 @@ interface Props {export function TrendInsight({ view, context, embedded, inSharedMode, editMode }: Props): JSX.Element {const { insightProps, showPersonsModal: insightLogicShowPersonsModal } = useValues(insightLogic)const showPersonsModal = insightLogicShowPersonsModal && !inSharedMode- const { featureFlags } = useValues(featureFlagLogic)const { display, series, breakdownFilter, hasBreakdownMore, breakdownValuesLoading, isLifecycle, isStickiness } =useValues(trendsDataLogic(insightProps))@@ -91,15 +87,8 @@ export function TrendInsight({ view, context, embedded, inSharedMode, editMode }inSharedMode,}- const hogChartsTrendsEnabled =- featureFlags[FEATURE_FLAGS.PRODUCT_ANALYTICS_HOG_CHARTS_TRENDS] && !isLifecycle && !isStickiness- const hogChartsStickinessEnabled =- !!featureFlags[FEATURE_FLAGS.PRODUCT_ANALYTICS_HOG_CHARTS_STICKINESS] && isStickiness- const hogChartsLifecycleEnabled =- !!featureFlags[FEATURE_FLAGS.PRODUCT_ANALYTICS_HOG_CHARTS_LIFECYCLE] && isLifecycle-const renderViz = (): JSX.Element | undefined => {- if (hogChartsLifecycleEnabled) {+ if (isLifecycle) {return <TrendsLifecycleChart context={context} inSharedMode={inSharedMode} />}if (@@ -108,22 +97,16 @@ export function TrendInsight({ view, context, embedded, inSharedMode, editMode }display === ChartDisplayType.ActionsLineGraphCumulative ||display === ChartDisplayType.ActionsAreaGraph) {- if (hogChartsTrendsEnabled) {- return <TrendsLineChart context={context} inSharedMode={inSharedMode} />- }- if (hogChartsStickinessEnabled) {+ if (isStickiness) {return <StickinessLineChart context={context} />}- return <ActionsLineGraph {...commonProps} />+ return <TrendsLineChart context={context} inSharedMode={inSharedMode} />}if (display === ChartDisplayType.ActionsBar || display === ChartDisplayType.ActionsUnstackedBar) {- if (hogChartsTrendsEnabled) {- return <TrendsBarChart context={context} inSharedMode={inSharedMode} embedded={embedded} />- }- if (hogChartsStickinessEnabled) {+ if (isStickiness) {return <StickinessBarChart context={context} />}- return <ActionsLineGraph {...commonProps} />+ return <TrendsBarChart context={context} inSharedMode={inSharedMode} embedded={embedded} />}if (display === ChartDisplayType.BoldNumber) {return <BoldNumber {...commonProps} />@@ -140,18 +123,10 @@ export function TrendInsight({ view, context, embedded, inSharedMode, editMode })}if (display === ChartDisplayType.ActionsPie) {- if (hogChartsTrendsEnabled) {- return (- <TrendsPieChart context={context} inSharedMode={inSharedMode} showPersonsModal={showPersonsModal} />- )- }- return <ActionsPie {...commonProps} />+ return <TrendsPieChart context={context} inSharedMode={inSharedMode} showPersonsModal={showPersonsModal} />}if (display === ChartDisplayType.ActionsBarValue) {- if (hogChartsTrendsEnabled) {- return <TrendsBarChart context={context} inSharedMode={inSharedMode} embedded={embedded} />- }- return <ActionsHorizontalBar {...commonProps} />+ return <TrendsBarChart context={context} inSharedMode={inSharedMode} embedded={embedded} />}if (display === ChartDisplayType.WorldMap) {const hasSubdivisionBreakdown =diff --git a/frontend/src/scenes/trends/viz/ActionsHorizontalBar.tsx b/frontend/src/scenes/trends/viz/ActionsHorizontalBar.tsxdeleted file mode 100644index 925fb1e02932..000000000000--- a/frontend/src/scenes/trends/viz/ActionsHorizontalBar.tsx+++ /dev/null@@ -1,152 +0,0 @@-import { useValues } from 'kea'-import { useEffect, useState } from 'react'--import { formatAggregationAxisValueWithShareOfTotal } from 'scenes/insights/aggregationAxisFormat'-import { insightLogic } from 'scenes/insights/insightLogic'-import { formatBreakdownLabel } from 'scenes/insights/utils'-import { teamLogic } from 'scenes/teamLogic'-import { datasetToActorsQuery } from 'scenes/trends/viz/datasetToActorsQuery'--import { cohortsModel } from '~/models/cohortsModel'-import { propertyDefinitionsModel } from '~/models/propertyDefinitionsModel'-import { ChartParams, GraphType } from '~/types'--import { InsightEmptyState } from '../../insights/EmptyStates'-import { LineGraph } from '../../insights/views/LineGraph/LineGraph'-import { openPersonsModal } from '../persons-modal/PersonsModal'-import { trendsDataLogic } from '../trendsDataLogic'--type DataSet = any--export function ActionsHorizontalBar({- showPersonsModal = true,- context,- inCardView,-}: ChartParams): JSX.Element | null {- const [data, setData] = useState<DataSet[] | null>(null)- const [total, setTotal] = useState(0)-- const { allCohorts } = useValues(cohortsModel)- const { formatPropertyValueForDisplay } = useValues(propertyDefinitionsModel)-- const { insightProps } = useValues(insightLogic)- const { baseCurrency } = useValues(teamLogic)- const {- indexedResults,- labelGroupType,- trendsFilter,- formula,- showValuesOnSeries,- hasDataWarehouseSeries,- querySource,- breakdownFilter,- isSingleSeriesDefinition,- isBreakdownSeries,- getTrendsColor,- getTrendsHidden,- theme,- } = useValues(trendsDataLogic(insightProps))-- useEffect(() => {- if (indexedResults) {- const visibleResults = indexedResults.filter((item) => !getTrendsHidden(item))- const colorList = visibleResults.map(getTrendsColor)-- setData([- {- labels: visibleResults.map((item) => item.label),- data: visibleResults.map((item) => item.aggregated_value),- actions: visibleResults.map((item) => item.action),- personsValues: visibleResults.map((item) => item.persons),- breakdownValues: visibleResults.map((item) => item.breakdown_value),- breakdownLabels: visibleResults.map((item) => {- return formatBreakdownLabel(- item.breakdown_value,- breakdownFilter,- allCohorts?.results,- formatPropertyValueForDisplay,- undefined,- item.label- )- }),- compareLabels: visibleResults.map((item) => item.compare_label),- backgroundColor: colorList,- hoverBackgroundColor: colorList,- hoverBorderColor: colorList,- borderColor: colorList,- hoverBorderWidth: 10,- borderWidth: 1,- },- ])- setTotal(visibleResults.reduce((prev, item) => prev + item.aggregated_value, 0))- }- }, [- indexedResults,- theme,- breakdownFilter,- allCohorts?.results,- formatPropertyValueForDisplay,- getTrendsColor,- getTrendsHidden,- ])-- return data && total > 0 ? (- <LineGraph- data-attr="trend-bar-value-graph"- type={GraphType.HorizontalBar}- tooltip={{- showHeader: false,- groupTypeLabel: context?.groupTypeLabel,- renderCount: (value: number): string =>- formatAggregationAxisValueWithShareOfTotal(trendsFilter, value, total, baseCurrency),- }}- labelGroupType={labelGroupType}- datasets={data}- labels={data[0].labels}- showPersonsModal={showPersonsModal}- trendsFilter={trendsFilter}- formula={formula}- showValuesOnSeries={showValuesOnSeries}- ignoreActionsInSeriesLabels={- context?.ignoreActionsInSeriesLabels || (isSingleSeriesDefinition && isBreakdownSeries)- }- isStacked={false}- inCardView={inCardView}- onClick={- context?.onDataPointClick || (showPersonsModal && !trendsFilter?.formula && !hasDataWarehouseSeries)- ? (point) => {- const { index, points } = point-- const dataset = points.referencePoint.dataset- dataset.action = dataset.actions?.[index]-- const label = dataset.labels?.[point.index]-- if (context?.onDataPointClick) {- context.onDataPointClick(- {- breakdown: dataset.breakdownValues?.[index],- compare: dataset.compareLabels?.[index] || undefined,- },- indexedResults[0]- )- return- }-- openPersonsModal({- title: label || '',- query: datasetToActorsQuery({ dataset, query: querySource!, index }),- additionalSelect: {- value_at_data_point: 'event_count',- matched_recordings: 'matched_recordings',- },- orderBy: ['event_count DESC, actor_id DESC'],- })- }- : undefined- }- />- ) : (- <InsightEmptyState />- )-}diff --git a/frontend/src/scenes/trends/viz/ActionsLineGraph.tsx b/frontend/src/scenes/trends/viz/ActionsLineGraph.tsxdeleted file mode 100644index 5c36e1706a95..000000000000--- a/frontend/src/scenes/trends/viz/ActionsLineGraph.tsx+++ /dev/null@@ -1,275 +0,0 @@-import { useValues } from 'kea'--import { Chart, ChartType, DeepPartial, LegendOptions, defaults } from 'lib/Chart'-import { insightAlertsLogic } from 'lib/components/Alerts/insightAlertsLogic'-import { DateDisplay } from 'lib/components/DateDisplay'-import { PropertyKeyInfo } from 'lib/components/PropertyKeyInfo'-import { ciRanges, movingAverage } from 'lib/statistics'-import { hexToRGBA } from 'lib/utils/colors'-import { capitalizeFirstLetter } from 'lib/utils/strings'-import { insightLogic } from 'scenes/insights/insightLogic'-import { teamLogic } from 'scenes/teamLogic'-import { datasetToActorsQuery } from 'scenes/trends/viz/datasetToActorsQuery'--import { ChartDisplayType, ChartParams, GraphType } from '~/types'--import { InsightEmptyState } from '../../insights/EmptyStates'-import { LineGraph } from '../../insights/views/LineGraph/LineGraph'-import { openPersonsModal } from '../persons-modal/PersonsModal'-import { trendsDataLogic } from '../trendsDataLogic'--export function ActionsLineGraph({- inSharedMode = false,- showPersonsModal = true,- context,-}: ChartParams): JSX.Element | null {- const { insightProps, insight } = useValues(insightLogic)-- const {- indexedResults,- labelGroupType,- incompletenessOffsetFromEnd,- formula,- display,- interval,- showValuesOnSeries,- showPercentStackView,- supportsPercentStackView,- showAnnotations,- trendsFilter,- lifecycleFilter,- isLifecycle,- isStickiness,- hasPersonsModal,- showLegend,- querySource,- yAxisScaleType,- showMultipleYAxes,- goalLines,- insightData,- showConfidenceIntervals,- confidenceLevel,- showTrendLines,- showMovingAverage,- movingAverageIntervals,- getTrendsColor,- currentPeriodResult,- } = useValues(trendsDataLogic(insightProps))- const { weekStartDay, timezone } = useValues(teamLogic)-- const { alertThresholdLines, alertAnomalyPoints } = useValues(- insightAlertsLogic({ insightId: insight.id!, insightLogicProps: insightProps })- )-- const labels = currentPeriodResult?.labels ?? []-- const shortenLifecycleLabels = (s: string | undefined): string => {- const labelParts = s?.split(' - ')- const label = labelParts?.[labelParts.length - 1]-- return capitalizeFirstLetter(label ?? s ?? 'None')- }-- const legend: DeepPartial<LegendOptions<ChartType>> = {- display: false,- }- if (isLifecycle && !!showLegend) {- legend.display = true- legend.labels = {- generateLabels: (chart: Chart) => {- const labelElements = defaults.plugins.legend.labels.generateLabels(chart)- labelElements.forEach((elt) => {- elt.text = shortenLifecycleLabels(elt.text)- })- return labelElements- },- }- }-- if (- !(indexedResults && indexedResults[0]?.data && indexedResults.filter((result) => result.count !== 0).length > 0)- ) {- return <InsightEmptyState heading={context?.emptyStateHeading} detail={context?.emptyStateDetail} />- }-- const finalDatasets = indexedResults.flatMap((originalDataset, index) => {- const yAxisID = showMultipleYAxes && index > 0 ? `y${index}` : 'y'- const mainSeries = { ...originalDataset, yAxisID }- const datasets = [mainSeries]- const color = getTrendsColor(originalDataset)-- if (showConfidenceIntervals) {- const [lower, upper] = ciRanges(originalDataset.data, confidenceLevel / 100)-- const lowerCIBound = {- ...originalDataset,- label: `${originalDataset.label} (CI lower)`,- action: {- ...originalDataset.action,- name: `${originalDataset.label} (CI lower)`,- },- data: lower,- borderColor: color,- backgroundColor: 'transparent',- pointRadius: 0,- borderWidth: 0,- hideTooltip: true,- yAxisID,- }- const upperCIBound = {- ...originalDataset,- label: `${originalDataset.label} (CI upper)`,- action: {- ...originalDataset.action,- name: `${originalDataset.label} (CI upper)`,- },- data: upper,- borderColor: color,- backgroundColor: hexToRGBA(color, 0.2),- pointRadius: 0,- borderWidth: 0,- fill: '-1',- hideTooltip: true,- yAxisID,- }- datasets.push(lowerCIBound, upperCIBound)- }-- if (showMovingAverage) {- const movingAverageData = movingAverage(originalDataset.data, movingAverageIntervals)- const movingAverageDataset = {- ...originalDataset,- label: `${originalDataset.label} (Moving avg)`,- action: {- ...originalDataset.action,- name: `${originalDataset.label} (Moving avg)`,- },- data: movingAverageData,- borderColor: color,- backgroundColor: 'transparent',- pointRadius: 0,- borderWidth: 2,- borderDash: [10, 3],- hideTooltip: true,- yAxisID,- }- datasets.push(movingAverageDataset)- }- return datasets- })-- return (- <LineGraph- data-attr="trend-line-graph"- type={- display === ChartDisplayType.ActionsBar ||- display === ChartDisplayType.ActionsUnstackedBar ||- isLifecycle- ? GraphType.Bar- : GraphType.Line- }- datasets={finalDatasets}- labels={labels}- inSharedMode={inSharedMode}- labelGroupType={labelGroupType}- showPersonsModal={showPersonsModal}- trendsFilter={trendsFilter}- formula={formula}- showValuesOnSeries={showValuesOnSeries}- showPercentView={isStickiness}- showPercentStackView={showPercentStackView}- supportsPercentStackView={supportsPercentStackView}- isStacked={- isLifecycle ? (lifecycleFilter?.stacked ?? true) : display !== ChartDisplayType.ActionsUnstackedBar- }- yAxisScaleType={yAxisScaleType}- showMultipleYAxes={showMultipleYAxes}- showTrendLines={showTrendLines}- tooltip={- isLifecycle- ? {- altTitle: 'Users',- altRightTitle: (_, date) => {- return date- },- renderSeries: (_, datum) => {- return shortenLifecycleLabels(datum.label)- },- }- : {- groupTypeLabel: context?.groupTypeLabel,- filter: (s) => !s.hideTooltip,- formatCompareLabel: context?.formatCompareLabel,- }- }- isInProgress={!isStickiness && incompletenessOffsetFromEnd < 0}- isArea={display === ChartDisplayType.ActionsAreaGraph}- incompletenessOffsetFromEnd={incompletenessOffsetFromEnd}- legend={legend}- hideAnnotations={inSharedMode || showAnnotations === false}- goalLines={[...alertThresholdLines, ...(goalLines || [])]}- anomalyPoints={alertAnomalyPoints}- onDateRangeZoom={context?.onDateRangeZoom}- onClick={- context?.onDataPointClick || (showPersonsModal && hasPersonsModal)- ? (payload) => {- const { index, points } = payload-- const dataset = points.referencePoint.dataset- if (!dataset) {- return- }-- const day = dataset.action?.days?.[index] ?? dataset?.days?.[index] ?? ''- const label = dataset?.label ?? dataset?.labels?.[index] ?? ''-- if (context?.onDataPointClick) {- context.onDataPointClick(- {- breakdown: dataset.breakdownValues?.[index],- compare: dataset.compareLabels?.[index] || undefined,- day,- },- indexedResults[0]- )- return- }-- const title = isStickiness ? (- <>- <PropertyKeyInfo value={label || ''} disablePopover /> stickiness on{' '}- {interval || 'day'} {day}- </>- ) : (- (label: string) => (- <>- {label} on{' '}- <DateDisplay- interval={interval || 'day'}- resolvedDateRange={insightData?.resolved_date_range}- timezone={timezone}- weekStartDay={weekStartDay}- date={day?.toString() || ''}- />- </>- )- )-- openPersonsModal({- title,- query: datasetToActorsQuery({ dataset, query: querySource!, day }),- additionalSelect:- isLifecycle || isStickiness- ? {}- : {- value_at_data_point: 'event_count',- matched_recordings: 'matched_recordings',- },- orderBy: isLifecycle || isStickiness ? undefined : ['event_count DESC, actor_id DESC'],- })- }- : undefined- }- />- )-}diff --git a/frontend/src/scenes/trends/viz/ActionsPie.scss b/frontend/src/scenes/trends/viz/ActionsPie.scssdeleted file mode 100644index 1558e9816248..000000000000--- a/frontend/src/scenes/trends/viz/ActionsPie.scss+++ /dev/null@@ -1,30 +0,0 @@-.ActionsPie {- display: flex;- flex: 1;- flex-direction: row;- gap: 0.5rem;- width: 100%;- height: 100%;-- .ActionsPie__component {- flex: 1;- min-width: 33%;- padding: 1rem;- overflow: hidden;-- .ActionsPie__chart {- position: relative;- width: 100%;- height: calc(100% - 4.5rem);- transition: height 0.5s;-- &.ActionsPie__chart--full-height {- height: 100%;- }- }-- h3 {- letter-spacing: -0.025em;- }- }-}diff --git a/frontend/src/scenes/trends/viz/ActionsPie.tsx b/frontend/src/scenes/trends/viz/ActionsPie.tsxdeleted file mode 100644index 3ee7f19bd83a..000000000000--- a/frontend/src/scenes/trends/viz/ActionsPie.tsx+++ /dev/null@@ -1,153 +0,0 @@-import './ActionsPie.scss'--import { useValues } from 'kea'-import { useEffect, useState } from 'react'--import { formatAggregationAxisValue } from 'scenes/insights/aggregationAxisFormat'-import { insightLogic } from 'scenes/insights/insightLogic'-import { formatBreakdownLabel } from 'scenes/insights/utils'-import { PieChart } from 'scenes/insights/views/LineGraph/PieChart'-import { teamLogic } from 'scenes/teamLogic'-import { datasetToActorsQuery } from 'scenes/trends/viz/datasetToActorsQuery'--import { cohortsModel } from '~/models/cohortsModel'-import { propertyDefinitionsModel } from '~/models/propertyDefinitionsModel'-import { ChartParams, GraphDataset, GraphPointPayload, GraphType } from '~/types'--import { openPersonsModal } from '../persons-modal/PersonsModal'-import { trendsDataLogic } from '../trendsDataLogic'--export function ActionsPie({ inSharedMode, showPersonsModal = true, context }: ChartParams): JSX.Element | null {- const [data, setData] = useState<GraphDataset[] | null>(null)- const [total, setTotal] = useState(0)-- const { allCohorts } = useValues(cohortsModel)- const { formatPropertyValueForDisplay } = useValues(propertyDefinitionsModel)-- const { insightProps } = useValues(insightLogic)- const { baseCurrency } = useValues(teamLogic)- const {- indexedResults,- labelGroupType,- trendsFilter,- formula,- showValuesOnSeries,- showLabelOnSeries,- supportsPercentStackView,- showPercentStackView,- pieChartVizOptions,- hasDataWarehouseSeries,- querySource,- breakdownFilter,- getTrendsColor,- getTrendsHidden,- } = useValues(trendsDataLogic(insightProps))-- const onDataPointClick = context?.onDataPointClick-- const showAggregation = !pieChartVizOptions?.hideAggregation-- useEffect(() => {- if (indexedResults) {- const visibleResults = indexedResults.filter((item) => !getTrendsHidden(item))- const days = visibleResults.length > 0 ? visibleResults[0].days : []- const colorList = visibleResults.map(getTrendsColor)-- setData([- {- id: 0,- labels: visibleResults.map((item) => item.label),- data: visibleResults.map((item) => item.aggregated_value),- actions: visibleResults.map((item) => item.action),- breakdownValues: visibleResults.map((item) => item.breakdown_value),- breakdownLabels: visibleResults.map((item) => {- return formatBreakdownLabel(- item.breakdown_value,- breakdownFilter,- allCohorts.results,- formatPropertyValueForDisplay- )- }),- compareLabels: visibleResults.map((item) => item.compare_label),- personsValues: visibleResults.map((item) => item.persons),- days,- backgroundColor: colorList,- borderColor: colorList, // For colors to display in the tooltip- },- ])- setTotal(visibleResults.reduce((prev, item) => prev + item.aggregated_value, 0))- }- }, [- indexedResults,- breakdownFilter,- getTrendsColor,- getTrendsHidden,- allCohorts.results,- formatPropertyValueForDisplay,- ])-- let onClick: ((payload: GraphPointPayload) => void) | undefined = undefined- if (onDataPointClick) {- onClick = (payload) => {- const { points, index } = payload- const dataset = points.referencePoint.dataset- onDataPointClick(- {- breakdown: dataset.breakdownValues?.[index],- compare: dataset.compareLabels?.[index] || undefined,- },- indexedResults[0]- )- }- } else if (showPersonsModal && !formula) {- onClick = (payload: GraphPointPayload) => {- const { points, index } = payload- const dataset = points.referencePoint.dataset- const label = dataset.labels?.[index]- openPersonsModal({- title: label || '',- query: datasetToActorsQuery({ dataset, query: querySource!, index }),- additionalSelect: {- value_at_data_point: 'event_count',- matched_recordings: 'matched_recordings',- },- orderBy: ['event_count DESC, actor_id DESC'],- })- }- }-- return data ? (- data[0] && data[0].labels ? (- <div className="ActionsPie">- <div className="ActionsPie__component">- <div className={`ActionsPie__chart ${!showAggregation ? 'ActionsPie__chart--full-height' : ''}`}>- <PieChart- data-attr="trend-pie-graph"- type={GraphType.Pie}- datasets={data}- labels={data[0].labels}- labelGroupType={labelGroupType}- inSharedMode={!!inSharedMode}- showPersonsModal={showPersonsModal}- trendsFilter={trendsFilter}- formula={formula}- showValuesOnSeries={showValuesOnSeries}- showLabelOnSeries={showLabelOnSeries}- supportsPercentStackView={supportsPercentStackView}- showPercentStackView={showPercentStackView}- onClick={hasDataWarehouseSeries ? undefined : onClick}- disableHoverOffset={pieChartVizOptions?.disableHoverOffset}- />- </div>- {showAggregation && (- <div className="text-7xl text-center font-bold m-0">- {formatAggregationAxisValue(trendsFilter, total, baseCurrency)}- </div>- )}- </div>- </div>- ) : (- <p className="text-center mt-16">We couldn't find any matching actions.</p>- )- ) : null-}diff --git a/frontend/src/scenes/trends/viz/index.ts b/frontend/src/scenes/trends/viz/index.tsdeleted file mode 100644index cd0636422f7c..000000000000--- a/frontend/src/scenes/trends/viz/index.ts+++ /dev/null@@ -1,3 +0,0 @@-export * from './ActionsHorizontalBar'-export * from './ActionsLineGraph'-export * from './ActionsPie'diff --git a/frontend/src/scenes/trends/viz/trendsAdapterConstants.ts b/frontend/src/scenes/trends/viz/trendsAdapterConstants.tsdeleted file mode 100644index cc4d50905613..000000000000--- a/frontend/src/scenes/trends/viz/trendsAdapterConstants.ts+++ /dev/null@@ -1,7 +0,0 @@-// Shared constants for the trends-line-chart and trends-bar-chart adapters.-//-// `COMPARE_PREVIOUS_DIM_OPACITY` dims the previous-period series in compare mode so it-// reads as the "ghost" series. `TRENDLINE_DIM_OPACITY` dims the regression line so it-// doesn't visually compete with the raw series.-export const COMPARE_PREVIOUS_DIM_OPACITY = 0.5-export const TRENDLINE_DIM_OPACITY = 0.5diff --git a/packages/quill/packages/charts/AGENTS.md b/packages/quill/packages/charts/AGENTS.mdindex 26ca0afbbf69..c035ee2eb756 100644--- a/packages/quill/packages/charts/AGENTS.md+++ b/packages/quill/packages/charts/AGENTS.md@@ -28,6 +28,7 @@ const theme = useChartTheme() // reads CSS vars, tracks light/dark switches- Series colors come from `--data-color-1..15` (ordered categorical palette from `@posthog/quill-tokens`); chrome from `--color-graph-axis-label` / `--color-graph-axis-line` / `--color-graph-crosshair`.- `themeFromCssVars()` is the one-shot non-hook version; `DEFAULT_CHART_COLORS` is the no-DOM fallback (kept in sync with tokens by a CI-enforced test).- Omit `color` on a series to get palette assignment by index — preferred. Explicit `color` accepts hex or `var(--...)`.+- `theme.skipDraw` suppresses all canvas painting (static layer + hover overlay) while still mounting the `<canvas>` element. Use it for deterministic visual-snapshot tests where the async paint pipeline (ResizeObserver → requestAnimationFrame) races the screenshot — the chart renders blank but layout and DOM selectors are unaffected.## Series shape (all multi-series charts)diff --git a/packages/quill/packages/charts/src/core/hooks/useChartDraw.ts b/packages/quill/packages/charts/src/core/hooks/useChartDraw.tsindex 7ae08871f204..cb5e16a7a4c7 100644--- a/packages/quill/packages/charts/src/core/hooks/useChartDraw.ts+++ b/packages/quill/packages/charts/src/core/hooks/useChartDraw.ts@@ -56,7 +56,7 @@ export function useChartDraw({cancelAnimationFrame(staticRafRef.current)staticRafRef.current = null}- if (!ctx || !dimensions || !scales) {+ if (!ctx || !dimensions || !scales || theme.skipDraw) {return}staticRafRef.current = requestAnimationFrame(() => {diff --git a/packages/quill/packages/charts/src/core/hooks/useHoverAnimation.ts b/packages/quill/packages/charts/src/core/hooks/useHoverAnimation.tsindex cd332eb72da5..b6e6c6c6fb4b 100644--- a/packages/quill/packages/charts/src/core/hooks/useHoverAnimation.ts+++ b/packages/quill/packages/charts/src/core/hooks/useHoverAnimation.ts@@ -69,7 +69,7 @@ export function useHoverAnimation({cancelAnimationFrame(hoverRafRef.current)hoverRafRef.current = null}- if (!overlayCtx || !dimensions || !scales) {+ if (!overlayCtx || !dimensions || !scales || themeRef.current.skipDraw) {return}// Restart the fade on hoverIndex change — invalidate drewVisible too so the nextdiff --git a/packages/quill/packages/charts/src/core/types.ts b/packages/quill/packages/charts/src/core/types.tsindex 2397963da01c..f6b17201f6ba 100644--- a/packages/quill/packages/charts/src/core/types.ts+++ b/packages/quill/packages/charts/src/core/types.ts@@ -8,6 +8,8 @@ export interface ChartTheme {tooltipBackground?: stringtooltipColor?: stringtooltipZIndex?: number | string+ /** Skip canvas painting while still mounting the canvas. For deterministic visual-snapshot tests. */+ skipDraw?: boolean}/** Default axis id used when a series doesn't specify one. */diff --git a/playwright/e2e/api-insight-creation.spec.ts b/playwright/e2e/api-insight-creation.spec.tsindex f4c5e979152e..e7a46df04fe1 100644--- a/playwright/e2e/api-insight-creation.spec.ts+++ b/playwright/e2e/api-insight-creation.spec.ts@@ -60,7 +60,7 @@ test('create trends insight via API and snapshot', async ({ page, playwrightSetuawait expect(page.getByTestId('insights-graph')).toBeVisible({ timeout: 30000 })// Verify the insight rendered — either a chart canvas or an empty state- const canvas = page.getByTestId('insights-graph').locator('canvas')+ const canvas = page.getByTestId('insights-graph').locator('canvas[role="img"]')const emptyState = page.getByText('There are no matching events for this query')await expect(canvas.or(emptyState)).toBeVisible({ timeout: 30000 })diff --git a/playwright/e2e/insight-sharing-password.spec.ts b/playwright/e2e/insight-sharing-password.spec.tsindex e3f4b157205e..9a9532fd41e4 100644--- a/playwright/e2e/insight-sharing-password.spec.ts+++ b/playwright/e2e/insight-sharing-password.spec.ts@@ -138,10 +138,12 @@ test('password-protected insight sharing', async ({ page, playwrightSetup }) =>// Verify we're viewing the correct insight by checking the titleawait expect(page.locator('text=Password Protected Insight')).toBeVisible()- // Verify the insight content is loaded (either chart with canvas or empty state message)+ // Verify the insight content is loaded (either chart canvas or empty state message). The quill+ // chart renders two canvases (static `role="img"` layer + hover overlay), so scope to the+ // static layer to avoid a strict-mode violation.await expect(page- .locator('[data-attr="insights-graph"] canvas')+ .locator('[data-attr="insights-graph"] canvas[role="img"]').or(page.locator('text=There are no matching events for this query'))).toBeVisible()diff --git a/playwright/e2e/product-analytics/dashboards.spec.ts b/playwright/e2e/product-analytics/dashboards.spec.tsindex 2cc27868f542..ec2e87b7bdb7 100644--- a/playwright/e2e/product-analytics/dashboards.spec.ts+++ b/playwright/e2e/product-analytics/dashboards.spec.ts@@ -111,7 +111,7 @@ test.describe('Dashboards', () => {await expect(page).toHaveURL(/\/dashboard\//)const card = dashboard.insightCards.filter({ hasText: insightName })await expect(card).toBeVisible()- await expect(card.locator('canvas')).toBeVisible()+ await expect(card.locator('canvas[role="img"]')).toBeVisible()})})diff --git a/playwright/e2e/product-analytics/insights/funnels.spec.ts b/playwright/e2e/product-analytics/insights/funnels.spec.tsindex 1f7966f47c79..e7c1c7a135a4 100644--- a/playwright/e2e/product-analytics/insights/funnels.spec.ts+++ b/playwright/e2e/product-analytics/insights/funnels.spec.ts@@ -150,8 +150,7 @@ test.describe('Funnel insights', () => {})await test.step('hover funnel bar to show tooltip', async () => {- const stepBar = insight.funnels.verticalChart.getByTestId('funnel-step-bar').first()- await stepBar.hover()+ await insight.funnels.hoverStepBars()await expect(insight.funnels.tooltip.first()).toBeVisible()})})diff --git a/playwright/e2e/product-analytics/insights/trends.spec.ts b/playwright/e2e/product-analytics/insights/trends.spec.tsindex 728ca2561892..7974bf3f9f4b 100644--- a/playwright/e2e/product-analytics/insights/trends.spec.ts+++ b/playwright/e2e/product-analytics/insights/trends.spec.ts@@ -284,15 +284,15 @@ test.describe('Trends insights', () => {await test.step('move away and verify tooltip hides', async () => {await insight.trends.hoverAway()- const wrapper = page.getByTestId('insight-tooltip-wrapper')- await expect(wrapper).toHaveCSS('opacity', '0')+ // The quill chart unmounts the tooltip on mouse-leave rather than fading a+ // persistent wrapper, so assert it detaches from the DOM.+ await expect(insight.trends.tooltip).toHaveCount(0, { timeout: 3000 })})await test.step('hover again and scroll to dismiss', async () => {await insight.trends.hoverChartAt(0.5, 0.5)await page.mouse.wheel(0, 200)- const wrapper = page.getByTestId('insight-tooltip-wrapper')- await expect(wrapper).toHaveCSS('opacity', '0')+ await expect(insight.trends.tooltip).toHaveCount(0, { timeout: 3000 })})await test.step('add breakdown and verify tooltip shows Chrome and Firefox', async () => {diff --git a/playwright/e2e/product-analytics/retention.spec.ts b/playwright/e2e/product-analytics/retention.spec.tsindex 7697ccb7f407..d166b301b1ed 100644--- a/playwright/e2e/product-analytics/retention.spec.ts+++ b/playwright/e2e/product-analytics/retention.spec.ts@@ -78,7 +78,7 @@ test.describe('Retention', () => {await test.step('verify line chart renders', async () => {await expect(insight.retention.chart).toBeVisible()- await expect(insight.retention.chart.locator('canvas')).toBeVisible()+ await expect(insight.retention.chart.locator('canvas[role="img"]')).toBeVisible()})})@@ -90,7 +90,7 @@ test.describe('Retention', () => {await insight.retention.waitForChart()await insight.retention.selectTargetEvent(EVENT_NAME)await insight.retention.selectReturningEvent(EVENT_NAME)- await expect(insight.retention.chart.locator('canvas')).toBeVisible()+ await expect(insight.retention.chart.locator('canvas[role="img"]')).toBeVisible()})await test.step('hover over chart points and verify tooltips', async () => {diff --git a/playwright/page-models/insightPage.ts b/playwright/page-models/insightPage.tsindex bd1f36751e78..3797cdae523c 100644--- a/playwright/page-models/insightPage.ts+++ b/playwright/page-models/insightPage.ts@@ -206,7 +206,9 @@ export class InsightPage {}async openPersonsModal(): Promise<void> {- await this.page.locator('.TrendsInsight canvas').click()+ // Click the static `role="img"` canvas — the quill chart also renders an+ // `aria-hidden` overlay canvas, so an unscoped `canvas` would match two.+ await this.page.locator('.TrendsInsight canvas[role="img"]').click()await this.page.waitForSelector('[data-attr="persons-modal"]', { state: 'visible' })}diff --git a/playwright/page-models/insights/chartInsightBase.ts b/playwright/page-models/insights/chartInsightBase.tsindex 54823e37c847..aa34cdfbf6f3 100644--- a/playwright/page-models/insights/chartInsightBase.ts+++ b/playwright/page-models/insights/chartInsightBase.ts@@ -71,7 +71,10 @@ export class ChartInsightBase {}async hoverChartAt(xFraction: number = 0.3, yFraction: number = 0.5): Promise<void> {- const canvas = this.chart.locator('canvas')+ // The quill chart renders two canvases (static `role="img"` layer + an+ // `aria-hidden` hover overlay), so target the static layer to avoid a+ // strict-mode violation. Both share the same box, so hovering it is correct.+ const canvas = this.chart.locator('canvas[role="img"]')await expect(canvas).toBeVisible()await expect(async () => {await canvas.scrollIntoViewIfNeeded()diff --git a/playwright/page-models/insights/funnelsInsight.ts b/playwright/page-models/insights/funnelsInsight.tsindex 0af78d4cfae9..d4040152feea 100644--- a/playwright/page-models/insights/funnelsInsight.ts+++ b/playwright/page-models/insights/funnelsInsight.ts@@ -17,7 +17,7 @@ export class FunnelsInsight {private readonly conversionWindowSection: Locatorconstructor(private readonly page: Page) {- this.verticalChart = page.getByTestId('funnel-bar-vertical')+ this.verticalChart = page.getByTestId('funnel-steps-bar-chart')this.horizontalChart = page.getByTestId('funnel-bar-horizontal')this.chart = this.verticalChart.or(this.horizontalChart)this.histogram = page.getByTestId('funnel-histogram')@@ -138,4 +138,19 @@ export class FunnelsInsight {stepLegend(index: number): Locator {return this.stepLegends.nth(index)}++ // The steps chart renders its bars onto a canvas, so the tooltip is driven by+ // hovering the canvas rather than a per-bar DOM element. Retry the move until+ // the tooltip shows, mirroring ChartInsightBase.hoverChartAt.+ async hoverStepBars(): Promise<void> {+ const canvas = this.verticalChart.locator('canvas[role="img"]')+ await expect(canvas).toBeVisible()+ await expect(async () => {+ await canvas.scrollIntoViewIfNeeded()+ const box = (await canvas.boundingBox())!+ await this.page.mouse.move(box.x - 5, box.y - 5)+ await this.page.mouse.move(box.x + box.width * 0.25, box.y + box.height * 0.5)+ await expect(this.tooltip.first()).toBeVisible({ timeout: 1000 })+ }).toPass({ timeout: 15000 })+ }}diff --git a/playwright/page-models/insights/lifecycleInsight.ts b/playwright/page-models/insights/lifecycleInsight.tsindex 20a242072643..0dfe65c93827 100644--- a/playwright/page-models/insights/lifecycleInsight.ts+++ b/playwright/page-models/insights/lifecycleInsight.ts@@ -4,7 +4,7 @@ export class LifecycleInsight {readonly chart: Locatorconstructor(page: Page) {- this.chart = page.getByTestId('trend-line-graph')+ this.chart = page.getByTestId('trend-lifecycle-graph')}async waitForChart(): Promise<void> {diff --git a/products/product_analytics/frontend/insights/funnels/FunnelLineChart/FunnelLineChart.test.tsx b/products/product_analytics/frontend/insights/funnels/FunnelLineChart/FunnelLineChart.test.tsxindex 9a572dcd8e88..41b6e5a74db5 100644--- a/products/product_analytics/frontend/insights/funnels/FunnelLineChart/FunnelLineChart.test.tsx+++ b/products/product_analytics/frontend/insights/funnels/FunnelLineChart/FunnelLineChart.test.tsx@@ -4,8 +4,6 @@ import { cleanup, configure, screen, waitFor } from '@testing-library/react'import { ensureJsdom, waitForHogChartTooltip } from '@posthog/quill-charts/testing'-import { FEATURE_FLAGS } from 'lib/constants'-import { buildFunnelsQuery, chart, getHogChart, personsModal, renderInsight } from '~/test/insight-testing'import { buildAnnotation } from '~/test/insight-testing/test-data'import { AnnotationScope } from '~/types'@@ -21,12 +19,10 @@ afterEach(() => {cleanup()})-const HOG_CHARTS_FUNNEL_FLAG = { [FEATURE_FLAGS.PRODUCT_ANALYTICS_HOG_CHARTS_FUNNEL]: true }-describe('FunnelLineChart', () => {describe('series rendering', () => {it('renders a single conversion series with percentage values in the tooltip', async () => {- renderInsight({ query: buildFunnelsQuery(), featureFlags: HOG_CHARTS_FUNNEL_FLAG })+ renderInsight({ query: buildFunnelsQuery() })const tooltip = await chart.hoverTooltip(2)@@ -40,7 +36,6 @@ describe('FunnelLineChart', () => {query: buildFunnelsQuery({breakdownFilter: { breakdown: 'hedgehog', breakdown_type: 'event' },}),- featureFlags: HOG_CHARTS_FUNNEL_FLAG,})await waitFor(() => {@@ -53,7 +48,6 @@ describe('FunnelLineChart', () => {query: buildFunnelsQuery({breakdownFilter: { breakdown: 'hedgehog', breakdown_type: 'event' },}),- featureFlags: HOG_CHARTS_FUNNEL_FLAG,})await chart.clickAtIndex(2)@@ -67,7 +61,6 @@ describe('FunnelLineChart', () => {query: buildFunnelsQuery({breakdownFilter: { breakdown: 'hedgehog', breakdown_type: 'event' },}),- featureFlags: HOG_CHARTS_FUNNEL_FLAG,})const tooltip = await chart.hoverTooltip(2)@@ -90,7 +83,6 @@ describe('FunnelLineChart', () => {query: buildFunnelsQuery({breakdownFilter: { breakdown: 'browser', breakdown_type: 'event' },}),- featureFlags: HOG_CHARTS_FUNNEL_FLAG,})const tooltip = await chart.hoverTooltip(2)@@ -115,7 +107,6 @@ describe('FunnelLineChart', () => {breakdownFilter: { breakdown: 'hedgehog', breakdown_type: 'event' },compareFilter: { compare: true },}),- featureFlags: HOG_CHARTS_FUNNEL_FLAG,})const tooltip = await chart.hoverTooltip(2)@@ -133,7 +124,7 @@ describe('FunnelLineChart', () => {describe('click → persons modal', () => {it('opens the persons modal with the day-scoped actors for a single-series chart', async () => {- renderInsight({ query: buildFunnelsQuery(), featureFlags: HOG_CHARTS_FUNNEL_FLAG })+ renderInsight({ query: buildFunnelsQuery() })await chart.clickAtIndex(2)@@ -148,7 +139,6 @@ describe('FunnelLineChart', () => {query: buildFunnelsQuery({breakdownFilter: { breakdown: 'hedgehog', breakdown_type: 'event' },}),- featureFlags: HOG_CHARTS_FUNNEL_FLAG,})await chart.clickAtIndex(2)@@ -164,7 +154,6 @@ describe('FunnelLineChart', () => {it('renders percentage value labels when showValuesOnSeries is enabled', async () => {renderInsight({query: buildFunnelsQuery({ funnelsFilter: { showValuesOnSeries: true } }),- featureFlags: HOG_CHARTS_FUNNEL_FLAG,})await screen.findByRole('img', { name: /chart with/i })@@ -184,7 +173,6 @@ describe('FunnelLineChart', () => {query: buildFunnelsQuery({funnelsFilter: { goalLines: [{ label: 'Target', value: 30, displayIfCrossed: true }] },}),- featureFlags: HOG_CHARTS_FUNNEL_FLAG,})await screen.findByRole('img', { name: /chart with/i })@@ -207,7 +195,6 @@ describe('FunnelLineChart', () => {it('adds a trend-line overlay when showTrendLines is enabled', async () => {renderInsight({query: buildFunnelsQuery({ funnelsFilter: { showTrendLines: true, showValuesOnSeries: true } }),- featureFlags: HOG_CHARTS_FUNNEL_FLAG,})// main series + trend-line series = 2 rendered series@@ -230,7 +217,6 @@ describe('FunnelLineChart', () => {breakdownFilter: { breakdown: 'hedgehog', breakdown_type: 'event' },funnelsFilter: { showLegend: true },}),- featureFlags: HOG_CHARTS_FUNNEL_FLAG,})await screen.findByRole('img', { name: /chart with/i })@@ -258,7 +244,7 @@ describe('FunnelLineChart', () => {query: buildFunnelsQuery({ funnelsFilter: { showLegend: true } }),},])('omits the legend when $desc', async ({ query }) => {- renderInsight({ query, featureFlags: HOG_CHARTS_FUNNEL_FLAG })+ renderInsight({ query })await screen.findByRole('img', { name: /chart with/i })expect(screen.queryByTestId('funnel-line-legend')).not.toBeInTheDocument()@@ -270,7 +256,6 @@ describe('FunnelLineChart', () => {breakdownFilter: { breakdown: 'hedgehog', breakdown_type: 'event' },funnelsFilter: { showLegend: true },}),- featureFlags: HOG_CHARTS_FUNNEL_FLAG,})await screen.findByRole('img', { name: /chart with/i })@@ -292,7 +277,6 @@ describe('FunnelLineChart', () => {async ({ inSharedMode, expectsBadges }) => {renderInsight({query: buildFunnelsQuery(),- featureFlags: HOG_CHARTS_FUNNEL_FLAG,inSharedMode,mocks: {annotations: [diff --git a/products/product_analytics/frontend/insights/stickiness/StickinessBarChart/StickinessBarChart.test.tsx b/products/product_analytics/frontend/insights/stickiness/StickinessBarChart/StickinessBarChart.test.tsxindex 96de24ad1ffe..4a5c3ed3f325 100644--- a/products/product_analytics/frontend/insights/stickiness/StickinessBarChart/StickinessBarChart.test.tsx+++ b/products/product_analytics/frontend/insights/stickiness/StickinessBarChart/StickinessBarChart.test.tsx@@ -4,8 +4,6 @@ import { cleanup, configure, screen, waitFor } from '@testing-library/react'import { setupJsdom, setupSyncRaf } from '@posthog/quill-charts/testing'-import { FEATURE_FLAGS } from 'lib/constants'-import { NodeKind } from '~/queries/schema/schema-general'import { buildStickinessQuery, chart, getHogChart, personsModal, renderInsight } from '~/test/insight-testing'import { ChartDisplayType } from '~/types'@@ -27,7 +25,6 @@ afterEach(() => {cleanup()})-const HOG_CHARTS_FLAG = { [FEATURE_FLAGS.PRODUCT_ANALYTICS_HOG_CHARTS_STICKINESS]: true }const stickinessBar = (extra?: Parameters<typeof buildStickinessQuery>[0]): ReturnType<typeof buildStickinessQuery> =>buildStickinessQuery({ stickinessFilter: { display: ChartDisplayType.ActionsBar }, ...extra })@@ -38,7 +35,6 @@ describe('StickinessBarChart', () => {])('renders a $layout bar chart from a StickinessQuery', async ({ display }) => {renderInsight({query: stickinessBar({ stickinessFilter: { display } }),- featureFlags: HOG_CHARTS_FLAG,})await waitFor(@@ -57,7 +53,6 @@ describe('StickinessBarChart', () => {{ kind: NodeKind.EventsNode, event: 'Napped', name: 'Napped' },],}),- featureFlags: HOG_CHARTS_FLAG,})await waitFor(@@ -69,7 +64,7 @@ describe('StickinessBarChart', () => {})it('y-axis: renders percent ticks (legacy `${value.toFixed(1)}%` parity)', async () => {- renderInsight({ query: stickinessBar(), featureFlags: HOG_CHARTS_FLAG })+ renderInsight({ query: stickinessBar() })await screen.findByRole('img', { name: /chart with/i })await waitFor(() => {@@ -80,7 +75,7 @@ describe('StickinessBarChart', () => {})it('tooltip: percent value + "stickiness on {interval} {day}" title (not a calendar date)', async () => {- renderInsight({ query: stickinessBar(), featureFlags: HOG_CHARTS_FLAG })+ renderInsight({ query: stickinessBar() })const tooltip = await chart.hoverTooltip(2)// Days are 1-indexed in the mock, so bucket 2 == day 3.@@ -95,7 +90,6 @@ describe('StickinessBarChart', () => {query: stickinessBar({series: [{ kind: NodeKind.EventsNode, event: 'NoActivity', name: 'NoActivity' }],}),- featureFlags: HOG_CHARTS_FLAG,})await waitFor(@@ -108,7 +102,7 @@ describe('StickinessBarChart', () => {})it('click → persons modal: opens with a "stickiness on {interval} {day}" title', async () => {- renderInsight({ query: stickinessBar(), featureFlags: HOG_CHARTS_FLAG })+ renderInsight({ query: stickinessBar() })await chart.clickAtIndex(2)@@ -127,7 +121,6 @@ describe('StickinessBarChart', () => {renderInsight({query: stickinessBar(),context: { onDataPointClick },- featureFlags: HOG_CHARTS_FLAG,})await chart.clickAtIndex(2)diff --git a/products/product_analytics/frontend/insights/stickiness/StickinessLineChart/StickinessLineChart.test.tsx b/products/product_analytics/frontend/insights/stickiness/StickinessLineChart/StickinessLineChart.test.tsxindex 36176ffefd8b..1b4429c22547 100644--- a/products/product_analytics/frontend/insights/stickiness/StickinessLineChart/StickinessLineChart.test.tsx+++ b/products/product_analytics/frontend/insights/stickiness/StickinessLineChart/StickinessLineChart.test.tsx@@ -4,8 +4,6 @@ import { cleanup, configure, screen, waitFor } from '@testing-library/react'import { setupJsdom, setupSyncRaf } from '@posthog/quill-charts/testing'-import { FEATURE_FLAGS } from 'lib/constants'-import { NodeKind } from '~/queries/schema/schema-general'import { buildStickinessQuery, chart, getHogChart, personsModal, renderInsight } from '~/test/insight-testing'@@ -29,12 +27,10 @@ afterEach(() => {cleanup()})-const HOG_CHARTS_FLAG = { [FEATURE_FLAGS.PRODUCT_ANALYTICS_HOG_CHARTS_STICKINESS]: true }-describe('StickinessLineChart', () => {describe('renders', () => {it('renders the chart from a StickinessQuery with one series', async () => {- renderInsight({ query: buildStickinessQuery(), featureFlags: HOG_CHARTS_FLAG })+ renderInsight({ query: buildStickinessQuery() })await screen.findByRole('img', { name: /chart with 1 data series/i })})@@ -42,7 +38,7 @@ describe('StickinessLineChart', () => {describe('y-axis', () => {it('renders percent ticks (legacy `${value.toFixed(1)}%` parity)', async () => {- renderInsight({ query: buildStickinessQuery(), featureFlags: HOG_CHARTS_FLAG })+ renderInsight({ query: buildStickinessQuery() })await screen.findByRole('img', { name: /chart with/i })await waitFor(() => {@@ -57,7 +53,7 @@ describe('StickinessLineChart', () => {describe('tooltips', () => {it('formats series values as percentages of the series total', async () => {- renderInsight({ query: buildStickinessQuery(), featureFlags: HOG_CHARTS_FLAG })+ renderInsight({ query: buildStickinessQuery() })const tooltip = await chart.hoverTooltip(2)// Pageview canned series is [45, 82, 134, 210, 95], total 566, so bucket 2 == 134/566 ≈ 23.7%.@@ -65,7 +61,7 @@ describe('StickinessLineChart', () => {})it('uses "stickiness on {interval} {day}" as the tooltip title (not a calendar date)', async () => {- renderInsight({ query: buildStickinessQuery(), featureFlags: HOG_CHARTS_FLAG })+ renderInsight({ query: buildStickinessQuery() })const tooltip = await chart.hoverTooltip(2)// Day at index 2 is 3 in the mock's 1-indexed stickiness days.@@ -81,7 +77,6 @@ describe('StickinessLineChart', () => {query: buildStickinessQuery({series: [{ kind: NodeKind.EventsNode, event: 'NoActivity', name: 'NoActivity' }],}),- featureFlags: HOG_CHARTS_FLAG,})await waitFor(() => {@@ -93,7 +88,7 @@ describe('StickinessLineChart', () => {describe('click → persons modal', () => {it('opens the modal with a "stickiness on {interval} {day}" title', async () => {- renderInsight({ query: buildStickinessQuery(), featureFlags: HOG_CHARTS_FLAG })+ renderInsight({ query: buildStickinessQuery() })await chart.clickAtIndex(2)@@ -110,7 +105,6 @@ describe('StickinessLineChart', () => {renderInsight({query: buildStickinessQuery(),context: { onDataPointClick },- featureFlags: HOG_CHARTS_FLAG,})await chart.clickAtIndex(2)diff --git a/products/product_analytics/frontend/insights/trends/TrendsBarChart/TrendsBarChart.test.tsx b/products/product_analytics/frontend/insights/trends/TrendsBarChart/TrendsBarChart.test.tsxindex dab290a12f06..7ce020403a9f 100644--- a/products/product_analytics/frontend/insights/trends/TrendsBarChart/TrendsBarChart.test.tsx+++ b/products/product_analytics/frontend/insights/trends/TrendsBarChart/TrendsBarChart.test.tsx@@ -4,8 +4,6 @@ import { cleanup, fireEvent, screen, waitFor } from '@testing-library/react'import { dimensions, setupJsdom, setupSyncRaf } from '@posthog/quill-charts/testing'-import { FEATURE_FLAGS } from 'lib/constants'-import { NodeKind } from '~/queries/schema/schema-general'import { buildTrendsQuery, chart, getHogChart, personsModal, renderInsight } from '~/test/insight-testing'import { buildAnnotation } from '~/test/insight-testing/test-data'@@ -26,9 +24,6 @@ afterEach(() => {cleanup()})-const HOG_CHARTS_FLAG = {- [FEATURE_FLAGS.PRODUCT_ANALYTICS_HOG_CHARTS_TRENDS]: true,-}const trendsBar = (extra?: Parameters<typeof buildTrendsQuery>[0]): ReturnType<typeof buildTrendsQuery> =>buildTrendsQuery({trendsFilter: { display: ChartDisplayType.ActionsBar },@@ -60,7 +55,7 @@ describe('TrendsBarChart (ActionsBar)', () => {expected: 5,},])('renders $name', async ({ query, expected }) => {- renderInsight({ query, featureFlags: HOG_CHARTS_FLAG })+ renderInsight({ query })await waitFor(() => {@@ -75,7 +70,7 @@ describe('TrendsBarChart (ActionsBar)', () => {})it('shows the series value in the tooltip on hover', async () => {- renderInsight({ query: trendsBar(), featureFlags: HOG_CHARTS_FLAG })+ renderInsight({ query: trendsBar() })await screen.findByRole('img', { name: /chart with/i }, { timeout: 5000 })const tooltip = await chart.hoverTooltip(2)@@ -100,7 +95,6 @@ describe('TrendsBarChart (ActionsBar)', () => {},],}),- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with/i }, { timeout: 5000 })@@ -112,7 +106,7 @@ describe('TrendsBarChart (ActionsBar)', () => {})it('shows a date header in the tooltip', async () => {- renderInsight({ query: trendsBar(), featureFlags: HOG_CHARTS_FLAG })+ renderInsight({ query: trendsBar() })await screen.findByRole('img', { name: /chart with/i }, { timeout: 5000 })const tooltip = await chart.hoverTooltip(2)@@ -120,7 +114,7 @@ describe('TrendsBarChart (ActionsBar)', () => {})it('opens the persons modal on click for a single series', async () => {- renderInsight({ query: trendsBar(), featureFlags: HOG_CHARTS_FLAG })+ renderInsight({ query: trendsBar() })await screen.findByRole('img', { name: /chart with/i }, { timeout: 5000 })await chart.clickAtIndex(2)@@ -145,7 +139,6 @@ describe('TrendsBarChart (ActionsBar)', () => {},],}),- featureFlags: HOG_CHARTS_FLAG,})await waitFor(@@ -160,7 +153,6 @@ describe('TrendsBarChart (ActionsBar)', () => {it('shows current and previous period rows in compare mode', async () => {renderInsight({query: trendsBar({ compareFilter: { compare: true } }),- featureFlags: HOG_CHARTS_FLAG,})await waitFor(@@ -200,7 +192,6 @@ describe('TrendsBarChart (ActionsBar)', () => {showPercentStackView: true,},}),- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with/i }, { timeout: 5000 })@@ -220,7 +211,6 @@ describe('TrendsBarChart (ActionsBarValue)', () => {it('renders without crashing for a single event', async () => {renderInsight({query: aggregatedBar(),- featureFlags: HOG_CHARTS_FLAG,})await waitFor(@@ -240,7 +230,6 @@ describe('TrendsBarChart (ActionsBarValue)', () => {yAxisLabel: 'Series',},}),- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with/i }, { timeout: 5000 })@@ -268,7 +257,6 @@ describe('TrendsBarChart (ActionsBarValue)', () => {breakdown_type: 'event',},}),- featureFlags: HOG_CHARTS_FLAG,})// Five hedgehog breakdowns → one series carrying five per-bar colors across five bands.@@ -290,7 +278,6 @@ describe('TrendsBarChart (ActionsBarValue)', () => {breakdownFilter: { breakdown: 'hedgehog', breakdown_type: 'event' },trendsFilter: { display: ChartDisplayType.ActionsBarValue, showValuesOnSeries: true },}),- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with 1 data series/i }, { timeout: 5000 })@@ -312,7 +299,6 @@ describe('TrendsBarChart (ActionsBarValue)', () => {series: [{ kind: NodeKind.EventsNode, event: 'Napped', name: 'Napped' }],breakdownFilter: { breakdown: 'hedgehog', breakdown_type: 'event' },}),- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with 1 data series/i }, { timeout: 5000 })@@ -333,7 +319,6 @@ describe('TrendsBarChart (ActionsBarValue)', () => {breakdownFilter: { breakdown: 'hedgehog', breakdown_type: 'event' },trendsFilter: { display: ChartDisplayType.ActionsBarValue, stackBreakdownValues: true },}),- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with 5 data series/i }, { timeout: 5000 })@@ -375,7 +360,6 @@ describe('TrendsBarChart (ActionsBarValue)', () => {breakdownFilter: { breakdown: 'hedgehog', breakdown_type: 'event' },}),embedded,- featureFlags: HOG_CHARTS_FLAG,mocks: {additionalMockResponses: [{ match: (q) => q.kind === NodeKind.TrendsQuery, response: manyBreakdowns }],},@@ -399,7 +383,6 @@ describe('TrendsBarChart (ActionsBarValue)', () => {it('omits the header from the tooltip', async () => {renderInsight({query: aggregatedBar(),- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with/i }, { timeout: 5000 })@@ -410,7 +393,6 @@ describe('TrendsBarChart (ActionsBarValue)', () => {it('opens the persons modal on click without resolving a day', async () => {renderInsight({query: aggregatedBar(),- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with/i }, { timeout: 5000 })@@ -429,7 +411,6 @@ describe('TrendsBarChart (ActionsBarValue)', () => {it('opens the persons modal on click in compare mode instead of pinning the tooltip', async () => {renderInsight({query: aggregatedBar({ compareFilter: { compare: true } }),- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with/i }, { timeout: 5000 })@@ -451,7 +432,6 @@ describe('TrendsBarChart (ActionsBarValue)', () => {renderInsight({query: aggregatedBar(),context: { onDataPointClick },- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with/i }, { timeout: 5000 })@@ -475,7 +455,6 @@ describe('TrendsBarChart (ActionsBarValue)', () => {series: [{ kind: NodeKind.EventsNode, event: 'Napped', name: 'Napped' }],breakdownFilter: { breakdown: 'hedgehog', breakdown_type: 'event' },}),- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with 1 data series/i }, { timeout: 5000 })@@ -505,7 +484,6 @@ describe('TrendsBarChart (ActionsBarValue)', () => {},],}),- featureFlags: HOG_CHARTS_FLAG,})await waitFor(@@ -525,7 +503,7 @@ describe('TrendsBarChart (ActionsUnstackedBar)', () => {})it('routes grouped bar insights through the hog-charts adapter', async () => {- renderInsight({ query: groupedBar(), featureFlags: HOG_CHARTS_FLAG })+ renderInsight({ query: groupedBar() })await waitFor(() => {@@ -551,7 +529,6 @@ describe('TrendsBarChart (ActionsUnstackedBar)', () => {},],}),- featureFlags: HOG_CHARTS_FLAG,})await waitFor(@@ -576,7 +553,6 @@ describe('TrendsBarChart overlays', () => {showValuesOnSeries: true,},}),- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with/i }, { timeout: 5000 })@@ -607,7 +583,6 @@ describe('TrendsBarChart overlays', () => {}),],},- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with/i }, { timeout: 5000 })@@ -646,7 +621,6 @@ describe('TrendsBarChart overlays', () => {goalLines: [{ label: 'Target', value, displayIfCrossed: true }],},}),- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with/i }, { timeout: 5000 })diff --git a/products/product_analytics/frontend/insights/trends/TrendsLifecycleChart/TrendsLifecycleChart.test.tsx b/products/product_analytics/frontend/insights/trends/TrendsLifecycleChart/TrendsLifecycleChart.test.tsxindex 3c326fa4f1ef..b72453dac3f2 100644--- a/products/product_analytics/frontend/insights/trends/TrendsLifecycleChart/TrendsLifecycleChart.test.tsx+++ b/products/product_analytics/frontend/insights/trends/TrendsLifecycleChart/TrendsLifecycleChart.test.tsx@@ -4,8 +4,6 @@ import { cleanup, screen, waitFor } from '@testing-library/react'import { setupJsdom, setupSyncRaf } from '@posthog/quill-charts/testing'-import { FEATURE_FLAGS } from 'lib/constants'-import { LifecycleQuery, LifecycleQueryResponse, NodeKind } from '~/queries/schema/schema-general'import { chart, type InsightQuery, type MockResponse, personsModal, renderInsight } from '~/test/insight-testing'@@ -24,8 +22,6 @@ afterEach(() => {cleanup()})-const HOG_CHARTS_FLAG = { [FEATURE_FLAGS.PRODUCT_ANALYTICS_HOG_CHARTS_LIFECYCLE]: true }-const LIFECYCLE_DAYS = ['2024-06-10', '2024-06-11', '2024-06-12', '2024-06-13', '2024-06-14']const LIFECYCLE_LABELS = ['10-Jun', '11-Jun', '12-Jun', '13-Jun', '14-Jun']@@ -66,7 +62,6 @@ describe('TrendsLifecycleChart', () => {it('renders a stacked bar series for each lifecycle status', async () => {renderInsight({query: buildLifecycleQuery() as unknown as InsightQuery,- featureFlags: HOG_CHARTS_FLAG,mocks: { additionalMockResponses: lifecycleMocks },})@@ -87,7 +82,6 @@ describe('TrendsLifecycleChart', () => {it('shows the shortened lifecycle status in the tooltip rows', async () => {renderInsight({query: buildLifecycleQuery() as unknown as InsightQuery,- featureFlags: HOG_CHARTS_FLAG,mocks: { additionalMockResponses: lifecycleMocks },})@@ -103,7 +97,6 @@ describe('TrendsLifecycleChart', () => {it('uses "Users" as the group type label in the tooltip', async () => {renderInsight({query: buildLifecycleQuery() as unknown as InsightQuery,- featureFlags: HOG_CHARTS_FLAG,mocks: { additionalMockResponses: lifecycleMocks },})@@ -115,7 +108,6 @@ describe('TrendsLifecycleChart', () => {it('renders InsightEmptyState when every series count is zero', async () => {renderInsight({query: buildLifecycleQuery() as unknown as InsightQuery,- featureFlags: HOG_CHARTS_FLAG,mocks: {additionalMockResponses: [{@@ -144,7 +136,6 @@ describe('TrendsLifecycleChart', () => {it('renders the legend items in the same order as the rendered series', async () => {renderInsight({query: buildLifecycleQuery({ lifecycleFilter: { showLegend: true } }) as unknown as InsightQuery,- featureFlags: HOG_CHARTS_FLAG,mocks: { additionalMockResponses: lifecycleMocks },})@@ -158,28 +149,10 @@ describe('TrendsLifecycleChart', () => {it('omits the legend when showLegend is not set', async () => {renderInsight({query: buildLifecycleQuery() as unknown as InsightQuery,- featureFlags: HOG_CHARTS_FLAG,mocks: { additionalMockResponses: lifecycleMocks },})await screen.findByTestId('trend-lifecycle-graph')expect(screen.queryByTestId('trend-lifecycle-legend')).not.toBeInTheDocument()})-- it('falls back to the legacy renderer when the flag is off', async () => {- renderInsight({- query: buildLifecycleQuery() as unknown as InsightQuery,- featureFlags: {},- mocks: { additionalMockResponses: lifecycleMocks },- })-- // Without the flag the hog-charts data-attr is never rendered; the Chart.js LineGraph- // renders a <canvas> instead.- await waitFor(- () => {- expect(screen.queryByTestId('trend-lifecycle-legend')).not.toBeInTheDocument()- },- { timeout: 5000 }- )- })})diff --git a/products/product_analytics/frontend/insights/trends/TrendsLineChart/TrendsLineChart.test.tsx b/products/product_analytics/frontend/insights/trends/TrendsLineChart/TrendsLineChart.test.tsxindex 754f93d750d0..15f70861aef0 100644--- a/products/product_analytics/frontend/insights/trends/TrendsLineChart/TrendsLineChart.test.tsx+++ b/products/product_analytics/frontend/insights/trends/TrendsLineChart/TrendsLineChart.test.tsx@@ -4,8 +4,6 @@ import { cleanup, configure, fireEvent, screen, waitFor } from '@testing-libraryimport { setupJsdom, setupSyncRaf } from '@posthog/quill-charts/testing'-import { FEATURE_FLAGS } from 'lib/constants'-import { NodeKind } from '~/queries/schema/schema-general'import {buildTrendsQuery,@@ -41,12 +39,10 @@ afterEach(() => {cleanup()})-const HOG_CHARTS_FLAG = { [FEATURE_FLAGS.PRODUCT_ANALYTICS_HOG_CHARTS_TRENDS]: true }-describe('TrendsLineChart', () => {describe('tooltips', () => {it('shows the series value and glyph for a single series', async () => {- renderInsight({ query: buildTrendsQuery(), featureFlags: HOG_CHARTS_FLAG })+ renderInsight({ query: buildTrendsQuery() })const tooltip = await chart.hoverTooltip(2)@@ -62,7 +58,6 @@ describe('TrendsLineChart', () => {{ kind: NodeKind.EventsNode, event: 'Napped', name: 'Napped' },],}),- featureFlags: HOG_CHARTS_FLAG,})const tooltip = await chart.hoverTooltip(2)@@ -86,7 +81,6 @@ describe('TrendsLineChart', () => {{ kind: NodeKind.EventsNode, event: 'NoActivity', name: 'NoActivity' },],}),- featureFlags: HOG_CHARTS_FLAG,})const tooltip = await chart.hoverTooltip(2)@@ -108,7 +102,6 @@ describe('TrendsLineChart', () => {series: [{ kind: NodeKind.EventsNode, event: 'Napped', name: 'Napped' }],breakdownFilter: { breakdown: 'hedgehog', breakdown_type: 'event' },}),- featureFlags: HOG_CHARTS_FLAG,})// Breakdown data produces multiple series, so the chart requires a@@ -126,7 +119,6 @@ describe('TrendsLineChart', () => {breakdownFilter: { breakdown: 'hedgehog', breakdown_type: 'event' },trendsFilter: { formula: 'A' },}),- featureFlags: HOG_CHARTS_FLAG,})await chart.clickAtIndex(2)@@ -142,7 +134,6 @@ describe('TrendsLineChart', () => {query: buildTrendsQuery({compareFilter: { compare: true },}),- featureFlags: HOG_CHARTS_FLAG,})await waitFor(() => {@@ -163,7 +154,6 @@ describe('TrendsLineChart', () => {context: {formatCompareLabel: (label) => (label === 'current' ? 'This week' : 'Last week'),},- featureFlags: HOG_CHARTS_FLAG,})await waitFor(() => {@@ -189,7 +179,6 @@ describe('TrendsLineChart', () => {showPercentStackView: true,},}),- featureFlags: HOG_CHARTS_FLAG,})const tooltip = await chart.hoverTooltip(2)@@ -206,7 +195,6 @@ describe('TrendsLineChart', () => {{ kind: NodeKind.EventsNode, event: 'Napped', name: 'Napped' },],}),- featureFlags: HOG_CHARTS_FLAG,})const tooltip = await chart.hoverTooltip(2)@@ -219,7 +207,6 @@ describe('TrendsLineChart', () => {query: buildTrendsQuery({series: [{ kind: NodeKind.EventsNode, event: 'ZeroCounts', name: 'ZeroCounts' }],}),- featureFlags: HOG_CHARTS_FLAG,})const tooltip = await chart.hoverTooltip(2)@@ -233,7 +220,6 @@ describe('TrendsLineChart', () => {query: buildTrendsQuery({series: [{ kind: NodeKind.EventsNode, event: 'Minimal', name: 'Minimal' }],}),- featureFlags: HOG_CHARTS_FLAG,})const tooltip = await chart.hoverTooltip(0)@@ -251,7 +237,6 @@ describe('TrendsLineChart', () => {movingAverageIntervals: 3,},}),- featureFlags: HOG_CHARTS_FLAG,})// One data series + one moving-average overlay = 2 rendered series.@@ -268,7 +253,6 @@ describe('TrendsLineChart', () => {movingAverageIntervals: 3,},}),- featureFlags: HOG_CHARTS_FLAG,})const tooltip = await chart.hoverTooltip(2)@@ -278,7 +262,7 @@ describe('TrendsLineChart', () => {})it('renders only the main series when disabled', async () => {- renderInsight({ query: buildTrendsQuery(), featureFlags: HOG_CHARTS_FLAG })+ renderInsight({ query: buildTrendsQuery() })await waitFor(() => {expect(screen.getByRole('img', { name: /chart with 1 data series/i })).toBeInTheDocument()@@ -299,7 +283,6 @@ describe('TrendsLineChart', () => {}),],},- featureFlags: HOG_CHARTS_FLAG,})await waitFor(() => {@@ -321,7 +304,6 @@ describe('TrendsLineChart', () => {],},inSharedMode: true,- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with/i })@@ -339,7 +321,6 @@ describe('TrendsLineChart', () => {],trendsFilter: { display: ChartDisplayType.ActionsAreaGraph },}),- featureFlags: HOG_CHARTS_FLAG,})await waitFor(() => {@@ -359,7 +340,6 @@ describe('TrendsLineChart', () => {showPercentStackView: true,},}),- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with/i })@@ -377,7 +357,6 @@ describe('TrendsLineChart', () => {it('shows the hovered day in the tooltip title row', async () => {renderInsight({query: buildTrendsQuery({ interval: 'day' }),- featureFlags: HOG_CHARTS_FLAG,})const tooltip = await chart.hoverTooltip(2)@@ -413,7 +392,6 @@ describe('TrendsLineChart', () => {series: [{ kind: NodeKind.EventsNode, event: 'Napped', name: 'Napped' }],breakdownFilter: { breakdown: 'hedgehog', breakdown_type: 'event' },}),- featureFlags: HOG_CHARTS_FLAG,})await chart.clickAtIndex(2)@@ -431,7 +409,6 @@ describe('TrendsLineChart', () => {it('does not render any alert overlay for an unsaved insight (insight.id is missing)', async () => {renderInsight({query: buildTrendsQuery(),- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with/i })@@ -450,7 +427,6 @@ describe('TrendsLineChart', () => {{ kind: NodeKind.EventsNode, event: 'Napped', name: 'Napped' },],}),- featureFlags: HOG_CHARTS_FLAG,})// Wait for both series before toggling.@@ -474,7 +450,6 @@ describe('TrendsLineChart', () => {],trendsFilter: { showValuesOnSeries: true, showTrendLines: true },}),- featureFlags: HOG_CHARTS_FLAG,})await waitFor(() => {@@ -517,7 +492,6 @@ describe('TrendsLineChart', () => {])('$name', async ({ trendsFilter, expectedX, expectedY }) => {renderInsight({query: buildTrendsQuery({ trendsFilter }),- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with/i })@@ -539,7 +513,6 @@ describe('TrendsLineChart', () => {],trendsFilter: enabled ? { showMultipleYAxes: true } : undefined,}),- featureFlags: HOG_CHARTS_FLAG,})await waitFor(() => {@@ -575,7 +548,6 @@ describe('TrendsLineChart', () => {])('$name', async ({ goalLines, expectedLabels }) => {renderInsight({query: buildTrendsQuery({ trendsFilter: { goalLines } }),- featureFlags: HOG_CHARTS_FLAG,})await screen.findByRole('img', { name: /chart with/i })@@ -593,7 +565,6 @@ describe('TrendsLineChart', () => {query: buildTrendsQuery({trendsFilter: { showValuesOnSeries: true },}),- featureFlags: HOG_CHARTS_FLAG,})await waitFor(() => {@@ -621,7 +592,6 @@ describe('TrendsLineChart', () => {showValuesOnSeries: true,},}),- featureFlags: HOG_CHARTS_FLAG,})await waitFor(() => {@@ -634,7 +604,7 @@ describe('TrendsLineChart', () => {})it('renders no labels when showValuesOnSeries is disabled', async () => {- renderInsight({ query: buildTrendsQuery(), featureFlags: HOG_CHARTS_FLAG })+ renderInsight({ query: buildTrendsQuery() })await screen.findByRole('img', { name: /chart with/i })expect(getHogChart().valueLabels()).toHaveLength(0)@@ -648,7 +618,6 @@ describe('TrendsLineChart', () => {series: [{ kind: NodeKind.EventsNode, event: 'ZeroCounts', name: 'ZeroCounts' }],trendsFilter: { yAxisScaleType: 'log10' },}),- featureFlags: HOG_CHARTS_FLAG,})await waitFor(() => {@@ -667,7 +636,6 @@ describe('TrendsLineChart', () => {query: buildTrendsQuery({trendsFilter: { showConfidenceIntervals: true, confidenceLevel: 95 },}),- featureFlags: HOG_CHARTS_FLAG,})})@@ -691,7 +659,6 @@ describe('TrendsLineChart', () => {query: buildTrendsQuery({trendsFilter: { showTrendLines: true },}),- featureFlags: HOG_CHARTS_FLAG,})})@@ -724,7 +691,6 @@ describe('TrendsLineChart', () => {movingAverageIntervals: 3,},}),- featureFlags: HOG_CHARTS_FLAG,})// main + raw trendline + moving avg + moving-avg trendline = 4 series.@@ -740,7 +706,6 @@ describe('TrendsLineChart', () => {query: buildTrendsQuery({series: [{ kind: NodeKind.EventsNode, event: 'NoActivity', name: 'NoActivity' }],}),- featureFlags: HOG_CHARTS_FLAG,})await waitFor(() => {@@ -755,7 +720,6 @@ describe('TrendsLineChart', () => {series: [{ kind: NodeKind.EventsNode, event: 'NoActivity', name: 'NoActivity' }],}),context: { emptyStateHeading: 'Nothing to see here, hedgehog' },- featureFlags: HOG_CHARTS_FLAG,})await waitFor(() => {@@ -766,7 +730,7 @@ describe('TrendsLineChart', () => {describe('click → persons modal', () => {it('single series: direct click shows the actors for the clicked day', async () => {- renderInsight({ query: buildTrendsQuery(), featureFlags: HOG_CHARTS_FLAG })+ renderInsight({ query: buildTrendsQuery() })await chart.clickAtIndex(2)@@ -782,7 +746,6 @@ describe('TrendsLineChart', () => {series: [{ kind: NodeKind.EventsNode, event: 'Napped', name: 'Napped' }],breakdownFilter: { breakdown: 'hedgehog', breakdown_type: 'event' },}),- featureFlags: HOG_CHARTS_FLAG,})await chart.clickAtIndex(2)@@ -801,7 +764,6 @@ describe('TrendsLineChart', () => {series: [{ kind: NodeKind.EventsNode, event: 'Napped', name: 'Napped' }],breakdownFilter: { breakdown: 'hedgehog', breakdown_type: 'event' },}),- featureFlags: HOG_CHARTS_FLAG,})await chart.clickAtIndex(2)@@ -817,7 +779,6 @@ describe('TrendsLineChart', () => {renderInsight({query: buildTrendsQuery(),context: { onDataPointClick },- featureFlags: HOG_CHARTS_FLAG,})await chart.clickAtIndex(2)@@ -839,7 +800,6 @@ describe('TrendsLineChart', () => {{ kind: NodeKind.EventsNode, event: 'Napped', name: 'Napped' },],}),- featureFlags: HOG_CHARTS_FLAG,})await chart.clickAtIndex(2)diff --git a/products/product_analytics/frontend/insights/trends/TrendsPieChart/TrendsPieChart.test.tsx b/products/product_analytics/frontend/insights/trends/TrendsPieChart/TrendsPieChart.test.tsxindex 7513a91b8fed..5fb25132dd1e 100644--- a/products/product_analytics/frontend/insights/trends/TrendsPieChart/TrendsPieChart.test.tsx+++ b/products/product_analytics/frontend/insights/trends/TrendsPieChart/TrendsPieChart.test.tsx@@ -4,8 +4,6 @@ import { cleanup, screen, waitFor } from '@testing-library/react'import { setupJsdom, setupSyncRaf } from '@posthog/quill-charts/testing'-import { FEATURE_FLAGS } from 'lib/constants'-import { NodeKind } from '~/queries/schema/schema-general'import { buildTrendsQuery, personsModal, renderInsight } from '~/test/insight-testing'import { ChartDisplayType } from '~/types'@@ -25,10 +23,6 @@ afterEach(() => {cleanup()})-const HOG_CHARTS_FLAG = {- [FEATURE_FLAGS.PRODUCT_ANALYTICS_HOG_CHARTS_TRENDS]: true,-}-function sliceLabels(): string[] {return Array.from(document.querySelectorAll('[data-attr="hog-chart-pie-slice-label"]')).map((el) => el.textContent ?? ''@@ -58,7 +52,7 @@ describe('TrendsPieChart (ActionsPie)', () => {expectedLabels: ['57.9%', '21.1%', '10.5%', '10.5%'],},])('$name', async ({ query, expectedLabels }) => {- renderInsight({ query, featureFlags: HOG_CHARTS_FLAG })+ renderInsight({ query })await screen.findByRole('img', { name: /pie chart with/i }, { timeout: 5000 })await waitFor(diff --git a/products/product_analytics/frontend/insights/trends/TrendsPieChart/TrendsPieChart.tsx b/products/product_analytics/frontend/insights/trends/TrendsPieChart/TrendsPieChart.tsxindex e3641f38ef96..881d91cfa75b 100644--- a/products/product_analytics/frontend/insights/trends/TrendsPieChart/TrendsPieChart.tsx+++ b/products/product_analytics/frontend/insights/trends/TrendsPieChart/TrendsPieChart.tsx@@ -44,11 +44,7 @@ const handleChartError = (error: Error, info: ErrorInfo): void => {})}-export function TrendsPieChart({- context,- inSharedMode = false,- showPersonsModal = true,-}: TrendsPieChartProps): JSX.Element | null {+export function TrendsPieChart({ context, showPersonsModal = true }: TrendsPieChartProps): JSX.Element | null {const { isDarkModeOn } = useValues(themeLogic)// isDarkModeOn invalidates the memo so buildTheme() re-reads CSS vars on dark-mode toggle.const theme = useMemo(() => buildTheme(), [isDarkModeOn])@@ -239,7 +235,7 @@ export function TrendsPieChart({}return (- <div className={`flex flex-col w-full h-full ${inSharedMode ? 'ActionsPie--shared' : 'ActionsPie'}`}>+ <div className="flex flex-col w-full h-full"><PieChart<TrendsSeriesMeta>series={series}theme={theme}