MCPcopy Create free account
hub / github.com/scanny/python-pptx / make_bubble_chart_data

Function make_bubble_chart_data

tests/chart/test_xmlwriter.py:659–680  ·  view source on GitHub ↗

Return an |BubbleChartData| object populated with *ser_count* series, each having *point_count* data points.

(ser_count, point_count)

Source from the content-addressed store, hash-verified

657
658
659def make_bubble_chart_data(ser_count, point_count):
660 """
661 Return an |BubbleChartData| object populated with *ser_count* series,
662 each having *point_count* data points.
663 """
664 points = (
665 (1.1, 11.1, 10.0),
666 (2.1, 12.1, 20.0),
667 (3.1, 13.1, 30.0),
668 (1.2, 11.2, 40.0),
669 (2.2, 12.2, 50.0),
670 (3.2, 13.2, 60.0),
671 )
672 chart_data = BubbleChartData()
673 for i in range(ser_count):
674 series_label = "Series %d" % (i + 1)
675 series = chart_data.add_series(series_label)
676 for j in range(point_count):
677 point_idx = (i * point_count) + j
678 x, y, size = points[point_idx]
679 series.add_data_point(x, y, size)
680 return chart_data
681
682
683def make_category_chart_data(cat_count, cat_type, ser_count):

Callers 1

xml_fixtureMethod · 0.85

Calls 3

add_seriesMethod · 0.95
BubbleChartDataClass · 0.90
add_data_pointMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…