Issues with Line Plot JavaScript

Hi Team,

I am trying to achieve Line Plot using more than two columns. When i use one column on X-axis and the others on Y-axis.
It is taking proper data of first column which i have chosen on X-axis. But the same is not happening with the other columns with respect to Y-axis. The data which is present in the table column is not showing on Y-axis.
Also, the multiple lines which are plotting are overlapping/overwriting. I have referred the example given. (02_Example_for_JS_Line_Plot_Basic)
But left with no solution. I am trying hard since so many days.

line


Please Help. Thanks in Advance.

Hi @janki656 and welcome to the forum.

Can you post a small example of the data you’re trying to plot? I suspect there’s something about the formatting that is causing a problem.

Hi ScottF,
Thanks for your reply.
Here is the similar kind of data i am trying to plot with:

the plot construction which i have used:


Please let me know, where exactly i am going wrong. Please let me know if you need any further details.

Thanks!!

Hi Team,
Can anyone please suggest on this!!

Thanks

Hi @janki656

you first need to convert your data

please use the String to Date&Time node on the Time column.
Afterwards use the String To Number node on your remaining columns.

You can also use the Column Auto Type Cast to convert all of them in one run.

Hi Iris,
Thanks for your reply!!
In Y-axis columns, the data values are not numbers which i have shown in the image, instead those are string values. In that case, whether “String To Number” will work, can u please confirm.

Thank you.

No this only works for numbers. in this case, the line plot will not work, as it needs a numerical Y Axis.
Maybe another visualization is than better? What do you want to achieve?

If i need to plot a Bar Chart in case of String values, what should i use in place of “String To Number”. Please confirm.

Thank you