scanny / python-pptx

Create Open XML PowerPoint documents in Python
MIT License
2.28k stars 502 forks source link

chart.category_axis.visible = False not Working #852

Open benaustin2000 opened 1 year ago

benaustin2000 commented 1 year ago

Hi , When I setting the

chart.category_axis.visible = False

, but axis still in the chart.This bug affects all axis.visible function. Due to default value of delete_ is set True(Should be False), when setting visible=False, delete.val = True, the _setter found value == self._default, then return.

def set_attr_value(obj, value):
    if value == self._default:
        if self._clark_name in obj.attrib:
            del obj.attrib[self._clark_name]
        return