# Unable to switch from Line to Bar Chart

**URL:** <https://discourse.nodered.org/t/unable-to-switch-from-line-to-bar-chart/24863>\
**Category:** Dashboard\
**Created:** [15 April 2020 10:05 UTC](https://discourse.nodered.org/t/unable-to-switch-from-line-to-bar-chart/24863 "2020-04-15T10:05:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Birdy](https://avatars.discourse-cdn.com/v4/letter/b/85e7bf/32.png) [@Birdy](https://discourse.nodered.org/u/Birdy)\
**Post date:** [15 April 2020 10:05 UTC](https://discourse.nodered.org/t/unable-to-switch-from-line-to-bar-chart/24863/1 "2020-04-15T10:05:38Z")

</div>

Hi all,  
can you please help me to switch from Line- to Bar-Chart ?

I have two msg.Objects msg1 and msg2 with individual topic and payloads.  
If I insert them into a line-chart it works perfectly fine and I see two lines in the chart.  
If I change chart type from line to bar all I see is one big bar, showing the last transfered value only ☹

No matter what I try ... I am unable to feed the bar chart in a reasonable way ☹

BR  
Birdy

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [15 April 2020 10:56 UTC](https://discourse.nodered.org/t/unable-to-switch-from-line-to-bar-chart/24863/2 "2020-04-15T10:56:50Z")

</div>

Try this flow

```auto
[{"id":"5d7328fa.5f3d5","type":"inject","z":"fe3f6423.a3e4c","name":"","topic":"a","payload":"35","payloadType":"num","repeat":"2","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":320,"wires":[["f0f9f267.4975b8"]]},{"id":"9d677079.daed68","type":"inject","z":"fe3f6423.a3e4c","name":"","topic":"b","payload":"50","payloadType":"num","repeat":"2","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":400,"wires":[["f0f9f267.4975b8"]]},{"id":"891aa3ec.c15188","type":"ui_chart","z":"fe3f6423.a3e4c","name":"","group":"dd49e86.e03cc98","order":2,"width":0,"height":0,"label":"chart","chartType":"bar","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":530,"y":360,"wires":[[]]},{"id":"f0f9f267.4975b8","type":"random","z":"fe3f6423.a3e4c","name":"","low":"1","high":"20","inte":"true","property":"payload","x":340,"y":360,"wires":[["891aa3ec.c15188"]]},{"id":"dd49e86.e03cc98","type":"ui_group","z":"","name":"Default","tab":"a964f67f.642008","disp":true,"width":"6","collapse":false},{"id":"a964f67f.642008","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![Birdy](https://avatars.discourse-cdn.com/v4/letter/b/85e7bf/32.png) [@Birdy](https://discourse.nodered.org/u/Birdy)\
**Post date:** [15 April 2020 11:51 UTC](https://discourse.nodered.org/t/unable-to-switch-from-line-to-bar-chart/24863/3 "2020-04-15T11:51:33Z")

</div>

Oh, yes, this works perfectly fine ! Thanks a lot for your support !

---

<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 April 2020 11:51 UTC](https://discourse.nodered.org/t/unable-to-switch-from-line-to-bar-chart/24863/4 "2020-04-29T11:51:34Z")

</div>

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