cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
zengyuz Frequent Visitor
Frequent Visitor

Multiple Line chart with python visualization

I was trying to have two line charts on the same figure. However, the visualization only shows one line.

0jrus.png

Here're the fields I have in the python visual, Spend 2018 and Spend 2019 are measures:

VRSI1.png

Here's my code in the python script editor:

# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script: 

# dataset = pandas.DataFrame(Week of,Year,Spend 2018, Spend 2019)
# dataset = dataset.drop_duplicates()

# Paste or type your script code here:
import matplotlib.pyplot as plt 
line1 = dataset.plot('Week of','Spend 2018',color="#333333") 
line2 = dataset.plot('Week of','Spend 2019',color="#999999")
plt.show() 

How can I have both 2018 and 2019 lines on the figure at the same time? Thanks in advance!

1 REPLY 1
Community Support Team
Community Support Team

Re: Multiple Line chart with python visualization

Hi @zengyuz ,

After researching, I haven't solved it. Maybe others who experienced it will help you. Or  you might try to create a support ticket to get a dedicated support.

Support Ticket.gif

Hope your problem will be solved as soon as possible. If you have solved it by yourself, welcome to share your solution. Many people will benefit here.

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New Ranks and Rank Icons in 2020

New Ranks and Rank Icons in 2020

Read the announcement for more information!

New Kudos Given Badges Coming

New Kudos Given Badges Coming

We're rolling out new Kudos Given badges. Find out how many Kudos you've given.

November 2019 Community Highlights

November 2019 Community Highlights

Get an overview of the events and great community content from November.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)