I tried following this as a reference: https://codepen.io/plotly/pen/OVqZEO
I know I can change the axis placement based on position between 0 and 1. But positions 0 and 1 are in same position as my default x and y axes so I can’t move the new axis further out but moving them further in would cause the new axis to collide with the chart. So I could use some advice if anyone has a similar issue.
Here is a picture of what the double left y axes look like
{
"title":{
"text":"Default Chart Title"
},
"xaxis":{
"title":{
"text":"Date"
},
"type":"date",
"range":[
"2018-05-03",
"2019-05-03"
],
"autorange":true
},
"yaxis":{
"title":{
"text":"Price"
},
"type":"linear",
"range":[
118.86888888888889,
222.6911111111111
],
"autorange":true
},
"yaxis2":{
"title":{
"text":"Price"
},
"anchor":"free",
"overlaying":"y",
"side":"left",
"position":0,
"type":"linear",
"range":[
25.321666666666665,
47.88833333333333
],
"autorange":true
}
}
my traces
trace 1
{
"name": "Stock1",
"type": "lines",
"x": [array of data],
"y": [array of data]
}
trace 2
{
"name": "Stock2",
"type": "lines",
"x": [array of data],
"y": [array of data],
"yaxis": "y2"
}