For all Line charts, we use Datasource as Legend to distinguish two set of data, even though the line color is showing differently, the legend is not showing correctly after we publish the dashboard. it is showing correctly in PBI Desktop.
Such kind of issue is caused by how Power BI handles colors. To resolve the issue, pstart over by hitting the "Reset to default" at the bottom of the “Data colors” card and explicitly select a color for *every* entry in the data colors. After that, please republish it. Product group has a future scenario to improve how this works, but it may needs some time. Thanks for your understanding!