# How to use query for vega custom chart

**URL:** <https://community.wandb.ai/t/how-to-use-query-for-vega-custom-chart/4606>\
**Category:** W&B Help\
**Tags:** wandb\
**Created:** [June 20, 2023, 3:28pm UTC](https://community.wandb.ai/t/how-to-use-query-for-vega-custom-chart/4606 "2023-06-20T15:28:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![erlebacher](https://avatars.discourse-cdn.com/v4/letter/e/bc8723/32.png) [@erlebacher](https://community.wandb.ai/u/erlebacher)\
**Post date:** [June 20, 2023, 3:29pm UTC](https://community.wandb.ai/t/how-to-use-query-for-vega-custom-chart/4606/1 "2023-06-20T15:29:00Z")

</div>

I have generated a run, which contains a range of panels, which is data logged every epoch (named `step` automatically in `wandb`). I am trying to create a custom line plot (vega or vega-lite). So I must perform a query to access all my logged summary data. Could you please explain in detail how this is done (from the wandb interface), or point me to a tutorial where this is clearly explain? I have not found a single document that explains this. Thanks.

Gordon

---

<div class="post-metadata">

**Author:** ![raphael-sanandres](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@raphael-sanandres](https://community.wandb.ai/u/raphael-sanandres)\
**Post date:** [June 23, 2023, 4:27pm UTC](https://community.wandb.ai/t/how-to-use-query-for-vega-custom-chart/4606/2 "2023-06-23T16:27:41Z")

</div>

Hello @erenbalatkan !

Before looking into how to graph the Custom Charts, I would recommend [looking at what types of data we support to be graphed in docs.](https://docs.wandb.ai/guides/app/features/custom-charts#log-data) Since I am unsure what exactly you were logging, it would be good to look there. Aside from that, here is our [Custom Charts Walkthrough](https://docs.wandb.ai/guides/app/features/custom-charts/walkthrough) which can show you step by step how to make a Custom Chart.

---

<div class="post-metadata">

**Author:** ![erlebacher](https://avatars.discourse-cdn.com/v4/letter/e/bc8723/32.png) [@erlebacher](https://community.wandb.ai/u/erlebacher)\
**Post date:** [June 27, 2023, 5:53pm UTC](https://community.wandb.ai/t/how-to-use-query-for-vega-custom-chart/4606/3 "2023-06-27T17:53:55Z")

</div>

I agree 100%! I started by studying the source code of Custom Charts (I like to know what is possible), and analyze other people’s codes. I am rarely satisfied with what is provided. So I came across strange uses of `datum` that seemed to be undocumented, and I also strange uses of `grouping`. I had already read most of the `Custom Charts Walkthrough` you refer to. If you understand the source code to the Line Plot Custom Chart, perhaps I can ask you more specific questions, @raphael-sanandres ! Thanks.

---

<div class="post-metadata">

**Author:** ![raphael-sanandres](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@raphael-sanandres](https://community.wandb.ai/u/raphael-sanandres)\
**Post date:** [June 27, 2023, 10:35pm UTC](https://community.wandb.ai/t/how-to-use-query-for-vega-custom-chart/4606/4 "2023-06-27T22:35:09Z")

</div>

I believe a better place for you to look into would be this [tutorial from Vega](https://observablehq.com/@vega/how-vega-works) and [Tutorials from them](https://vega.github.io/vega/tutorials/). From the `wandb` side, we convert table data (which is gathered from a GraphQL query and [documentation here)](https://docs.wandb.ai/guides/app/features/custom-charts#custom-visualizations). After that, the plots that are provided are Vega specs which the tutorial from Vega goes into detail about.

---

<div class="post-metadata">

**Author:** ![raphael-sanandres](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@raphael-sanandres](https://community.wandb.ai/u/raphael-sanandres)\
**Post date:** [June 30, 2023, 2:19pm UTC](https://community.wandb.ai/t/how-to-use-query-for-vega-custom-chart/4606/5 "2023-06-30T14:19:58Z")

</div>

Hi Gordon, since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/1X/366b649231631dbab896843020da0056074ac79d.png) [@system](https://community.wandb.ai/u/system)\
**Post date:** [August 26, 2023, 10:35pm UTC](https://community.wandb.ai/t/how-to-use-query-for-vega-custom-chart/4606/6 "2023-08-26T22:35:51Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
