# Visualize 연산자

## 개요

{% hint style="info" %}
The `시각화` 연산자는 Panther 버전 1.110부터 공개 베타 상태이며, 모든 고객이 사용할 수 있습니다. 아래에 나열된 [제한 사항](#limitations) 을(를) 특히 주의해 주시고, 버그 보고 및 기능 요청은 Panther 지원 팀에 공유해 주세요.
{% endhint %}

다음 `시각화` 연산자를 사용하여 쿼리 결과의 막대형, 선형, 원형 차트 또는 표를 생성합니다.

```kusto
| visualize <bar|line|pie|table> <annotation>=<expression>[, ...] 
```

다음을 사용할 수 있습니다 `시각화` 두 개의 필드를 가진 결과 집합에서 사용할 수 있으며, 그중 적어도 하나의 필드는 숫자형이어야 합니다. 특히 다음과 함께 사용하는 것이 유용합니다. `시각화` 를 [`요약`](/ko/pantherflow/operators/summarize.md) 및 다음과 같은 집계 함수 [`agg.count()`](https://docs.panther.com/ko/pantherflow/operators/pages/c558177b40b82223aa5247e48b550d9e8e0ee9b1#agg.count).  `시각화` 연산자는 PantherFlow 쿼리에서 마지막에 사용해야 하며, 데이터를 필터링하거나 변환하지 않습니다.

{% hint style="info" %}
시각화를 생성한 후에는 이를 [사용자 지정 대시보드](/ko/search/visualization-and-dashboards/custom.md).
{% endhint %}

기본적으로 `시각화` 는 세로 막대형 차트를 표시하지만, 다음을 사용할 수 있습니다. `선형`, `막대형`, `원형`, 또는 `표` 를 사용하여 유형을 설정할 수 있습니다. 다음을 사용하여 시각화를 추가로 사용자 지정할 수 있습니다. [지원되는 주석](#supported-annotations).

### 제한 사항

* 차트(`선형`, `막대형`, 그리고 `원형` 시각화)의 경우, `series=` 를 선언할 때 잘못된 열이 선택될 수 있으며, `xcolumn=`은(는) 그렇지 않거나 그 반대일 수 있습니다(`xcolumn=` 이지만 `series`)
* 가 아닌 경우). 세로 막대형 차트를 가로(왼쪽/오른쪽)로 이동하려면 세로(위/아래)로 스크롤해야 합니다.
* 최대 999개의 데이터 포인트를 시각화할 수 있습니다.
* 데이터는 정렬된 순서로 표시됩니다. 시계열 데이터의 경우 그래프에서 시간 순서로 보이게 하려면 데이터를 시간 기준으로 정렬해야 합니다.
* 막대 차트에서는 열이 알파벳 순으로 정렬되며 재배열할 수 없습니다.

## 지원되는 시각화 유형

* `막대형` (기본값): 범주형 데이터는 직사각형 막대로 표현됩니다.
* `선형`: 시간에 따른 추세를 보여주는 데 일반적으로 사용되며, 데이터 포인트는 직선으로 연결됩니다.
  * 다음을 생성하려면 `선형` 차트의 경우 x축에 표시되는 필드는 날짜/시간 데이터 형식이어야 합니다.
* `원형`: 데이터를 원형 차트의 조각으로 표시하며, 전체에 대한 비율과 부분을 보여주는 데 유용합니다.
  * 범주형 데이터에서 이 차트 유형을 사용하여 범주 간 상대적 크기 또는 백분율 분포를 시각화하세요.
* `표`: 데이터는 표 형식으로 표시됩니다.
  * 이는 이미 [검색](/ko/search/search-tool.md)에 표시된 결과 표와 유사하지만, `표` 를 사용하면 표 형식 데이터를 [사용자 지정 대시보드](/ko/search/visualization-and-dashboards/custom.md).

## 지원되는 주석

다음을 사용하여 주석을 추가할 수 있습니다. `시각화` 결과 시각화를 사용자 지정하세요. 여러 주석은 쉼표로 구분합니다. 예:

```kusto
| visualize bar legend=left, orientation=horizontal, title="My Chart"
```

{% hint style="info" %}
아래의 주석 중 어떤 것을 사용하려면, 쿼리에서도 시각화 유형을 명시적으로 설정해야 합니다 (`막대형`, `선형`, 또는 `원형`).
{% endhint %}

<table><thead><tr><th width="133.1796875">주석</th><th width="288.7109375">설명</th><th width="201.9119873046875">지원되는 시각화 유형</th><th width="176.8359375">지원되는 값</th><th width="143.1015625">예시</th></tr></thead><tbody><tr><td><code>title</code></td><td>차트의 제목입니다. 제공되지 않으면 기본값은 <code>&#x3C;x축 필드명> vs &#x3C;y축 필드명></code>입니다. 값에 공백이 포함된 경우 따옴표로 감싸야 합니다.</td><td><code>막대형</code>, <code>선형</code>, <code>원형</code>, <code>표</code></td><td><code>&#x3C;String></code></td><td><code>title="My Chart"</code></td></tr><tr><td><code>orientation</code></td><td>차트의 방향입니다. 만약 <code>xcolumn</code>, <code>ycolumn</code>, 또는 <code>series</code> 이 설정되어 있으면, 다음보다 우선될 수 있습니다 <code>orientation</code>.</td><td><code>막대형</code></td><td><code>vertical</code> (기본값)<br><code>horizontal</code></td><td><code>orientation=horizontal</code></td></tr><tr><td><code>legend</code></td><td><p>차트 범례의 존재 여부와 위치입니다.<br><br>기본값은 <code>숨김</code> 단일 시리즈 데이터의 경우 <code>하단</code> 다중 시리즈 데이터의 경우입니다.</p><p>범례를 숨기려면 다음을 사용하세요 <code>숨김</code>.</p></td><td><code>막대형</code>, <code>선형</code>, <code>원형</code></td><td><code>숨김</code> (단일 시리즈 데이터의 기본값)<br><code>표시</code> (기본값은 <code>하단</code>)<br><code>상단</code><br><code>하단</code> (다중 시리즈 데이터의 기본값)<br><code>왼쪽</code><br><code>오른쪽</code></td><td><code>legend=right</code></td></tr><tr><td><code>xcolumn</code></td><td>x축에 표시되어야 하는 필드의 이름입니다. (이는 x축 레이블이 아닙니다.)</td><td><code>막대형</code>, <code>선형</code></td><td><code>&#x3C;String></code></td><td><code>xcolumn=mean</code></td></tr><tr><td><code>ycolumn</code></td><td>y축에 표시되어야 하는 필드의 이름입니다. (이는 y축 레이블이 아닙니다.)</td><td><code>막대형</code>, <code>선형</code></td><td><code>&#x3C;String></code></td><td><code>ycolumn=detectionId</code></td></tr><tr><td><code>series</code></td><td><p>데이터를 그룹화하는 데 사용되어야 하는 필드의 이름입니다.<br><br>차트는 다음과 같을 수 있습니다:</p><ul><li>단일 시리즈: 다음에 대해 단일 선으로 표시됩니다 <code>선형</code> 차트와 다음에 대해 단일 색상으로 구성된 막대 <code>막대형</code> 차트</li><li>다중 시리즈: 각기 다른 색상의 여러 선으로 표시되며, 다음에 대해 <code>선형</code> 차트와 다음에 대해 여러 색상으로 구성된 막대 <code>막대형</code> 차트</li></ul><p>만약 <code>series</code> 가 제공되지 않으면, PantherFlow는 어떤 필드를 <code>series</code> 값으로 취급해야 하는지 추정합니다.</p></td><td><code>막대형</code>, <code>선형</code></td><td><code>&#x3C;String></code></td><td><code>series=email</code></td></tr></tbody></table>

## 예시

{% hint style="info" %}
예시 데이터

```kusto
let my_table = datatable [
  { "actionName": "SIGN_IN", "events": 12 },
  { "actionName": "CREATE_알러트_DESTINATION", "events": 2 },
  { "actionName": "CREATE_USER", "events": 4 },
  { "actionName": "CREATE_룰", "events": 10 }
];
```

{% endhint %}

### 기본 막대 차트

```kusto
my_table
| visualize
```

<figure><img src="/files/26c10ce2bd73cfe5950d2f40f46804d3d8300cd3" alt="A table with the title &#x22;actionName vs events&#x22; is shown, with four vertical columns."><figcaption></figcaption></figure>

### 막대 차트 with `legend`, `orientation`, 그리고 `title` set

```kusto
my_table
| visualize bar legend=left, orientation=horizontal, title="My Chart"
```

<figure><img src="/files/1afb5f55722b12302d960054135707e0354e2873" alt="A table titled &#x22;My Chart&#x22; with four horizontal columns are shown."><figcaption></figcaption></figure>

### 막대 차트 with `agg.count()`

이 예제는 두 개보다 많은 필드가 있는 샘플 데이터를 사용합니다(대부분의 실제 데이터 세트와 같음). 쿼리는 `summarize events = agg.count() by actionName` 를 사용하여 두 개의 필드(`actionName` 및 `events`)가 있는 결과 집합을 생성한 다음 `시각화` 이 사용됩니다. 집계에 대해 자세히 알아보려면 [PantherFlow Functions](/ko/pantherflow/functions.md#aggregations) 및 `요약` 의 [Summarize Operator](/ko/pantherflow/operators/summarize.md).

이 쿼리에는 고유한 예제 데이터가 있습니다:

{% hint style="info" %}
예시 데이터

```kusto
let panther_audit = datatable [
  { "actionName": "SIGN_IN", "id": "222ef2375b1bf394f687ea842065", "p_event_time": time.parse_timestamp("2024-11-14 00:00:00") },
  { "actionName": "CREATE_알러트_DESTINATION", "id": "320a3b11b854c5ceebb2d08420d99d09", "p_event_time": time.parse_timestamp("2024-10-16 00:00:00") },
  { "actionName": "CREATE_알러트_DESTINATION", "id": "86a6c88c5b39ede087d3e98420e022", "p_event_time": time.parse_timestamp("2024-11-04 00:00:00") },
  { "actionName": "CREATE_USER", "id": "5a0cbd047f5bf380c281d68420bec709", "p_event_time": time.parse_timestamp("2024-11-12 00:00:00") },
  { "actionName": "CREATE_USER", "id": "4b0d0f487a2ae459c3976f8420d1a810", "p_event_time": time.parse_timestamp("2024-11-11 00:00:00") },
  { "actionName": "CREATE_USER", "id": "7c1e1a59f6bcf4b6d5b83f8420baf911", "p_event_time": time.parse_timestamp("2024-10-27 00:00:00") },
  { "actionName": "CREATE_USER", "id": "9d2f2b60a7cdb58ff6a96f8420fa0b12", "p_event_time": time.parse_timestamp("2024-11-09 00:00:00") },
  { "actionName": "CREATE_룰", "id": "1e3f3c7189eec6c1e8ca7f8420e3c213", "p_event_time": time.parse_timestamp("2024-11-13 00:00:00") },
  { "actionName": "CREATE_룰", "id": "2f404d82aa1fe7d3f9d58f8420e5d314", "p_event_time": time.parse_timestamp("2024-10-31 00:00:00") },
  { "actionName": "CREATE_룰", "id": "603f5e93bb20f8e509e79f8420e7e415", "p_event_time": time.parse_timestamp("2024-11-03 00:00:00") }
];
```

{% endhint %}

```kusto
panther_audit
| summarize events = agg.count() by actionName
| sort actionName desc
| limit 4
| visualize
```

<figure><img src="/files/e063a834a3267c12080304a409aaa9fdd2455da3" alt="A table titled &#x22;actionName vs events&#x22; is shown with four vertical columns."><figcaption></figcaption></figure>

### 선 차트 with `title` set

이 쿼리에는 고유한 예제 데이터가 있습니다:

{% hint style="info" %}
예시 데이터

```kusto
let my_table = datatable [
  { "p_event_time": time.parse_timestamp("2024-08-14 00:00:00"), "events": 120 },
  { "p_event_time": time.parse_timestamp("2024-08-13 00:00:00"), "events": 20 },
  { "p_event_time": time.parse_timestamp("2024-08-12 00:00:00"), "events": 150 },
  { "p_event_time": time.parse_timestamp("2024-08-11 00:00:00"), "events": 200 },
  { "p_event_time": time.parse_timestamp("2024-08-10 00:00:00"), "events": 50 },
  { "p_event_time": time.parse_timestamp("2024-08-09 00:00:00"), "events": 80 },
  { "p_event_time": time.parse_timestamp("2024-08-08 00:00:00"), "events": 10 }
];
```

{% endhint %}

```kusto
my_table
| visualize line title="지난주의 이벤트"
```

<figure><img src="/files/97ad5b54a5ef386c62feddfb52197a3c833ef055" alt="A line chart titled &#x22;Last week&#x27;s events&#x22; is shown, with seven data points."><figcaption></figcaption></figure>

### 시간별 action count를 측정하는 선 차트

아래 쿼리는 [Panther Audit 로그의](/ko/data-onboarding/supported-logs/panther-audit-logs.md) 지난 이틀 동안 시간당 action count를 표시하며, 데이터를 시간 단위로 버킷팅합니다. 각 `actionName`.

{% hint style="info" %}
이 페이지의 다른 예제 쿼리와 달리, `datatable` 를 사용해 모의 데이터를 제공하는 대신, 아래 쿼리는 다음의 실시간 데이터에서 가져옵니다 `panther_logs` 데이터베이스.
{% endhint %}

```kusto
panther_logs.public.panther_audit
| where p_event_time >= time.ago(2d)
| summarize count = agg.count() by actionName, hour = time.trunc('hour', p_event_time)
| sort hour asc
| visualize line legend=bottom, title='시간별 작업 수'
```

<figure><img src="/files/af9740528a802affc45681d33799d56be0bc41ad" alt=""><figcaption></figcaption></figure>

### 하루당 detectionId별 경고 수를 측정하는 선 차트

아래 쿼리는 다음 기준으로 경고 수를 표시합니다 `detectionId` 지난 2주 동안 하루당.

{% hint style="info" %}
이 페이지의 다른 예제 쿼리와 달리, `datatable` 를 사용해 모의 데이터를 제공하는 대신, 아래 쿼리는 다음의 실시간 데이터에서 가져옵니다 `panther_signals` 데이터베이스.
{% endhint %}

```kusto
panther_signals.public.signal_알러트s
| where p_event_time >= time.ago(14d)
| summarize count = agg.count() by 디택션Id, hour = time.trunc('day', p_event_time)
| sort hour asc
| visualize line title="디택션Id별 하루당 알러트 수"
```

<figure><img src="/files/e687fca18ad4fb0ca7e06eabb42f2cf2f24d91db" alt=""><figcaption></figcaption></figure>

### 디택션까지의 평균 시간을 측정하는 막대 차트

아래 쿼리는 이벤트가 수집된 시점과 디택션이 트리거된 시점 사이의 평균 시간을, 가장 느린 15개 규칙에 대해 표시합니다. `detectionId`.

{% hint style="info" %}
이 페이지의 다른 예제 쿼리와 달리, `datatable` 를 사용해 모의 데이터를 제공하는 대신, 아래 쿼리는 다음의 실시간 데이터에서 가져옵니다 `panther_signals` 데이터베이스.
{% endhint %}

```kusto
panther_signals.public.signal_알러트s
| where p_event_time >= time.ago(7d) and ingestTimeToDetectionSeconds != null
| summarize mean = agg.avg(ingestTimeToDetectionSeconds) by 디택션Id
| 정렬 평균 내림차순
| 제한 15
| 시각화 막대 xcolumn=mean, ycolumn=detectionId, legend=right, orientation=horizontal, title='탐지까지의 평균 시간'
```

<figure><img src="/files/9e92b988532fcb3356809ae93a7e09757b53da84" alt=""><figcaption></figcaption></figure>

### 막대 차트 사용 `series`

이 쿼리에는 고유한 예제 데이터가 있습니다:

{% hint style="info" %}
예시 데이터:

```kusto
let my_table = datatable [  
  { "actionName": "SIGN_IN", "events": 12 , "user": "alice"},
  { "actionName": "SIGN_IN", "events": 7 , "user": "bob"},
  { "actionName": "SIGN_IN", "events": 4 , "user": "charlie"},
  { "actionName": "CREATE_알러트_DESTINATION", "events": 2, "user": "alice"},
  { "actionName": "CREATE_알러트_DESTINATION", "events": 3, "user": "chris"}
  { "actionName": "CREATE_알러트_DESTINATION", "events": 5, "user": "emily"},
  { "actionName": "CREATE_USER", "events": 1, "user": "alice" },
  { "actionName": "CREATE_USER", "events": 4 , "user": "frankie"},
  { "actionName": "CREATE_USER", "events": 3 , "user": "ross"},
  { "actionName": "CREATE_룰", "events": 12, "user": "betsy" },
  { "actionName": "CREATE_룰", "events": 6, "user": "bob" },
  { "actionName": "CREATE_룰", "events": 6, "user": "casey" }
];
```

{% endhint %}

```kusto
my_table
| 시각화 막대 시리즈=사용자
```

<figure><img src="/files/c6349518fd3fdc63d4adf94331fda8045f31ea6e" alt="Under an actionName vs events header is a bar chart. There are four vertical columns, and each column in separated into three colors."><figcaption></figcaption></figure>

### 도시, 국가별 로그인 수를 표시하는 막대 차트

{% hint style="info" %}
이 페이지의 다른 예제 쿼리와 달리, `datatable` 를 사용해 모의 데이터를 제공하는 대신, 아래 쿼리는 다음의 실시간 데이터에서 가져옵니다 `okta_systemlog` 데이터베이스.
{% endhint %}

```kusto
panther_logs.public.okta_systemlog
| where eventType == 'user.session.start' and p_event_time > time.ago(90d)
| extend country = client.geographicalContext.country, city = client.geographicalContext.city
| summarize events = agg.count() by country, city
| project country, events, city
| sort events desc
| limit 10
| visualize bar orientation=horizontal,title='도시, 국가별 로그인'
```

<figure><img src="/files/0b0139a9f174878f188c2e410a4eced4e9af9a0c" alt="A bar char is shown, titled &#x22;Logins by city, country.&#x22; There are four bars, labeled Atlanta, Maplewood, Athens, and Thessaloniki."><figcaption></figcaption></figure>

### 비례 데이터가 포함된 파이 차트 시각화

이 예시는 다양한 작업 유형의 분포를 비례 데이터로 표시합니다:

{% hint style="info" %}
예시 데이터

```kusto
let my_table = datatable [
  { "actionName": "SIGN_IN", "events": 12 },
  { "actionName": "CREATE_알러트_DESTINATION", "events": 2 },
  { "actionName": "CREATE_USER", "events": 4 },
  { "actionName": "CREATE_룰", "events": 10 }
];
```

{% endhint %}

```kusto
my_table
| visualize pie title="작업 분포"
```

<figure><img src="/files/71da63aed45c3141e05810d8f015248db434145b" alt="" width="563"><figcaption></figcaption></figure>

### 집계된 데이터가 있는 원형 차트

아래 쿼리는 지난 일주일 동안 유형별 Panther 감사 작업 분포를 표시합니다:

```kusto
panther_logs.public.panther_audit
| where p_event_time >= time.ago(7d)
| summarize events = agg.count() by actionName
| sort events desc
| limit 8
| visualize pie title="작업 유형 분포(최근 7일)"
```

<figure><img src="/files/0a859f40000c037b3667f89e926040495f79f46e" alt="" width="563"><figcaption></figcaption></figure>

### 와 함께하는 표 시각화 `title` set

이 쿼리에는 고유한 예제 데이터가 있습니다:

{% hint style="info" %}
예시 데이터:

```kusto
let my_table = datatable [  
  { "actionName": "SIGN_IN", "events": 12 , "user": "alice"},
  { "actionName": "SIGN_IN", "events": 7 , "user": "bob"},
  { "actionName": "SIGN_IN", "events": 4 , "user": "charlie"},
  { "actionName": "CREATE_알러트_DESTINATION", "events": 2, "user": "alice"},
  { "actionName": "CREATE_알러트_DESTINATION", "events": 3, "user": "chris"}
  { "actionName": "CREATE_알러트_DESTINATION", "events": 5, "user": "emily"},
  { "actionName": "CREATE_USER", "events": 1, "user": "alice" },
  { "actionName": "CREATE_USER", "events": 4 , "user": "frankie"},
  { "actionName": "CREATE_USER", "events": 3 , "user": "ross"},
  { "actionName": "CREATE_룰", "events": 12, "user": "betsy" },
  { "actionName": "CREATE_룰", "events": 6, "user": "bob" },
  { "actionName": "CREATE_룰", "events": 6, "user": "casey" }
];
```

{% endhint %}

```kusto
my_table
| visualize table title='사용자별 작업'
```

<figure><img src="/files/6070bf4ebf01e892c76dadaf583c17915e150019" alt="Under an &#x22;Actions by user&#x22; title is a table with three columns, labeled actionName, events, and user."><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.panther.com/ko/pantherflow/operators/visualize.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
