Chartdirector Histogram with overlaying function

I have a bar chart (histogram), and I want to lay a line on top. The problem is that I need the x-axis to be numeric with the y-value a function of the value of x. I have explored the examples with dual axes, but the examples do not include the two types of data I have. For example, my histogram may have bins:

Bin Frequency
20-25 8
25-30 15
30-35 32
35-40 19
40-45 7

I have to have the following tick marks: 20, 25, 30, 35, 40, 45 with the bars representing the frequency between the tick marks. I also want to plot a function
y=f(x) against the tick marks. I found this example for Cold Fusion, but I am not having any luck porting it to Xojo. The setXData2 function does not seem to be available.

sounds like layering a line layer on a bar layer.

setXData2 is named setXData in Xojo.
We overloaded the methods.

It worked like a charm! I added a 2nd layer with no data, but an x-axis scale to keep the bars from exceeding the with of the graph. Chartdirector is a very flexible tool.