Hello,
I created a bar chart for different companies using a dropdown filter.
I want to see all the values there even if they dont have any related values for that column.
To give an example. This is showing all the values I have without the filter:
And this one shows for a company:
As you can see its missing a lot of values and I know that s normal. But I want to see them on X axis anyway.
Is there anyway I can do this?
Here is my code:
filters
|var_set name="results"
value={essql query="SELECT Contract_Value, count(distinct(Response_ID)) as count from \"preprocessed_transformed\" group by Contract_Value"}
| var name="results"
| var_set name="sum" value={ply expression={math "sum(count)"} | getCell "value"}
| var name="results"
| staticColumn name="sum" value={var name="sum"}
| mapColumn name="percent_of_sum" expression={math "count / sum" | formatnumber "0%"}
| sort by="count" reverse=true
| alterColumn "Contract_Value" name="Contract Value"
| alterColumn "percent_of_sum" name="Count (%)"
| mapColumn "Contract Value" fn={getCell "Contract Value" | replace "_P/Y" replacement=" "}
| columns exclude="count"
| columns exclude="sum"
| pointseries x="Contract Value" y="Count (%)" text="Count (%)"
| plot defaultStyle={seriesStyle bars=0.2 color="#005659"} legend=false yaxis=false
| render
containerStyle={containerStyle overflow="visible" border="1px none " borderRadius="8px"}
css=".canvasDataTable__th { text-decoration: underline; background-color: #669A9B; color: black}
.canvasDataTable__tbody>:nth-child(even) {
background-color:white;
}
.canvasDataTable__tbody>:nth-child(odd) {
background-color: #E5EEEE;
}
.valueLabel { margin-top: -15px; align: center; font-size: 16px; font-weight:bold
}
"