1

Is there a way to change or manipulate the font size and color of the labels in Bokeh high level charts like the Chord chart?

Bokeh provides options to change the background color etc, but I cannot seem to find any means to tweak the labels either in Bokeh or in css.

Any help or suggestion would be greatly appreciated.

1 Answer 1

1

In order to change the text size and color you have to alter the glyphs inside the chord chart renderers. The renderer in index position 3 is the text glyph renderer so you can set the font size and color there.

chord_from_df = Chord(source_data, source="name_x", target="name_y", value="value")
chord_from_df.renderers[3].glyph.text_font_size['value'] = '12pt'
chord_from_df.renderers[3].glyph.text_color = '#FF0000'
show(chord_from_df)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.