# Trying to fill between chart line

**URL:** <https://discourse.nodered.org/t/trying-to-fill-between-chart-line/63884>\
**Category:** General\
**Created:** [14 June 2022 00:24 UTC](https://discourse.nodered.org/t/trying-to-fill-between-chart-line/63884 "2022-06-14T00:24:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nmichael314](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nmichael314/32/63014_2.png) [@nmichael314](https://discourse.nodered.org/u/nmichael314)\
**Post date:** [14 June 2022 00:24 UTC](https://discourse.nodered.org/t/trying-to-fill-between-chart-line/63884/1 "2022-06-14T00:24:20Z")

</div>

I'm trying to fill the area between two lines on a chart. I'm preparing the msg for the chart like this:

```auto
msg.payload = [{
     "series": ["G50","G80"],
     "data":[
        [{"x": 1,"y": chartGain50[0]},{"x": 2,"y":chartGain50[1]},{"x":3,"y":chartGain50[2]},{"x":4,"y":chartGain50[3]},{"x":5,"y":chartGain50[4]}],
        [{"x": 1,"y": chartGain80[0]},{"x": 2,"y":chartGain80[1]},{"x":3,"y":chartGain80[2]},{"x":4,"y":chartGain80[3]},{"x":5,"y":chartGain80[4]}]],
     "labels":["G50","G80"]
}] 

msg.ui_control = {
    "options": {
        "elements":{
            "line":{
                "fill":2
            }
            
        }
    }
}

```

I tried using "2" for the fill option, but this fills all the way down to the origin instead of between the lines. I've seen that "fill" has a way to specify datasets, but I'm lost as far as how I'd do this using the chart node. I'm kind of new to node red. Any ideas?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [13 August 2022 00:24 UTC](https://discourse.nodered.org/t/trying-to-fill-between-chart-line/63884/2 "2022-08-13T00:24:59Z")

</div>

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