Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
line = Shape._get_line_properties(user_point.get('line'))
# Allow 'border' as a synonym for 'line'.
if 'border' in user_point:
line = Shape._get_line_properties(user_point['border'])
# Set the fill properties for the chartarea.
fill = Shape._get_fill_properties(user_point.get('fill'))
# Set the pattern fill properties for the series.
pattern = \
Shape._get_pattern_properties(user_point.get('pattern'))
# Set the gradient fill properties for the series.
gradient = \
Shape._get_gradient_properties(user_point.get('gradient'))
# Pattern fill overrides solid fill.
if pattern:
self.fill = None
# Gradient fill overrides the solid and pattern fill.
if gradient:
pattern = None
fill = None
point['line'] = line
point['fill'] = fill
point['pattern'] = pattern
point['gradient'] = gradient
points.append(point)
# Set the line properties for the chartarea.
line = Shape._get_line_properties(options.get('line'))
# Allow 'border' as a synonym for 'line'.
if options.get('border'):
line = Shape._get_line_properties(options['border'])
# Set the fill properties for the chartarea.
fill = Shape._get_fill_properties(options.get('fill'))
# Set the pattern fill properties for the series.
pattern = Shape._get_pattern_properties(options.get('pattern'))
# Set the gradient fill properties for the series.
gradient = Shape._get_gradient_properties(options.get('gradient'))
# Pattern fill overrides solid fill.
if pattern:
self.fill = None
# Gradient fill overrides the solid and pattern fill.
if gradient:
pattern = None
fill = None
# Set the plotarea layout.
layout = self._get_layout_properties(options.get('layout'), False)
area['line'] = line
area['fill'] = fill
area['pattern'] = pattern
# Set the line properties for the marker.
line = Shape._get_line_properties(marker.get('line'))
# Allow 'border' as a synonym for 'line'.
if 'border' in marker:
line = Shape._get_line_properties(marker['border'])
# Set the fill properties for the marker.
fill = Shape._get_fill_properties(marker.get('fill'))
# Set the pattern fill properties for the series.
pattern = Shape._get_pattern_properties(marker.get('pattern'))
# Set the gradient fill properties for the series.
gradient = Shape._get_gradient_properties(marker.get('gradient'))
# Pattern fill overrides solid fill.
if pattern:
self.fill = None
# Gradient fill overrides the solid and pattern fill.
if gradient:
pattern = None
fill = None
marker['line'] = line
marker['fill'] = fill
marker['pattern'] = pattern
marker['gradient'] = gradient
return marker
Returns:
Nothing.
"""
if options is None:
options = {}
line = Shape._get_line_properties(options.get('line'))
fill = Shape._get_fill_properties(options.get('fill'))
# Set the pattern fill properties for the series.
pattern = Shape._get_pattern_properties(options.get('pattern'))
# Set the gradient fill properties for the series.
gradient = Shape._get_gradient_properties(options.get('gradient'))
# Pattern fill overrides solid fill.
if pattern:
self.fill = None
# Gradient fill overrides the solid and pattern fill.
if gradient:
pattern = None
fill = None
self.hi_low_lines = {'line': line,
'fill': fill,
'pattern': pattern,
'gradient': gradient}
# Set the line properties for the legend.
line = Shape._get_line_properties(options.get('line'))
# Allow 'border' as a synonym for 'line'.
if options.get('border'):
line = Shape._get_line_properties(options['border'])
# Set the fill properties for the legend.
fill = Shape._get_fill_properties(options.get('fill'))
# Set the pattern fill properties for the series.
pattern = Shape._get_pattern_properties(options.get('pattern'))
# Set the gradient fill properties for the series.
gradient = Shape._get_gradient_properties(options.get('gradient'))
# Pattern fill overrides solid fill.
if pattern:
self.fill = None
# Gradient fill overrides the solid and pattern fill.
if gradient:
pattern = None
fill = None
# Set the legend layout.
layout = self._get_layout_properties(options.get('layout'), False)
legend['line'] = line
legend['fill'] = fill
legend['pattern'] = pattern