본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트41k · #6900

choosing-trend-or-slope-view

하는 일

이 스킬은 누군가 두 시점 사이에 무엇이 어떻게 바뀌었는지 물을 때 알맞은 차트를 고르도록 돕습니다. 질문에 맞는 차트를 원하는 사람을 위한 것입니다.

사용하는 경우

  • ✓두 날짜 사이에 무언가가 얼마나 늘었거나 줄었는지 물을 때.
  • ✓기간 전체에 걸친 지표 움직임(급증 포함)을 보고 싶을 때.
  • ✓많은 시리즈를 시작과 끝의 값으로 비교하고 싶을 때.

스킬 링크

https://github.com/PostHog/posthog/blob/master/products/product_analytics/skills/choosing-trend-or-slope-view/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/PostHog/posthog/blob/master/products/product_analytics/skills/choosing-trend-or-slope-view/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“1월부터 3월까지 가입이 얼마나 바뀌었나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

요청이 전체 경로 또는 시작과 끝만 뜻할 수 있으면, 스킬이 먼저 짧게 묻습니다. 두 차트는 같은 쿼리에서 나오며, 기울기 차트는 첫 점과 마지막 점만 유지합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Choosing a trend line vs a slope view

"How did X change between A and B?" is ambiguous. Two charts answer two different questions, so clarify before you build unless the user already named one:

  • Change over time (line) — the value at every interval across the range. Shows the path: dips, spikes, when it moved. This is the default trend.
  • Start vs end (slope) — only the first and last point, one line per series connecting them. Shows the net change and, across many series, which rose, which fell, and any rank flips — without the noise of the path between.

When the request could be either, ask a short either/or, e.g.:

Do you want to see how it moved across the whole period (a line chart), or just the change from the start to the end (a slope chart)?

If the user clearly wants one — "just tell me how much it grew start to end" → slope; "show me the trend / when did it spike" → line — skip the question and build it.

How to render each

Both come from the same TrendsQuery over the same date range — the slope is that series collapsed to its first and last point, not a different query.

Change over time → line

Default trends behavior. Create or run a TrendsQuery and leave trendsFilter.display as ActionsLineGraph (the default, "change over time"):

{
  "kind": "TrendsQuery",
  "series": [{ "kind": "EventsNode", "event": "$pageview", "math": "total" }],
  "dateRange": { "date_from": "2025-01-01", "date_to": "2025-03-31" },
  "trendsFilter": { "display": "ActionsLineGraph" }
}

Start vs end → slope

Run the trend with posthog:query-trends. The result card Max renders has a Line / Bar / Slope view toggle — switch it to Slope to show each series as a single line from its first to its last point, with the per-series change in the legend. Tell the user they can flip to the Slope view on the result.

The slope view is best for a clean before→after comparison, especially with several series/categories whose relative movement matters. Pick a date range whose two ends are the points you want compared (the slope uses the first and last interval).

Important limits

  • Two surfaces, one computation. Both the inline slope (Max's query-trends result card) and the saved-insight slope (ChartDisplayType.SlopeGraph) show the same thing: the first interval's value vs the last interval's value, at the chosen group-by interval. The grouping defines the slope - group by month to compare the first vs last month, by day for the first vs last day. Use the inline view for a quick before-and-after on a result you're already looking at; use the saved display to persist it on a dashboard. A still-accumulating final period is shown as-is with a dashed connector, the same affordance the line chart uses for an incomplete tail.
  • For period-over-period on a single series (this month vs last), a line with compareFilter: { "compare": true } overlays the two periods; a slope is the better fit when comparing the endpoints of many series at once.
자주 묻는 질문

두 차트는 다른 데이터를 쓰나요?

아니요. 둘 다 같은 날짜 범위의 같은 트렌드 쿼리에서 나오며, 기울기 차트는 첫 점과 마지막 점만 유지합니다.

이미 원하는 차트를 알고 있다면 어떻게 하나요?

하나를 분명히 요청하면, 스킬은 묻지 않고 그 차트를 만듭니다.

기울기 차트는 언제 더 좋은가요?

중간의 잡음 없이 순 변화와 많은 시리즈의 순위 변화를 보여 줄 때 더 좋습니다.

상세 정보

작성자의 원본 설명

Clarify how to visualize change over a time range before building a trend. Use whenever the user asks how much something changed, grew, dropped, improved, or regressed between two points or periods — "how much did X change from A to B", "before vs after", "start vs end", "week over week", "compare this month to last", "change over time" — or mentions a "slope chart" / "slopegraph". Two readings of "change" need different charts: the whole trend (a line, every interval) versus just the two endpoints (a slope, start vs end). Ask which they want, then render it. Not for choosing a saved insight C

repo: PostHog/posthog

인기도

GitHub 스타
41k
순위
#6900
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬