I’ve created a Custom Funnel Chart with Highchart Visual using the below code..
{
"chart": {
"type": "funnel"
},
"title": {
"text": "Data Flow"
},
"lang": {
"thousandsSep": ","
},
"xAxis": {
"categories": ["getColumn", 0],
"labels": {
"formatter": ["formatValue", "count", 0]
},
},
"tooltip": {
"pointFormat":"{series.name}: <b>{point.percentageOfTotal:.1f}%</b>"
},
"plotOptions": {
"funnel": {
"minSize": "100",
"borderRadius": 3,
"height": "90%",
"neckWidth": "30%",
"neckHeight": "35%",
"slicedOffset": 10,
"borderWidth": 4,
"borderColor": "#FFFFFF",
"dataLabels": {
"color": "#FFFFFF",
"enabled": true,
"inside": true,
"crop": false,
"overflow": "justify",
"nullFormat": "No data",
"softConnector": true,
"filter": {
"property": "realValue",
"operator": ">",
"value": 4
},
"useHTML": true,
"format": "<b>{point.name}</b><br><div style='text-align: center;'>{point.realValue:,.0f} ({point.percentageOfTotal:.2f}%)</div>",
"style": {
"fontSize": "10px",
"textOutline": "none",
"fontWeight": "bold",
"lineHeight": "12px"
}
}
}
},
"colors": [
"#5B8FF9",
"#61DDAA",
"#65789B",
"#F6BD16",
"#7262FD",
"#78D3F8",
"#9661BC",
"#F6903D",
"#E86452",
"#2FC25B",
"#F04864",
"#1890FF",
"#13C2C2",
"#8543E0",
"#3436C7",
"#223273",
"#1BA784",
"#F5222D",
"#A0D911",
"#FA541C",
"#722ED1",
"#52C41A",
"#FFC53D",
"#597EF7",
"#73D13D",
"#9254DE",
"#36CFC9",
"#FF7A45"
],
"series": [
{
"type": "funnel",
"name": "Data Flow",
"data": [
"map",
["getColumn", 0, 1, 2],
{
"name": ["get", ["item"], 0],
"y": ["ln", ["get", ["item"], 1],1000],
"realValue": ["get", ["item"], 1],
"percentageOfTotal": ["*", 100, ["get", ["item"], 2]]
}
],
"dataLabels": {
"enabled": true,
"nullFormat": "No data"
},
"nullInteraction":true
}
]
}
I have a requirement that, if a stage in funnel having value 0 also i wanted to show that in the funnel.
By default 0 value stages are vanishing from the funnel chart.
My workaround:
For this problem I created a calculated field, with the below formula
ifelse{ count_col=0, 10, count_col}
so with this condition always the bar for the 0 value stages are also visible. But I want to fake the data label as well. I don’t want to show 10, I want to show 0.
For now I hidden the data labels which ever percentage is 0%. But I want to show the labels as 0, not the fake value 10. Is anyone worked or familiar with funnel chart using highchart pls guide me whether it is possible to achieve or not.
