Return a |CategoryChartData| instance populated with *cat_count* categories of type *cat_type* and *ser_count* series. Values are auto-generated.
(cat_count, cat_type, ser_count)
| 681 | |
| 682 | |
| 683 | def make_category_chart_data(cat_count, cat_type, ser_count): |
| 684 | """ |
| 685 | Return a |CategoryChartData| instance populated with *cat_count* |
| 686 | categories of type *cat_type* and *ser_count* series. Values are |
| 687 | auto-generated. |
| 688 | """ |
| 689 | category_labels = { |
| 690 | date: (date(2016, 12, 27), date(2016, 12, 28), date(2016, 12, 29)), |
| 691 | float: (1.1, 2.2, 3.3, 4.4, 5.5), |
| 692 | str: ("Foo", "Bar", "Baz", "Boo", "Far", "Faz"), |
| 693 | }[cat_type] |
| 694 | point_values = count(1.1, 1.1) |
| 695 | chart_data = CategoryChartData() |
| 696 | chart_data.categories = category_labels[:cat_count] |
| 697 | for idx in range(ser_count): |
| 698 | series_title = "Series %d" % (idx + 1) |
| 699 | series_values = tuple(islice(point_values, cat_count)) |
| 700 | series_values = [round(x * 10) / 10.0 for x in series_values] |
| 701 | chart_data.add_series(series_title, series_values) |
| 702 | return chart_data |
| 703 | |
| 704 | |
| 705 | def make_xy_chart_data(ser_count, point_count): |
no test coverage detected
searching dependent graphs…