Skip to content

Instantly share code, notes, and snippets.

@parulnith
Last active August 12, 2021 00:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parulnith/ca7a6a6858fd8c2ad254ec3d76fec2f7 to your computer and use it in GitHub Desktop.
Save parulnith/ca7a6a6858fd8c2ad254ec3d76fec2f7 to your computer and use it in GitHub Desktop.
chart = ctc.Pie("Top 5 cities by the number of respondents")
chart.set_options(
labels=list(cities.index),
inner_radius=0.5,
colors=['#FFF1C5','#F7B7A3','#EA5F89','#9B3192','#57167E','#47B39C','#00529B'],
)
chart.add_series(list(cities['values']))
# Calling the load_javascript function when rendering chart first time.
chart.load_javascript()
chart.render_notebook()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment