How to use the xlsxwriter.shape.Shape._get_pattern_properties function in XlsxWriter

To help you get started, we’ve selected a few XlsxWriter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jmcnamara / XlsxWriter / xlsxwriter / chart.py View on Github external
# Turn off the legend.
        if options.get('none'):
            legend['position'] = 'none'

        # 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)
github jmcnamara / XlsxWriter / xlsxwriter / chart.py View on Github external
else:
                warn("Unknown marker type '%s" % marker_type)
                return

        # 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
github jmcnamara / XlsxWriter / xlsxwriter / chart.py View on Github external
Args:
            options: A dictionary of options.

        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.drop_lines = {'line': line,
                           'fill': fill,
                           'pattern': pattern,
github jmcnamara / XlsxWriter / xlsxwriter / chart.py View on Github external
def _get_area_properties(self, options):
        # Convert user area properties to the structure required internally.
        area = {}

        # 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)