Hi:
Instead of using a task to generate the histogram code behind the scenes, you could just write the code yourself. The documentation, here https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/n0j7m77qd6d03ln1l4bk301h2imo.ht... has an example of generating a histogram using SASHELP.HEART, which you should be able to just copy and run.
When you use the ROLE chooser in the task, it provides the variable that will be used for the histogram. When you choose the Additional Roles in the task, it provides a variable for a BY statement.
Once you see how the documentation example using SASHELP.HEART works, you should be able to use that code as a model to generate a histogram using your own data.
Cynthia