# Downsampling stream data in an Chart object

**URL:** <https://forum.inductiveautomation.com/t/downsampling-stream-data-in-an-chart-object/100899>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [January 14, 2025, 11:47pm UTC](https://forum.inductiveautomation.com/t/downsampling-stream-data-in-an-chart-object/100899 "2025-01-14T23:47:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sherman](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@sherman](https://forum.inductiveautomation.com/u/sherman)\
**Post date:** [January 14, 2025, 11:47pm UTC](https://forum.inductiveautomation.com/t/downsampling-stream-data-in-an-chart-object/100899/1 "2025-01-14T23:47:38Z")

</div>

I have a display issue with the chart in vision 8.1. I have a vector that is substantially longer than the number of pixels I have to display it, and I am concerned that we are missing some datapoints based on however the chart is doing its own downscaling, but I can't prove it.

To check / fix, I need to extract the actual chart size in pixels from the object so that I can downsample the input data appropriately. I can't seem to find anything better than `.width` on the main widget, which doesn't include anything about the margins or the actual width of the plot. Does anyone know how to get access to this information?

Thanks!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 14, 2025, 11:50pm UTC](https://forum.inductiveautomation.com/t/downsampling-stream-data-in-an-chart-object/100899/2 "2025-01-14T23:50:30Z")

</div>

Which chart component? And where is the data coming from?

(EasyChart **does** down-sample to actual pixels for historian pens. Use the Classic Chart and your own queries to avoid this.)

---

<div class="post-metadata">

**Author:** ![sherman](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@sherman](https://forum.inductiveautomation.com/u/sherman)\
**Post date:** [January 14, 2025, 11:53pm UTC](https://forum.inductiveautomation.com/t/downsampling-stream-data-in-an-chart-object/100899/3 "2025-01-14T23:53:35Z")

</div>

I am using "Chart", and the data is coming in over an OPCUA server and going through a tag change event script to unstripe it from a 1d vector into a 2d vector. I have over 2000 data points, but my entire HMI is not even that many pixels wide. I want to max downsample and I already have the code for that, my main issue is determining what the length of the downsampled vector needs to be.

This isn't historical data and I am not recording it using Ignition, so the available EasyChart historian pens are not available to me, unfortunately.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 15, 2025, 12:13am UTC](https://forum.inductiveautomation.com/t/downsampling-stream-data-in-an-chart-object/100899/4 "2025-01-15T00:13:51Z")

</div>

The Classic chart doesn't downsample at all, to the best of my knowledge.

---

<div class="post-metadata">

**Author:** ![sherman](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@sherman](https://forum.inductiveautomation.com/u/sherman)\
**Post date:** [January 15, 2025, 12:26am UTC](https://forum.inductiveautomation.com/t/downsampling-stream-data-in-an-chart-object/100899/5 "2025-01-15T00:26:03Z")

</div>

I didn't think so. So I need the plot width in pixels to do it myself
