score:1

Accepted answer

this is what's needed

            data: [{
            x: {{ labels2[0] | safe }},
            y: {{ values2[0] | safe }}
            }, {
            x: {{ labels2[1] | safe }},
            y: {{ values2[1] | safe }}
            }, {
            x: {{ labels2[2] | safe }},
            y: {{ values2[2] | safe }}
            }, {
            x: {{ labels2[3] | safe }},
            y: {{ values2[3] | safe }}
            }]

score:0

if you want multiple line charts on the same graph you will need to put the dataset objects in the datasets array instead of making the chart twice like so:

datasets: [
                    {
                        label: 'sweep data',
                        data: {{ values | safe }},
                        backgroundcolor: ['red'],
                        fill: false,
                        display: true               
                    },
                    {
                        label: 'peak data',
                        data: {{ values2 | safe }},
                        backgroundcolor: ['black'],
                        fill: false,
                        display: true               
                    }
                ]

Related Query

More Query from same tag