Currently, I'm redesigning the line chart. Sometimes for the chosen time period, the user might lack data. I need to visualize it. Someone has any experience what would be the best solution? is it better to gray-out all field which lacks data or maybe gray-out just the period on the level equivalent to the available data? Does gray-out is a good solution? I thought adding another color might be misleading hence the dashes. Or maybe some other practices? what's most UX friendly?
You can treat the missing data as a 'category' and explain it.
If you have gaps of data, we naturally want to fill in those gaps in our minds (we seek patterns).
Tradeoff: treating the gap as a mass in your second iteration does create more visual attention, but it emphasizes the unknown, which will prevent trend speculation.
What you can do when these gaps show up is provide a legend, so there's no ambiguity as to what this represents.