You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm trying to add a span around each number to be able to format each number differently. formatter: function (value, options) { var value = value.toFixed(options.decimals); return value.replace (/(<.*?>)|(.)/g, function (m0, tag, ch) { return tag || ('<span>' + ch + '</span>'); }); }
I tried to use this formatter function, which works, but ouptuts the tag so they get displayed, instead as HTML. Is there a way to fix this?
The text was updated successfully, but these errors were encountered:
Ahh, yeah, it was changed from the html function to the text function in this pull request. I suppose for handling both use cases, it would make sense to allow something like a renderWith option (defaults to 'text' but allows 'html' or any other valid jQuery function). Then you could just call via:
Hi, I'm trying to add a span around each number to be able to format each number differently.
formatter: function (value, options) { var value = value.toFixed(options.decimals); return value.replace (/(<.*?>)|(.)/g, function (m0, tag, ch) { return tag || ('<span>' + ch + '</span>'); }); }
I tried to use this formatter function, which works, but ouptuts the tag so they get displayed, instead as HTML. Is there a way to fix this?
The text was updated successfully, but these errors were encountered: