How to hide pie chart labels

I am currently trying to make a pie chart where the user can change the inputs

here is my code

    Plot.templates.default = "material_light"
    self.hoursPlot.data = [
      go.Pie(
      labels= list(hoursDefault.keys()),
      values= list(hoursDefault.values())
      )
    ]
    self.hoursPlot.show_labels = False
    self.hoursPlot.layout = {'automargin': True,'textposition':'inside','uniformtext_mode':'hide','uniformtext_minsize':12}

currently this is displaying this

how can i make it so the very small percentages do not automatically go off the chart in the very ugly lines and instead just are hoverable and in the legend ?

any help would be appreciated !

1 Like
  textposition='inside' 

this in the initialization of the plot fixed it

1 Like