Why do you want to hide it? This would propably lead for my oppinion to some confusion by watching your chart, because the proportions of the chart aren’t consistent. How do you think about?
I found a link which creates a chart with gaps in Python where it takes an array of data specifying values and None for no data or missing values. There is a property connectgaps which could be set for a gap or no gap chart.
Not sure if this can be configured in Mendix widget of line chart. It takes layout options of plotly in advanced mode, but this connectgaps is not in layout section of plotly reference.
python chart: https://plot.ly/python/line-charts/