Hi all,
I'm struggling to implement the horizontal Funnel Chart below in dashboard 2.0 template node,
and could use some help. I'm considering these two libraries (Option 1 is preferable):
- Vue Funnel Graph - Funnel graph drawing library for Vue.js.
- D3 Clone of FunnelGraph.js - a D3.js implementation of a funnel chart.
Here's my broken flow, based on the Echarts demo solution:
[{"id":"5b58efcc9731e50a","type":"ui-template","z":"9bcf538d070db3bc","group":"5a24a7294e508359","page":"","ui":"","name":"Funnel Chart","order":2,"width":0,"height":0,"head":"","format":"<template>\n\n <div id=\"funnel-graph\"></div>\n</template>\n\n\n<script src=\"https://unpkg.com/vue-funnel-graph-js/dist/vue-funnel-graph.min.js\"></script>\n\n<script>\n\n function init() {\n\n \n :width=\"width\"\n :height=\"height\"\n :labels=\"labels\"\n :values=\"values\"\n :colors=\"colors\"\n :sub-labels=\"subLabels\"\n :direction=\"direction\"\n :gradient-direction=\"gradientDirection\"\n :animated=\"true\"\n :display-percentage=\"true\"},\n \n data: {\n width: 400,\n height: 400,\n labels: ['Step 1', 'Step 2', 'Step 3', 'Step 4'],\n subLabels: ['Sub 1', 'Sub 2', 'Sub 3'],\n values: [[600, 400, 200, 100], [300, 200, 100, 50]],\n colors: ['#FF5733', '#33FF57', '#3357FF'],\n gradientDirection: 'horizontal',\n direction: 'vertical'\n }\n });\n }\n\n // Run this code when the widget is built\n let interval = setInterval(() => {\n if (window.FunnelGraph) {\n // Call init() to use VueFunnelGraph\n init();\n clearInterval(interval);\n }\n }, 100);\n</script>\n\n<style>\n /* Define any styles here - supports raw CSS */\n #funnel-graph {\n width: 100%;\n height: 400px;\n }\n</style>","storeOutMessages":true,"passthru":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":490,"y":400,"wires":[[]]},{"id":"5a24a7294e508359","type":"ui-group","name":"Support","page":"22c235c0282c88f2","width":"12","height":"1","order":1,"showTitle":false,"className":"","visible":"true","disabled":"false"},{"id":"22c235c0282c88f2","type":"ui-page","name":"Help","ui":"0095684061591fec","path":"/help","icon":"mdi-chat-question","layout":"grid","theme":"44dd49330c02d4ba","order":10,"className":"","visible":"true","disabled":"false"},{"id":"0095684061591fec","type":"ui-base","name":"Enqode","path":"/dashboard","includeClientData":true,"acceptsClientConfig":["ui-control","ui-notification"],"showPathInSidebar":false,"navigationStyle":"icon"},{"id":"44dd49330c02d4ba","type":"ui-theme","name":"LightCyber","colors":{"surface":"#071438","primary":"#7300b5","bgPage":"#ebeef3","groupBg":"#ffffff","groupOutline":"#e6e6e6"},"sizes":{"pagePadding":"12px","groupGap":"12px","groupBorderRadius":"4px","widgetGap":"12px"}}]
Thanks in advance for your help!