chart-fx
chart-fx copied to clipboard
Feature/axis name generation handle missing info
I am suggesting this change since I noticed two "problems" with the axis label handling.
- If there is no axis name specified there would be a space character before the unit part e.g.:
_[V](Space replaced by _ in the example) - If there was no unit specified an empty set of brackets would be used:
[]
- (Often seen when people don't set a unit - not so pretty in IMO)
The change would result in the following behaviour (taken from the tests):
Axis name, unit, scale
"axis name", "axis unit", 1. → "axis name [axis unit]"
"DeviceA", "V", 1. → "DeviceA [V]"
"DeviceA", "V", 0.001 → "DeviceA [mV]"
"axis name", null, 1. → "axis name"
"", "V", 1. → "[V]"
null, "V", 1. → "[V]"
"", "", 1. → ""
null, null, 1. → null
In our code we extended DefaultNumericAxis because of this. With the changes this would not be necessary.
Please consider the above suggestion for integration.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code