Forum Discussion
Anonymous
5 years agoNot applicable
edit graph
I want to edit graph from pic1 to pic2 guide ma about it please. Pic 1 Pic2
v-kkf-msft
5 years agoCommunity Support
Hi Anonymous ,
You can do it by writing python scripts. First, please refer to this document to install Python and connect to the data source. Run Python scripts in Power BI Desktop
Then use the following script in the Python visual.
import numpy as np
import matplotlib.pyplot as plt
y = dataset.ID
x = dataset.value
# Default Settings
b = plt.barh(y, x)
for rect in b:
w = rect.get_width()
plt.text(w, rect.get_y()+rect.get_height()/2, '{:.0%}'.format(w), ha='left', va='center',fontsize=20)
plt.xticks([0.05, 0.5,0.9, 1],['$on process$', '$continue$', '$On the way$','$Completed$'])
plt.grid(axis="x", which="major",linestyle='-.')
plt.title('custom')
plt.xlabel('xlabel name')
plt.ylabel('ylabel name')
plt.show()If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous5 years agoNot applicable
v-kkf-msft Please send file pbix to me.
- v-kkf-msft5 years agoCommunity Support
Hi Anonymous ,
This is my PBIX file.
- Anonymous5 years agoNot applicable