DataBar axis position when negative values exist
Created originally on Bitbucket by Justin Lute
USER STORIES
- As a creator of custom Excel reports using openpyxl, I want to display DataBars where negative values are represented by a magnitude (i.e., bar length) that increases towards the left of the cell from a central axis, so that negative values are more readily distinguishable from positive values.
- As a creator of custom Excel reports using openpyxl, I want to generate DataBars where negative values have a bar of a different color than positive values, so that negative values are more readily distinguishable from positive values.
DETAILS
An extremely valuable feature of conditional formatting in Excel using DataBars is the ability to set the axis position to the center of the cell when there are negative values present in the selection. Moreover, one can even set a different color for negative values. Thus, for example, one could have positive values displayed with a green bar that increases towards the right; with negative values displayed with a red bar that increases towards the left.
For example…
It would appear that there is an API for the axis position (https://docs.microsoft.com/en-us/office/vba/api/excel.databar.axisposition) and for a negative bar format (https://docs.microsoft.com/en-us/office/vba/api/excel.databar.negativebarformat).
How feasible would it be to implement this in openpyxl? Aside from openpyxl.formatting.rule.DataBarRule, where else would changes need to be made?
I am unlikely to be skilled enough to implement this feature myself at this time. Otherwise, I would have implemented already and issued a PR.