# Create single data series from multiple fields of same data type

**URL:** <https://forum.bubble.io/t/create-single-data-series-from-multiple-fields-of-same-data-type/105163>\
**Category:** Database\
**Created:** [August 7, 2020, 2:47am UTC](https://forum.bubble.io/t/create-single-data-series-from-multiple-fields-of-same-data-type/105163 "2020-08-07T02:47:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stuart.leo](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@stuart.leo](https://forum.bubble.io/u/stuart.leo)\
**Post date:** [August 7, 2020, 2:47am UTC](https://forum.bubble.io/t/create-single-data-series-from-multiple-fields-of-same-data-type/105163/1 "2020-08-07T02:47:29Z")

</div>

Hi All

I’m struggling to create a single data series that consists of multiple fields values from a single data type to visualise data in apex chart.

I have created a survey that users complete, each question is answered 1 to 10.

Data type is called BEMA.  
Fields are number fields called BMA\_V\_1 and increase sequentially to 20.

I am trying to reflect the survey participants scores (1 to 10) for each question in a bar chart.

X axis labels left to right would be field name - BMA\_V\_1, BMA\_V\_2, BMA\_V\_3, etc…

Y axis labels would be numbers 1 to 10.

Users are members of accounts so need the user scores to roll up to account level.

App data is structured as

 ![Screen Shot 2020-08-07 at 12.42.54 pm](https://us1.discourse-cdn.com/bubble/original/3X/0/4/04ab84537b6f80c3bc92326292a6d0d8b25a2d1f.png)

Trying to achieve chart that looks like below:  
 ![Screen Shot 2020-08-07 at 12.45.43 pm](https://us1.discourse-cdn.com/bubble/original/3X/9/b/9bb27ab99e1435ffe4556398c49b7fc0a4242fad.png)

All and any help appreciated!

Thanks, Robbie

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [August 7, 2020, 3:36am UTC](https://forum.bubble.io/t/create-single-data-series-from-multiple-fields-of-same-data-type/105163/2 "2020-08-07T03:36:51Z")

</div>

You can create a state on the chart element with a list of number and use set state :plus item to add each field to a this state

---

<div class="post-metadata">

**Author:** ![stuart.leo](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@stuart.leo](https://forum.bubble.io/u/stuart.leo)\
**Post date:** [August 7, 2020, 4:04am UTC](https://forum.bubble.io/t/create-single-data-series-from-multiple-fields-of-same-data-type/105163/3 "2020-08-07T04:04:11Z")

</div>

Thanks @Jici.

I’m trying to set the state on the element as suggested but can’t quite get there.

I’ve got to here… is this right? whats the data source for the chart?  
 ![Screen Shot 2020-08-07 at 2.22.19 pm](https://us1.discourse-cdn.com/bubble/original/3X/c/d/cdf0f960d446acf69c89e67abad9ae3637502179.png)

Thanks, Robbie

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [August 7, 2020, 12:54pm UTC](https://forum.bubble.io/t/create-single-data-series-from-multiple-fields-of-same-data-type/105163/4 "2020-08-07T12:54:19Z")

</div>

The data source will be this state!

I guess that the data source request you a list of number. So it should work.

(In Apex bar chart from Thimo, this is how it work from what I know.
