From da659c56bdb1fc091c11487642dfce1d4ad08757 Mon Sep 17 00:00:00 2001 From: moshferatu Date: Wed, 23 Oct 2024 11:56:25 -0700 Subject: [PATCH] Initial commit of swing trading dashboard script --- assets/dashboard.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 assets/dashboard.js diff --git a/assets/dashboard.js b/assets/dashboard.js new file mode 100644 index 0000000..16b8f81 --- /dev/null +++ b/assets/dashboard.js @@ -0,0 +1,11 @@ +document.documentElement.setAttribute('data-bs-theme', 'dark') + +var dagcomponentfuncs = (window.dashAgGridComponentFunctions = window.dashAgGridComponentFunctions || {}); + +dagcomponentfuncs.SignalRenderer = function (props) { + let signalElements = props.value.split('').map((char) => { + let className = char === 'N' ? 'no-signal' : 'long-signal'; + return React.createElement('span', { className: className }); + }); + return React.createElement('div', { className: 'signal-container' }, signalElements); +}; \ No newline at end of file