:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(canvas): remove the recharts pie slice outline (#103863)
ruby childs8f8f45d2c21c
diff --git a/products/canvas/packages/canvas_builder/build.mjs b/products/canvas/packages/canvas_builder/build.mjsindex 646386820e8d..f8baf86e5b18 100644--- a/products/canvas/packages/canvas_builder/build.mjs+++ b/products/canvas/packages/canvas_builder/build.mjs@@ -238,6 +238,12 @@ const platformStylesheet = `@import "@posthog/quill/primitives.css";@import "@posthog/quill/tailwind.css";@custom-variant dark (&:where(.dark, .dark *));++/* Recharts hardcodes a white outline on every pie sector. It disappears into a light card and+ draws a white ring around every slice on a dark one. Canvas pie charts want no slice outline. */+.recharts-pie .recharts-sector {+ stroke: none;+}`// Entry references (module scripts, stylesheets) parsed attribute-order-diff --git a/products/canvas/skills/building-react-quill-canvases/SKILL.md b/products/canvas/skills/building-react-quill-canvases/SKILL.mdindex e09e95505ea2..cd99c8eb4621 100644--- a/products/canvas/skills/building-react-quill-canvases/SKILL.md+++ b/products/canvas/skills/building-react-quill-canvases/SKILL.md@@ -85,6 +85,9 @@ text-card-foreground`; borders `border-border`. Never a hardcoded hex or light-o`platform_token_redeclared`.- recharts strokes/fills use token CSS variables (`stroke="var(--primary)"`, grid/axes in`var(--border)`/`var(--muted-foreground)`).+- Some recharts defaults are hardcoded for a light theme and go wrong on a dark canvas. The+ platform stylesheet corrects them, so do not work around one in canvas code. Pie slice outlines+ are one: recharts strokes every sector white, and the stylesheet removes the outline.- Write Unicode glyphs (curly quotes, ellipsis, arrows, emoji) as literal characters in JSX —`\uXXXX` escapes render verbatim in JSX text.