One could use a property of type integer instead (and cast the integer when and as necessary,) but that's very user unfriendly. How will a user know which integer value to use for any bar type, let alone for custom ones? How could the developer know what custom bar types there might be, and what their integer codes are, in order to provide help for the user?
One solution would be to provide a mapping service that maps between bar type names and bar type integer codes (for both built-in and custom bar types,) and also a way to enumerate the names of all installed bar types.

Comment