Skip to content

Commit

Permalink
conditional_format: fix for 0 length data_bar
Browse files Browse the repository at this point in the history
Fix for conditional format data bar length when min/max values are 0.

Closes #1108
  • Loading branch information
DanilFilippov123 authored Dec 19, 2024
1 parent 3e45ab8 commit 6b790ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xlsxwriter/worksheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -7756,10 +7756,10 @@ def _write_data_bar(self, param):

# Min and max bar lengths in in the spec but not supported directly by
# Excel.
if param.get("min_length"):
if "min_length" in param:
attributes.append(("minLength", param["min_length"]))

if param.get("max_length"):
if "max_length" in param:
attributes.append(("maxLength", param["max_length"]))

if param.get("bar_only"):
Expand Down

0 comments on commit 6b790ac

Please sign in to comment.