# Can someone try this flow to see if the following plot is generated without the straight line

**URL:** <https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316>\
**Category:** Dashboard\
**Created:** [31 December 2020 11:39 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316 "2020-12-31T11:39:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Munier](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@Munier](https://discourse.nodered.org/u/Munier)\
**Post date:** [31 December 2020 11:39 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/1 "2020-12-31T11:39:59Z")

</div>

Here I am trying to trend two data vectors in a time series but it doesn't work in my node-red dashboard. I have communicated with someone who said otherwise. Can someone try it to see if the following plot is different:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/b/6bea47e6b756ac1069e48c14429d64162be3e441.png)

```auto
[{"id":"2874c9cd.0b97d6","type":"inject","z":"15b37612.f7127a","name":"","topic":"start","payload":"1","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":"0.5","x":590,"y":120,"wires":[["59c94d12.805294"]]},{"id":"4121e2e5.4e805c","type":"debug","z":"15b37612.f7127a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1070,"y":60,"wires":[]},{"id":"7a18d027.21869","type":"csv","z":"15b37612.f7127a","name":"","sep":",","hdrin":true,"hdrout":"","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":true,"x":770,"y":120,"wires":[["d096bbd7.8e9268"]]},{"id":"d096bbd7.8e9268","type":"function","z":"15b37612.f7127a","name":"split data","func":"var payload=msg.payload;\nvar a=[\"\"];\nfor(i=0;i<payload.length;i++)\n{\n\nif (payload[i].col1==\"u\" || payload[i].col1==\"y\")\na.push(payload[i]);\n\n}\nmsg.payload=a;\nreturn msg;","outputs":1,"noerr":0,"x":920,"y":120,"wires":[["98915264.a6487"]]},{"id":"98915264.a6487","type":"function","z":"15b37612.f7127a","name":"graph generate","func":"function toTimestamp(strDate){\n var datum = Date.parse(strDate);\n return datum/1000;\n }\nvar payload=msg.payload;\n//var t =toTimestamp('02/13/2009 23:31:30')\n\nvar Data= \"2020-08-8\".split(\"-\");\nData=Data[2]+\"/\"+Data[1]+\"/\"+Data[0];\nnode.log(Data);\nt =toTimestamp(Data+\" 14:30:00\");\nvar data_out=[];\nvar a1=[];\nvar a2=[];\nfor(let i=0;i<payload.length;i++)\n{\n \n\nif(payload[i].col1==\"u\")\n{\nvar timestamp=toTimestamp(t+\" \"+payload[i]);\nvar temp1={ \"x\": (payload[i].col2).replace(/ /g,''), \"y\":Number( payload[i].col3) };\na1.push(temp1);\n}\nif(payload[i].col1==\"y\")\n{\nvar timestamp=toTimestamp(t+\" \"+payload[i]);\nvar temp2={ \"x\": (payload[i].col2).replace(/ /g,''), \"y\":Number( payload[i].col3) };\na2.push(temp2);\n}\n\n}\n\ndata_out=[a1,a2];\nmsg.payload=[{\n\"series\": [\"outlet flow from vessel\",\"level % in vessel\",],\n\"data\":data_out,\n\"labels\": [\"\"]\n}];\nmsg.t=t;\nreturn msg;","outputs":1,"noerr":0,"x":1100,"y":120,"wires":[["4121e2e5.4e805c","3cf01acc.f49b66"]]},{"id":"59c94d12.805294","type":"file in","z":"15b37612.f7127a","name":"","filename":"C:\\IMPL\\SISOARXRegression\\sisoarxdata.csv","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":700,"y":60,"wires":[["7a18d027.21869"]]},{"id":"3cf01acc.f49b66","type":"ui_chart","z":"15b37612.f7127a","name":"","group":"5c626731.4aa6d8","order":0,"width":0,"height":0,"label":"chart","chartType":"line","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":1270,"y":120,"wires":[[]]},{"id":"5c626731.4aa6d8","type":"ui_group","z":"","name":"Digital PI Controllers","tab":"582ef43c.0a8acc","order":1,"disp":true,"width":"20","collapse":false},{"id":"582ef43c.0a8acc","type":"ui_tab","z":"","name":"Tuning Digital PI Controllers","icon":"dashboard","order":5,"disabled":false,"hidden":false}]type or paste code here

```

---

<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:** [31 December 2020 12:12 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/2 "2020-12-31T12:12:38Z")

</div>

You can see from the timestamps along the bottom that there is something wrong with the timestamps you are injecting. Show use what the data you are sending it looks like in a debug node. In particular look at the timestamps.

---

<div class="post-metadata">

**Author:** ![Munier](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@Munier](https://discourse.nodered.org/u/Munier)\
**Post date:** [31 December 2020 12:31 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/3 "2020-12-31T12:31:59Z")

</div>

Here I have x being the vector of 4320 data point that is replaced `t` as it is used in the function node `t =toTimestamp(Data+" 14:30:00");` also the return msg is `msg.t=t; return msg;`

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/1/312822654aaa121cf2c1d4065c45bfcc7acb7d93.png)

---

<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:** [31 December 2020 14:34 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/4 "2020-12-31T14:34:15Z")

</div>

All I can do is repeat exactly the answer I gave [the last time you asked about this](https://discourse.nodered.org/t/i-want-to-figure-out-how-to-plot-a-line-chart-without-the-characters-in-the-plot-below/37442/8), at which time you marked this answer as the solution.

> [@Colin](#):
>
> the problem is clear. You can see that the first item in the array has x as a string containing " 1" whereas it should be the timestamp either in javascript ticks (msec) or as an ISO date string.

---

<div class="post-metadata">

**Author:** ![Munier](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@Munier](https://discourse.nodered.org/u/Munier)\
**Post date:** [31 December 2020 15:25 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/5 "2020-12-31T15:25:15Z")

</div>

Colin,

I try to attach the csv file but it says "the file is too big (maximum size is 4096KB)."

I understand that you pointed where the issue is. As I explained above there was a communication with someone whose able of running the file with `

```auto
if(payload[i].col1=="u")
{
var temp1={ "x": (payload[i].col2).replace(/ /g,''), "y":Number( payload[i].col3) };
a1.push(temp1);
}
if(payload[i].col1=="y")
{
var temp2={ "x": (payload[i].col2).replace(/ /g,''), "y":Number( payload[i].col3) };
a2.push(temp2);
}

```

and that generates the following graph  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/6/462021a43de3892a1da245a18933dd00efca932d.png)

When I run the flow I get the first plot generated above.

I marked it as a solution because it highlights the issue.

Thank you.

---

<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:** [31 December 2020 15:52 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/6 "2020-12-31T15:52:41Z")

</div>

> [@Munier](#):
>
> I try to attach the csv file

Just post a few lines of the file. Paste it in using the `</>` button at the top of the forum entry window.

[Edit] The flow you posted earlier is not importable, it stops in the middle. Try that again.

---

<div class="post-metadata">

**Author:** ![Munier](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@Munier](https://discourse.nodered.org/u/Munier)\
**Post date:** [31 December 2020 21:02 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/7 "2020-12-31T21:02:12Z")

</div>

Sorry, but I had an internet issue.

```auto
!@rProfit_Value	@rPerformance1_Value	@rPerformance2_Value	@rPenalty_Value	@rTotal_Value
! 0.0000000000E+000	0.00E+00	0.00E+00	0.00E+00	0.00E+00
!@rProfit_Value	@rPerformance1_Value	@rPerformance2_Value	@rPenalty_Value	@rTotal_Value
 				
				
!sisoarxdatau.csv				
!u				
!sisoarxdatay.csv				
!y				
!sisoarxdataw1.csv				
!w1				
!sisoarxdataw2.csv				
!w2				
!sisoarxdataw3.csv				
!w3				
!sisoarxdataw4.csv				
!w4				
!sisoarxdataw5.csv				
!w5				
				
				
arx1	1	-8.57E-01		
arx1	2	0.00E+00		
arx1	3	0.00E+00		
arx1	4	1.00E+00		
arx1	5	-1.00E+05		
				
arx2	1	2.22E-01		
arx2	2	0.00E+00		
arx2	3	0.00E+00		
arx2	4	2.00E+00		
arx2	5	-1.00E+05		
				
arx3	1	3.17E-02		
arx3	2	0.00E+00		
arx3	3	0.00E+00		
arx3	4	3.00E+00		
arx3	5	-1.00E+05		
				
arx4	1	-5.82E-02		
arx4	2	0.00E+00		
arx4	3	0.00E+00		
arx4	4	4.00E+00		
arx4	5	-1.00E+05		
				
arx5	1	-1.04E-02		
arx5	2	0.00E+00		
arx5	3	0.00E+00		
arx5	4	5.00E+00		
arx5	5	-1.00E+05		
				
u	1	2.60E+01		
u	2	2.59E+01		
u	3	2.58E+01		
u	4	2.66E+01		
u	5	2.61E+01		
u	6	2.55E+01		
u	7	2.57E+01		
u	8	2.58E+01		
u	9	2.62E+01		
u	10	2.59E+01		
u	11	2.53E+01		
u	12	2.58E+01		
u	13	2.62E+01		
u	14	2.54E+01		
u	15	2.59E+01		
u	16	2.56E+01		
u	17	2.54E+01		
u	18	2.52E+01		
u	19	2.59E+01		
u	20	2.60E+01		
				
y	1	4.79E+01		
y	2	4.79E+01		
y	3	4.78E+01		
y	4	4.83E+01		
y	5	4.80E+01		
y	6	4.76E+01		
y	7	4.78E+01		
y	8	4.78E+01		
y	9	4.81E+01		
y	10	4.80E+01		
y	11	4.76E+01		
y	12	4.79E+01		
y	13	4.81E+01		
y	14	4.76E+01		
y	15	4.80E+01		
y	16	4.78E+01		
y	17	4.77E+01		
y	18	4.75E+01		
y	19	4.80E+01		
y	20	4.80E+01

```

---

<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:** [31 December 2020 22:06 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/8 "2020-12-31T22:06:25Z")

</div>

Can you explain what that means? I don't see the timestamps in there.

---

<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:** [1 January 2021 00:33 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/9 "2021-01-01T00:33:51Z")

</div>

(And.... please use the `</>` button as requested)

---

<div class="post-metadata">

**Author:** ![Munier](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@Munier](https://discourse.nodered.org/u/Munier)\
**Post date:** [1 January 2021 09:33 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/10 "2021-01-01T09:33:19Z")

</div>

You did ask me to post a few lines of the file. This is how the csv file looks like.

I am trying to plot u and y value with the 20 points (x) index being the timestamp

Here `t` is the timestamp

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/d/dda92dace72b38e4d23f14baf78fec961fcd33ec.png)

---

<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:** [1 January 2021 09:58 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/11 "2021-01-01T09:58:01Z")

</div>

> [@Munier](#):
>
> I am trying to plot u and y value with the 20 points (x) index being the timestamp

You say the u values are a timestamp, but they are just integer values 1, 2, 3 so what times do those values represent? Assuming, that is, that they do represent timestamps, which is a question I did ask previously, on the other thread, but you never replied as far as I know.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [1 January 2021 10:44 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/12 "2021-01-01T10:44:06Z")

</div>

Colin - as I understand it they want to plot both y and u values (as different topics) against the index in the array as a virtual timestamp. (ie number from 0 to 20). Nothing wrong with that - would be sensible to re-label the x axis format to be X to just show it as the epoch value to match.

---

<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:** [1 January 2021 11:00 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/13 "2021-01-01T11:00:03Z")

</div>

The split on csv node seems to work best on `Tab` then all values are returned as number.  
The functions has some sort of date, so figure this data wants to set with this date and each reading is a second apart. Just reading between the lines. Correct me if i am wrong.  
Try someting like this

```auto
[{"id":"12d42c43.79cc5c","type":"inject","z":"8d22ae29.7df6d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":2420,"wires":[["ea17cb4a.a90308"]]},{"id":"ea17cb4a.a90308","type":"template","z":"8d22ae29.7df6d","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"!@rProfit_Value\t@rPerformance1_Value\t@rPerformance2_Value\t@rPenalty_Value\t@rTotal_Value\n! 0.0000000000E+000\t0.00E+00\t0.00E+00\t0.00E+00\t0.00E+00\n!@rProfit_Value\t@rPerformance1_Value\t@rPerformance2_Value\t@rPenalty_Value\t@rTotal_Value\n \t\t\t\t\n\t\t\t\t\n!sisoarxdatau.csv\t\t\t\t\n!u\t\t\t\t\n!sisoarxdatay.csv\t\t\t\t\n!y\t\t\t\t\n!sisoarxdataw1.csv\t\t\t\t\n!w1\t\t\t\t\n!sisoarxdataw2.csv\t\t\t\t\n!w2\t\t\t\t\n!sisoarxdataw3.csv\t\t\t\t\n!w3\t\t\t\t\n!sisoarxdataw4.csv\t\t\t\t\n!w4\t\t\t\t\n!sisoarxdataw5.csv\t\t\t\t\n!w5\t\t\t\t\n\t\t\t\t\n\t\t\t\t\narx1\t1\t-8.57E-01\t\t\narx1\t2\t0.00E+00\t\t\narx1\t3\t0.00E+00\t\t\narx1\t4\t1.00E+00\t\t\narx1\t5\t-1.00E+05\t\t\n\t\t\t\t\narx2\t1\t2.22E-01\t\t\narx2\t2\t0.00E+00\t\t\narx2\t3\t0.00E+00\t\t\narx2\t4\t2.00E+00\t\t\narx2\t5\t-1.00E+05\t\t\n\t\t\t\t\narx3\t1\t3.17E-02\t\t\narx3\t2\t0.00E+00\t\t\narx3\t3\t0.00E+00\t\t\narx3\t4\t3.00E+00\t\t\narx3\t5\t-1.00E+05\t\t\n\t\t\t\t\narx4\t1\t-5.82E-02\t\t\narx4\t2\t0.00E+00\t\t\narx4\t3\t0.00E+00\t\t\narx4\t4\t4.00E+00\t\t\narx4\t5\t-1.00E+05\t\t\n\t\t\t\t\narx5\t1\t-1.04E-02\t\t\narx5\t2\t0.00E+00\t\t\narx5\t3\t0.00E+00\t\t\narx5\t4\t5.00E+00\t\t\narx5\t5\t-1.00E+05\t\t\n\t\t\t\t\nu\t1\t2.60E+01\t\t\nu\t2\t2.59E+01\t\t\nu\t3\t2.58E+01\t\t\nu\t4\t2.66E+01\t\t\nu\t5\t2.61E+01\t\t\nu\t6\t2.55E+01\t\t\nu\t7\t2.57E+01\t\t\nu\t8\t2.58E+01\t\t\nu\t9\t2.62E+01\t\t\nu\t10\t2.59E+01\t\t\nu\t11\t2.53E+01\t\t\nu\t12\t2.58E+01\t\t\nu\t13\t2.62E+01\t\t\nu\t14\t2.54E+01\t\t\nu\t15\t2.59E+01\t\t\nu\t16\t2.56E+01\t\t\nu\t17\t2.54E+01\t\t\nu\t18\t2.52E+01\t\t\nu\t19\t2.59E+01\t\t\nu\t20\t2.60E+01\n\t\t\t\t\ny\t1\t4.79E+01\t\t\ny\t2\t4.79E+01\t\t\ny\t3\t4.78E+01\t\t\ny\t4\t4.83E+01\t\t\ny\t5\t4.80E+01\t\t\ny\t6\t4.76E+01\t\t\ny\t7\t4.78E+01\t\t\ny\t8\t4.78E+01\t\t\ny\t9\t4.81E+01\t\t\ny\t10\t4.80E+01\t\t\ny\t11\t4.76E+01\t\t\ny\t12\t4.79E+01\t\t\ny\t13\t4.81E+01\t\t\ny\t14\t4.76E+01\t\t\ny\t15\t4.80E+01\t\t\ny\t16\t4.78E+01\t\t\ny\t17\t4.77E+01\t\t\ny\t18\t4.75E+01\t\t\ny\t19\t4.80E+01\t\t\ny\t20\t4.80E+01","output":"str","x":170,"y":2460,"wires":[["e63478d3.780968"]]},{"id":"e63478d3.780968","type":"csv","z":"8d22ae29.7df6d","name":"","sep":"\\t","hdrin":"","hdrout":"none","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":310,"y":2440,"wires":[["804ea78.ebb4b58"]]},{"id":"804ea78.ebb4b58","type":"function","z":"8d22ae29.7df6d","name":"","func":"var payload=msg.payload;\nvar a1=[];\nvar a2=[];\nt =new Date(\"2020-12-25T14:30:00\").valueOf();\nfor(let i=0;i<payload.length;i++){\n if (payload[i].col1==\"u\" || payload[i].col1==\"y\"){\n if(payload[i].col1==\"u\"){\n var temp1={ \"x\": t + (payload[i].col2)*1000, \"y\": payload[i].col3};\n a1.push(temp1);\n }\n if(payload[i].col1==\"y\"){\n var temp2={ \"x\": t + (payload[i].col2)*1000, \"y\":payload[i].col3 };\n a2.push(temp2);\n }\n }\n}\nmsg.payload=[{\n\"series\": [\"outlet flow from vessel\",\"level % in vessel\",],\n\"data\":[a1,a2],\n\"labels\": [\"\"]\n}];\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":440,"y":2440,"wires":[["5e3b51e0.76c8d8","299d29e9.317e16"]]},{"id":"5e3b51e0.76c8d8","type":"debug","z":"8d22ae29.7df6d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":610,"y":2500,"wires":[]},{"id":"299d29e9.317e16","type":"ui_chart","z":"8d22ae29.7df6d","name":"","group":"165e1e1a.e752fa","order":6,"width":0,"height":0,"label":"chart","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","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,"x":610,"y":2440,"wires":[[]]},{"id":"165e1e1a.e752fa","type":"ui_group","z":"","name":"Default","tab":"f9b58883.fa613","order":1,"disp":true,"width":"12","collapse":false},{"id":"f9b58883.fa613","type":"ui_tab","z":"","name":"Home","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![Munier](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@Munier](https://discourse.nodered.org/u/Munier)\
**Post date:** [1 January 2021 13:47 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/14 "2021-01-01T13:47:19Z")

</div>

@E1cid,

The flow works fine with the template node and shows exactly the same trend I am trying to obtain when all of the data in the csv file are pasted in the template as below.  
Uploading: image.png...

Why does it not read a file-in node?

---

<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:** [1 January 2021 14:03 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/15 "2021-01-01T14:03:31Z")

</div>

No image loaded.

Not sure, what operating system are you using?  
Can you zip csv and upload ? or provide link to cloud drive.  
[edit]  
Is "first row contains column names" checked in the csv node, if so uncheck.

---

<div class="post-metadata">

**Author:** ![Munier](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@Munier](https://discourse.nodered.org/u/Munier)\
**Post date:** [1 January 2021 14:53 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/16 "2021-01-01T14:53:00Z")

</div>

Yes, it is unchecked. I have just connected the file-in node that reads the CSV file ".exe" but the plot doesn't work in the dashboard.

Here I have copied to the attached .txt file -- please try it by changing the file exetention to csv.

Thanks

[new 1.txt](https://discourse.nodered.org/uploads/short-url/g8FYDvMKu4cmjvjtFV8Dp6sfG1x.txt) (586.2 KB)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/5/2594cc3bb46a0d895708650da615d41f99d6e016.png)

---

<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:** [1 January 2021 15:13 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/17 "2021-01-01T15:13:03Z")

</div>

Tested and working from file node. Please unload your test flow.

 ![Screenshot_20210101-151358](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/3/a3b3dee59218ec99e3edf51309821a272745a828.png)

---

<div class="post-metadata">

**Author:** ![Munier](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@Munier](https://discourse.nodered.org/u/Munier)\
**Post date:** [1 January 2021 15:43 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/18 "2021-01-01T15:43:30Z")

</div>

I am not sure what you mean by unload my test flow but here is what it shows in the debug node

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/d/3da9a6046c476ce59be2761adf19fe6ed33be59a.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/c/1c5cd38ce21d36a1d357093be809e911ab08ad0f.jpeg)

if the file extension is .txt it works if it is csv it doesn't!

---

<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:** [1 January 2021 15:45 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/19 "2021-01-01T15:45:36Z")

</div>

typo. upload, export.

---

<div class="post-metadata">

**Author:** ![Munier](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@Munier](https://discourse.nodered.org/u/Munier)\
**Post date:** [1 January 2021 16:19 UTC](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316/20 "2021-01-01T16:19:08Z")

</div>

OK here it is:

```auto
[{"id":"15b37612.f7127a","type":"tab","label":"Flow X","disabled":false,"info":""},{"id":"9a2eca35.fb68e8","type":"inject","z":"15b37612.f7127a","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":200,"wires":[["14bab2e3.f9dd5d"]]},{"id":"6d00746a.6f44dc","type":"csv","z":"15b37612.f7127a","name":"","sep":"\\t","hdrin":"","hdrout":true,"multi":"mult","ret":"\\n","temp":"","skip":"0","strings":true,"x":410,"y":220,"wires":[["87143854.2242a8"]]},{"id":"87143854.2242a8","type":"function","z":"15b37612.f7127a","name":"","func":"var payload=msg.payload;\nvar a1=[];\nvar a2=[];\nt =new Date(\"2020-12-25T14:30:00\").valueOf();\nfor(let i=0;i<payload.length;i++){\n if (payload[i].col1==\"u\" || payload[i].col1==\"y\"){\n if(payload[i].col1==\"u\"){\n var temp1={ \"x\": t + (payload[i].col2)*1000, \"y\": payload[i].col3};\n a1.push(temp1);\n }\n if(payload[i].col1==\"y\"){\n var temp2={ \"x\": t + (payload[i].col2)*1000, \"y\":payload[i].col3 };\n a2.push(temp2);\n }\n }\n}\nmsg.payload=[{\n\"series\": [\"outlet flow from vessel\",\"level % in vessel\",],\n\"data\":[a1,a2],\n\"labels\": [\"\"]\n}];\n\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":220,"wires":[["3f1d73aa.d377fc","c3e824f7.fe7dd8"]]},{"id":"3f1d73aa.d377fc","type":"debug","z":"15b37612.f7127a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":700,"y":280,"wires":[]},{"id":"c3e824f7.fe7dd8","type":"ui_chart","z":"15b37612.f7127a","name":"","group":"c2bc59aa.c99c78","order":6,"width":0,"height":0,"label":"chart","chartType":"line","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"],"outputs":1,"x":700,"y":220,"wires":[[]]},{"id":"14bab2e3.f9dd5d","type":"file in","z":"15b37612.f7127a","name":"","filename":"C:\\IMPL\\SISOARXRegression\\sisoarxdata.txt","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":380,"y":100,"wires":[["6d00746a.6f44dc"]]},{"id":"c2bc59aa.c99c78","type":"ui_group","z":"","name":"Default","tab":"42581827.4ae608","order":1,"disp":true,"width":"12","collapse":false},{"id":"42581827.4ae608","type":"ui_tab","z":"","name":"Home","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

[Next page](https://discourse.nodered.org/t/can-someone-try-this-flow-to-see-if-the-following-plot-is-generated-without-the-straight-line/38316.md?page=2)
