MCPcopy
hub / github.com/jmcnamara/XlsxWriter / _get_points_properties

Method _get_points_properties

xlsxwriter/chart.py:1448–1487  ·  view source on GitHub ↗
(self, user_points)

Source from the content-addressed store, hash-verified

1446 return layout
1447
1448 def _get_points_properties(self, user_points):
1449 # Convert user points properties to structure required internally.
1450 points = []
1451
1452 if not user_points:
1453 return []
1454
1455 for user_point in user_points:
1456 point = {}
1457
1458 if user_point is not None:
1459 # Set the line properties for the point.
1460 line = Shape._get_line_properties(user_point)
1461
1462 # Set the fill properties for the chartarea.
1463 fill = Shape._get_fill_properties(user_point.get("fill"))
1464
1465 # Set the pattern fill properties for the series.
1466 pattern = Shape._get_pattern_properties(user_point.get("pattern"))
1467
1468 # Set the gradient fill properties for the series.
1469 gradient = Shape._get_gradient_properties(user_point.get("gradient"))
1470
1471 # Pattern fill overrides solid fill.
1472 if pattern:
1473 self.fill = None
1474
1475 # Gradient fill overrides the solid and pattern fill.
1476 if gradient:
1477 pattern = None
1478 fill = None
1479
1480 point["line"] = line
1481 point["fill"] = fill
1482 point["pattern"] = pattern
1483 point["gradient"] = gradient
1484
1485 points.append(point)
1486
1487 return points
1488
1489 def _has_formatting(self, element: dict) -> bool:
1490 # Check if a chart element has line, fill or gradient formatting.

Callers 1

add_seriesMethod · 0.95

Calls 5

_get_line_propertiesMethod · 0.80
_get_fill_propertiesMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected