Issue with Holoviews Chord diagram and holomaps - Node colors turning black

Viewed 141

I'm trying to create a chord diagram that changes based on the movement of a slider widget. I've created a dict of chords and put that in a holomap. However, when I do that, the outer circumference of the chord turns black instead of the node color. Each chord in the dict however displays correctly. Am I doing something wrong? I've tried to recreate the problem I'm seeing using the default airport_routes dataset

import holoviews as hv
from holoviews import opts, dim
from bokeh.sampledata.airport_routes import routes, airports

hv.extension('bokeh')

# Count the routes between Airports
route_counts = routes.groupby(['SourceID', 'DestinationID']).Stops.count().reset_index()
nodes = hv.Dataset(airports, 'AirportID', 'City')
chord = hv.Chord((route_counts, nodes), ['SourceID', 'DestinationID'], ['Stops'])

# Select the 20 busiest airports
busiest = list(routes.groupby('SourceID').count().sort_values('Stops').iloc[-20:].index.values)
busiest_airports = chord.select(AirportID=busiest, selection_mode='nodes')

busiest_airports.opts(
    opts.Chord(cmap='Category20', edge_color=dim('SourceID').str(), 
               height=800, labels='City', node_color=dim('AirportID').str(), width=800))

route_dict = {1:busiest_airports, 2:busiest_airports}

hmap = hv.HoloMap(route_dict, kdims=['test'])
hmap

each chord should look like the output of route_dict[1]

0 Answers
Related