What's wrong with this stacked area chart?

Viewed 76

I am a complete newbie and this is my first question on StackOverflow. I am working on the dashboard in plotly-dash, and have some issues with the stacked area chart:

Stacked Area Chart

While the line chart looks not that bad:

Multiple Line Chart

Some example data and types:

Data example & types

Occ_Number column is created to count how many times each or another platform appears in the dataset to use it in the chart to show video games releases by years and platforms, but I guess it is not a good decision.

g2.sort_values(
by='Year_of_Release',
ascending=True,
inplace=True)   
g2['Occ_Number'] = g2.groupby('Platform').cumcount()+1

Plotly:

 fig = px.area(g2,
        x=g2['Year_of_Release'],
        y=g2['Occ_Number'],
        color=g2['Platform'],
        color_discrete_sequence=px.colors.qualitative.Dark24,
        title="Video Games Releases By Platforms",
        labels=dict(Year_of_Release='Year of Release', Occ_Number="Number of Released Games"))

fig.update_layout(yaxis = dict(type="category")) 
fig.show()

If you have any ideas/suggestions on how it can be fixed or what data manipulation I can do to improve it I would really appreciate it!

0 Answers
Related