Report Bar Chart Script to Hide/Show Bar Labels

I am wanting to enable/show or disable/hide the Bar Labels (under Properties/Label Options) based on if the number of rows of data inside the scripting of the bar chart.

For example if there are greater than 10 rows of data hide the bar labels and if less then show the bar labels. If there are more than 10 rows then the text from the bar labels overlap and you can’t read the label text.

Can you tag your question as Perspective or Vision?