Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Dear Power BI support team and experts,
I have a dashboard page that shows a custom line chart from Power BI python scripts. Everything works as intended on Power BI desktop.
However, every time I tried to view that report page on app.powerbi.com, I get the following error.
Here is my python script.
FYI, my dataframe "dataset" has no float or decimals, all int.
My dataframe,
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import math
fig, ax = plt.subplots()
sns.lineplot(ax=ax, data = dataset, x='Year_month', y='Budget', hue='office', legend=None)
sns.lineplot(ax=ax, data = dataset, x='Year_month', y='Actual', hue='office', legend=None, linestyle='--')
cust_anno = ['line1','line2','line3','line4','line5','line6','line7','line8','line9','line10','line11','line12']
for line, name in zip(ax.lines, cust_anno)
y = line.get_ydata()
x = line.get_xdata()
if len(y)>0:
ax.annotate(name, xy=(x[-1],y[-1]), xycoords=(ax.get_xaxis_transform(), ax.get_yaxis_transform()), ha="left", va='center', color=line.get_color())
print(ax.get_xaxis_transform())
plt.xticks(dataset.Year_month, dataset.Year_month, rotation=45, ha='right')
plt.tight_layout(pad=0, w_pad=0, h_pad=0)
plt.show()
and Here is my Power BI desktop showing line chart generated by Python as intended.
Thank you very much for your time and helps in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.