Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Plotly.js scatter plot not displaying even after giving the x,y values as arrays

Hi ,
I am plotting the scatter plot with list of array. Which have more than 100 items.
In each items I have given the x,y as array. But its still not working .
I have copied the image of my object.
Any help is appreciated.

Here is my object.
this.Data = {x: [10],
y: [15],
type: ‘scatter’,
mode: ‘none’,
marker: { color: ‘rgba(200, 50, 100, .7)’, size: 5 },
hoverinfo: “x,y”
name: ‘’
And Thank you so much for a such beautiful plugin.

Thank You image

And also Can you please advise how can I draw a line Y=x line for Reference In scatter Plot.

Thank you
Aditya Venkat

Hi Here is my Clear picture of object.
I am using Angular 5 for this.XYAxisData

You’re setting mode: 'none', that means you get blank trace. Try mode: 'markers' or mode: 'lines' of mode: 'lines+markers' or simply use our default value by removing mode from your traces.

Thank You etienne for you reply. Its worked. I am able see the points.
And I am new to the plotly . Can you please advise how can i draw Y=x line. which comes


Thank You Etienne for all the Help.

Thank You

Hi Eitenne,
I got it working . I have added a new series.

var trace1 = {
x: [1, 2, 3, 4],
y: [10, 15, 13, 17],
type: ‘scatter’

Thank you for the Help.