Hi everyone, i want to make my line chart, how i can control “y” and “x” values, i am trying to write x values on label, and then make a line
for example x: 2, y:5, x:4, y: 1
and it did line, but first dot is in x;8 y;1, and second one in x;3 y:5, and idk why, there is third dot in random place
for your X-axis, click expression and paste this: {{ $input.all().map(i => i.json.x) }}
and do the same for Y-axis: {{ $input.all().map(i => i.json.y) }}
hope that sorts it.
The expressions A_A4 shared are correct, looks like you had the data mapped properly in the screenshot too. The issue you were seeing with dots appearing in wrong positions was probably because your items weren’t sorted by x value before hitting the chart node, QuickChart just plots points in the order they come in so if your data comes in as x:4 then x:2 the line will draw left-to-right in that order which makes it look like things are in random spots.
If your data isn’t already sorted you can throw a Sort node before the QuickChart node and sort by the x field ascending, that should make the line draw properly from lowest to highest x value.
