🚀 Gen 5 of the leading AI app deployment platform launches October 6. Click for the livestream.

How to separate between data plot?

Hello everyone,
I am beginning using dash, and my problem related with generated graphic sysstat (SAR Report) for (CPU ALL, Memory, Disk I/O and Socket). Firstly, i have generated data (format json). My problem is i can’t give some space between data plot? (i don’t know how to call it, Ex. ip-frag[0], ip-frag[1], … etc.)

figure_socket = tools.make_subplots(
rows=2,
cols=1,
print_grid=False,
shared_yaxes=True
)

Set socket-trace1 {ip-frag, tcp-tw}

socket_trace1 = []
for attr in data_graphic_as_content_total[“socket_server_resources”]:
if (attr == “ip-frag”) or (attr == “tcp-tw”):
cont = go.Scatter(
x=data_graphic_as_date_total[“socket_server_resources”],
y=data_graphic_as_content_total[“socket_server_resources”][attr],
mode=“lines”,
name=attr
)
socket_trace1.append(cont)

Set socket-trace2 {totsck, tcpsck, udsck, rawsck}

socket_trace2 = []
for attr in data_graphic_as_content_total[“socket_server_resources”]:
if (attr == “totsck”) or (attr == “tcpsck”) or (attr == “udpsck”) or (attr == “rawsck”):
cont = go.Scatter(
x=data_graphic_as_date_total[“socket_server_resources”],
y=data_graphic_as_content_total[“socket_server_resources”][attr],
mode=“lines”,
name=attr
)
socket_trace2.append(cont)

Set Figure Socket

figure_socket.add_traces(socket_trace1, rows=[1]*len(socket_trace1), cols=[1]*len(socket_trace1))
figure_socket.add_traces(socket_trace2, rows=[2]*len(socket_trace2), cols=[1]*len(socket_trace2))
figure_socket[‘layout’].update(
title=‘Socket’,
margin=go.Margin(l=50, r=50, b=50, t=50),
yaxis={‘title’: ‘Frag’},
xaxis={‘dtick’: 2},
yaxis2={‘title’: ‘Socket’},
xaxis2={‘dtick’: 2}
)

Description:

data_graphic_as_content_total = {
‘socket_server_resources’: {
‘ip-frag’: [93, 70, …, 43],
‘tcp-tw’: [32, 32, …, 232],

‘rawsck’: [11, 34, …, 445]
},

},
data_graphic_as_date_total = {
‘socket_server_resources’: [‘21-Nov’, ‘21-Nov’, …, ‘19-Dec’, ‘19-Dec’]
}
it was example data, len(ip-frag) = len(tcp-row) = … = len(rawsck) = 4175 datas, and for len(date socket_server_resources) = 4175 datas.

NOTED:

In one day (Ex: 21-Nov, have 144 datas record, with different time arround 00:00 AM to 11:59 PM)

Here my friend generate using KSAR Application.
image

I wanna change my graphic line like KSAR Result,
Please help me