# Creating a Chart with different domains

**URL:** <https://discourse.nodered.org/t/creating-a-chart-with-different-domains/83240>\
**Category:** Dashboard\
**Tags:** node-red-dashboard, chart\
**Created:** [28 November 2023 07:46 UTC](https://discourse.nodered.org/t/creating-a-chart-with-different-domains/83240 "2023-11-28T07:46:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vaibhavi27](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vaibhavi27/32/70897_2.png) [@Vaibhavi27](https://discourse.nodered.org/u/Vaibhavi27)\
**Post date:** [28 November 2023 07:46 UTC](https://discourse.nodered.org/t/creating-a-chart-with-different-domains/83240/1 "2023-11-28T07:46:24Z")

</div>

Hi,

I am looking for solution where I can create a line chart , audio waveforms on node-red defining x axis(voltage) and Y -axis(current).

Any ways that I can make use of dashboard board chart for this?

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [28 November 2023 07:56 UTC](https://discourse.nodered.org/t/creating-a-chart-with-different-domains/83240/2 "2023-11-28T07:56:41Z")

</div>

Couple of example's to explore

> [@Dashboard tips. ui\_chart with linear x-axis](https://discourse.nodered.org/t/dashboard-tips-ui-chart-with-linear-x-axis/40310):
>
> A little example about ui\_chart advanced configuration. Catch the Boson stuck_out_tongueboom [{"id":"1076704a.386908","type":"ui\_button","z":"7ee51301.a9185c","name":"","group":"c7a27394.057878","order":1,"width":1,"height":1,"passthru":false,"label":"GO","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"date","topic":"reset","x":190,"y":360,"wires":[["1c612e7d.432ac2"]]},{"id":"f84ec1a3.50318","type":"ui\_chart","z":"7ee51301.a9185c","name":"","group":…

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [28 November 2023 11:32 UTC](https://discourse.nodered.org/t/creating-a-chart-with-different-domains/83240/3 "2023-11-28T11:32:40Z")

</div>

Yes you can use non time series format  
e.g

```auto
[{
    "series": ["X"],
    "data": [[5,6,9,10] ],
    "labels": [24, 25, 23, 26]
}]

```

where labels is the voltages and data the current

more info here about formats, also in the help text [https://github.com/node-red/node-red-dashboard/blob/master/Charts.md](https://github.com/node-red/node-red-dashboard/blob/master/Charts.md)

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [28 November 2023 18:47 UTC](https://discourse.nodered.org/t/creating-a-chart-with-different-domains/83240/4 "2023-11-28T18:47:53Z")

</div>

Just to check:

You are displaying an audio wave on a chart and want `x` to be the voltage?

So the wave is vertical on the screen?

_Usually_ they are done horizontally.

Just checking.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [28 November 2023 20:44 UTC](https://discourse.nodered.org/t/creating-a-chart-with-different-domains/83240/5 "2023-11-28T20:44:25Z")

</div>

> [@Trying\_to\_learn](#):
>
> You are displaying an audio wave on a chart and want `x` to be the voltage?

It is charting current against voltage. The usual way of displaying that is to have volts on the x axis and current on the y, which is the stated requirement here.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [28 November 2023 20:48 UTC](https://discourse.nodered.org/t/creating-a-chart-with-different-domains/83240/6 "2023-11-28T20:48:12Z")

</div>

I was just checking.

---

<div class="post-metadata">

**Author:** ![Vaibhavi27](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vaibhavi27/32/70897_2.png) [@Vaibhavi27](https://discourse.nodered.org/u/Vaibhavi27)\
**Post date:** [29 November 2023 07:45 UTC](https://discourse.nodered.org/t/creating-a-chart-with-different-domains/83240/7 "2023-11-29T07:45:31Z")

</div>

Hi,

I am plotting voltage vs current waveform where I want to fetch real time data from serial input. plot the line chart. I am actually looking for a line where my real-time data is plotted on.

```auto
**[
    {
        "id": "c6d1832664c2174f",
        "type": "function",
        "z": "b1d2a17489d1cb3e",
        "name": "",
        "func": "var m={};\nm.labels = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\"];\nm.series = ['Series A', 'Series B', 'Series C'];\nreturn {payload:[m]};",
        "outputs": 1,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 300,
        "y": 600,
        "wires": [
            [
                "d7b0e6e47a33afbb"
            ]
        ]
    },
    {
        "id": "d7b0e6e47a33afbb",
        "type": "ui_chart",
        "z": "b1d2a17489d1cb3e",
        "name": "",
        "group": "89749fb7.87f01",
        "order": 1,
        "width": 0,
        "height": 0,
        "label": "line chart",
        "chartType": "line",
        "legend": "true",
        "xformat": "auto",
        "interpolate": "linear",
        "nodata": "No Data",
        "dot": false,
        "ymin": "",
        "ymax": "",
        "removeOlder": 1,
        "removeOlderPoints": "",
        "removeOlderUnit": "3600",
        "cutout": 0,
        "useOneColor": false,
        "useUTC": false,
        "colors": [
            "#1f77b4",
            "#aec7e8",
            "#ff7f0e",
            "#2ca02c",
            "#98df8a",
            "#d62728",
            "#ff9896",
            "#9467bd",
            "#c5b0d5"
        ],
        "outputs": 1,
        "useDifferentColor": false,
        "className": "",
        "x": 500,
        "y": 600,
        "wires": [
            []
        ]
    },
    {
        "id": "712902dc584e7d7e",
        "type": "ui_button",
        "z": "b1d2a17489d1cb3e",
        "name": "",
        "group": "ab397e95.29ebe",
        "order": 5,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "array",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "",
        "payloadType": "str",
        "topic": "",
        "topicType": "str",
        "x": 110,
        "y": 600,
        "wires": [
            [
                "c6d1832664c2174f"
            ]
        ]
    },
    {
        "id": "89749fb7.87f01",
        "type": "ui_group",
        "name": "Charts",
        "tab": "d7901f40.2659d",
        "order": 2,
        "disp": false,
        "width": "6"
    },
    {
        "id": "ab397e95.29ebe",
        "type": "ui_group",
        "name": "Inputs",
        "tab": "d7901f40.2659d",
        "order": 1,
        "disp": false,
        "width": "6"
    },
    {
        "id": "d7901f40.2659d",
        "type": "ui_tab",
        "name": "Charts",
        "icon": "dashboard",
        "order": 2
    }
]**

```

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [29 November 2023 07:55 UTC](https://discourse.nodered.org/t/creating-a-chart-with-different-domains/83240/8 "2023-11-29T07:55:09Z")

</div>

Slightly confused can you show an example of what the chart must look like, a sketch on a paper will do then post an image.  
Also examples of incoming messages would help.

---

<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:** [29 December 2023 07:55 UTC](https://discourse.nodered.org/t/creating-a-chart-with-different-domains/83240/9 "2023-12-29T07:55:31Z")

</div>

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