MCPcopy Create free account
hub / github.com/spotify/chartify / chart_data

Function chart_data

tests/test_plots.py:28–37  ·  view source on GitHub ↗

Retrieve data from chart object based on series name. Note: if there's only one series the name is None. Returns: Dictionary populated with data from the chart.

(chart_object, series_name)

Source from the content-addressed store, hash-verified

26
27
28def chart_data(chart_object, series_name):
29 """Retrieve data from chart object based on series name.
30
31 Note: if there's only one series the name is None.
32
33 Returns:
34 Dictionary populated with data from the chart.
35 """
36 cannonical_series_name = chart_object.plot._cannonical_series_name(series_name)
37 return chart_object.figure.select(cannonical_series_name)[0].data
38
39
40def chart_color_mapper(chart_object):

Calls 1

Tested by

no test coverage detected