Scriptable value based option demo. 4am edition#5146
Scriptable value based option demo. 4am edition#5146Eltee-Taiwo wants to merge 2 commits intoMegabit:masterfrom
Conversation
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
recheck |
| if (options[key] && options[key].startsWith("function")) { | ||
| options[key] = parseFunction(options[key]); | ||
| if (key === 'scriptableFormatter') { | ||
| options['formatter'] = parseFunction(options[key]); |
There was a problem hiding this comment.
Hacky way to make it backwards compatible and be able to keep the existing int rounding rules.
Source/Extensions/Blazorise.Charts/ScriptableValueBasedOptionsConverter.cs
Outdated
Show resolved
Hide resolved
Source/Extensions/Blazorise.Charts/ScriptableValueBasedOptions.cs
Outdated
Show resolved
Hide resolved
| Align = "center", | ||
| Anchor = "center" | ||
| Anchor = "center", | ||
| SoftCodeFormatter = "function(value, context) { return \"$\" + value; }" |
There was a problem hiding this comment.
I tried using the scriptableOption method but using this method allows us to soft code the formatter logic and make it as complex as we want.
|
Hey, thanks for the contribution. I still need to review it properly but it seems good from what I can see. |
|
The feature is planned for 1.5. The review is still on hold as I have more ideas and changes to make it more flexible. |
|



My quickfix/workaround for being able to use a custom formatter for chart data labels.
See this discussion for more details.