Extra space gets added below and above the chart
Hi,
Extra space is added at the top and bottom of chart if chart height is more. Any idea how to remove it?

https://codepen.io/saimaparveen/pen/mwVLLL
Assuming you're referring to the space between y=0 and y='test', you can try tweaking yaxis.range to fit your needs: https://codepen.io/etpinard/pen/qjbYgX?editors=0010
Closing. @saimaparveen if you have any other questions on this topic, please use https://community.plot.ly/
Hi,
yaxis: { range: [-0.5, trace1.y.length-3] }
This solution works only for static data .. for me the graph data is changing that is why this solution is not working .. If data is more trace1.y.length-3 still leave space on top. Is there any way i can know what value we can minus from trace1.y.length ?
for me the graph data is changing
How are you updating your data? You can use Plotly.relayout or Plotly.update to update the yaxis range dynamically to fit your needs
The issue is not with the update.
The issue is occurring when there is duplicate data for y axis or xaxis
for ex: the code which is attached above is having 2 duplicate values in categories
"ss" ,"rr"
We are doing trace1.y.length-3 which is removing space on top, when there are no duplicates then there is no extra space at top.
the code which is attached above is having 2 duplicate values in categories "ss" ,"rr"
Hmm. I doubt that's the case.
The markers mode add some padding to the autoranged axes. This logic is slightly opinionated, and you're not the first one complaining about it not giving the desired results. As I mentioned above, to override this behavior, you can set the axis range.
Same issue is happening for space in left and right side.
When the mode is "markers+lines"
when the mode is just "lines" it is working fine.

https://codepen.io/anon/pen/brjGJV
Any idea how this can be fixed?
@saimaparveen : I have the same issue (white space on the left and right side) in the "lines+text" mode. Did you solve the issue somehow?
"lines+text" mode:

"lines" mode:

you can set the axis range.
I already set the axis range. However, if I press "All" on the rangeselector, it is showing me the white spaces again. Before using the rangeselector:
After clicking the "all" button:
FYI making this whole situation more configurable is being discussed in #1876. That effort, whenever it happens, will include the ability to override this automatic padding.